Is it possible to create an iOS Widget Extension in EAS Build’s Managed Workflow?
I know that EAS Build does not yet support Widget Extension. However, I think it is technically possible because we can update the contents of the ios/ folder with the Config Plugin during Prebuild.
However, adding the Widget Extension on XCode also updates the project.pbxproj file, so we need to reflect the differences as well, but it is tough to update the pbxproj file automatically in Config Plugin. Is there a good way to achieve this?
If it is difficult to do so, I would like to eject.
I have successfully created widgets in Managed Workflow and released them on production! @wkozyra Thanks for your advice
The development process was to create a Widget in Android and iOS as usual in the prebuilt (ejected) state and then create Config Plugins to make the same file structure. The process may be similar to provisioning with Ansible, etc.
For Android, it was relatively easy because all I had to do was prepare files. However, for iOS, it wasn’t easy because the “pbxproj” file needed to be updated (onesignal-expo-plugin was very helpful). The more files (swift files, fonts, localization files, etc.) used for widgets, the more difficult it becomes. It is hard but not impossible if the contents of the pbxproj file are steadily modified to be the same.
I created a minimal example repository for your reference.
It contains only minimum features. It will be more complicated when you create it. You might need Shared Groups, the ability to reflect app updates, etc. But who wants to create widget might refer.
Thanks @gaishimo-omoidasu I have managed to set this up by prebuilding and then defining the groups in Xcode. But is there some way I could set up groups programatically or in the config file? I can’t really find any good documentation on how to do this programatically.
I’ve followed the eas-widget-example posted by @gaishimo-omoidasu but my app has two targets (one for the widget and one for the widget configuration intent) My plugin basically works but I am running into issues when adding multiple targets to my .pbxproj file. Does anyone have any thoughts or insight into this?