[TIMOB-28155] iOS 14: Including module built with Xcode 12 causes deployment error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 9.2.0, Release 9.3.0, Release 9.2.1 |
Fix Version/s | n/a |
Components | iOS |
Labels | ios14, xcode12 |
Reporter | Hans Knöchel |
Assignee | Vijay Singh |
Created | 2020-09-26T16:51:56.000+0000 |
Updated | 2020-11-05T14:50:54.000+0000 |
Description
When building a module (like our known friend [Ti.WidgetKit](https://github.com/hansemannn/titanium-widget-kit)) with Xcode 12 and deploying the parent app, the deployment fails. It can be reproduced with any sample project that includes the module!
Attachments
File | Date | Size |
---|---|---|
app_extension_built_project.png | 2020-10-01T09:44:05.000+0000 | 166928 |
app_extension_own_project.png | 2020-10-01T09:44:05.000+0000 | 156372 |
WidgetKitTestApp.zip | 2020-10-08T06:37:07.000+0000 | 136307 |
[~hknoechel] Is it happening with this module only or any module built with Xcode 12 and titanium sdk 9.2.0.? And what are errors?
[~hknoechel] There is an issue in your module. For TitaniumKit.xcframework 'Embed & Sign' is selected. It should be 'Do Not Embed'. To fix it - Open project in Xcode -> Select Target 'TiWidgetkit' -> General -> Frameworks and Libraries -> Select 'Do Not Embed' against Titaniumkit.xcframework. This should fix your issue. Let me know if it do not. Thanks! If you create new swift based module, Titaniumkit.xcframework is already 'Do Not Embed' in project.
Vijay, thank you so much for shedding a light on this! I applied your fix and it still shows an error during deployment (actually with one of our app extensions, though it works when not including WidgetKit). Have you tested the combination with app extensions already? You can also use our project to test if you want! *EDIT*: Looking at the archive, it seems like the build appends a "Frameworks/" folder to the app extension when including the module, but doesn't if the module is not included. *EDIT 2*: Digging further into it, I noticed that the build seems to override the
Always Embed Swift Standard Libraries
for all app extensions (like home extension, share extension), causing one of them to embed the Swift Standard Libraries (and the others not, because Xcode is smart enough to only embed them once). So once that's fixed, the module is likely ready to go. Especially, because the module works, if I manually delete the "Frameworks/" directory from the app extension inside the archive. I added two screenshots to show how the build settings are changed during the build[~hknoechel] I had tried by including the module only. It was not mentioned in ticket for inclusion of extension. I'll try with extensions.
Have you made any progress on that? We are happy to assist with sample code if necessary!
Hey [~hknoechel] , I couldn't try due to other high priority issues and leaves. If you can share a small test case (which may have 1 extension), will be great.
Sure thing! I attached you a light classic project with one extension to reproduce the case. Simply change the app ID's of the extension and containing app to an app of yours, make a production build (
ti build -p ios -T dist-appstore
) and see the validation error + theAlways Embed Swift Standard Libraries
setting being changed.Thanks for sample app. I'll check it early next week and update you.
[~hknoechel] I tried to build the shared project. It is building absolutely fine. I created production build and validated it from Xcode Organizer's 'Validate App'. It is not giving me any error. Though _Always Embed Swift Standard Libraries_ setting is getting changed but it is not causing any issue. Note - I used sdk 9.2.1.GA and Xcode 12.0.1 .
Thats very odd. Would you mind checking that on our app? Some config is changed by the build that causes this bug. Thank you Vijay! :-) *EDIT*: The "validate" step actually does not catch the error (!), only the upload *EDIT 2*: We can workaround the issue by injecting the following run phase:
It seems like only action extensions are affected by it. Crazy.