[TIMOB-26948] CLI: File provider extension capability not appropriately set
| GitHub Issue | n/a |
| Type | Bug |
| Priority | None |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2019-04-19T18:42:40.000+0000 |
| Affected Version/s | Release 8.0.0 |
| Fix Version/s | Release 8.0.1 |
| Components | iOS |
| Labels | n/a |
| Reporter | Eric Merriman |
| Assignee | Chris Barber |
| Created | 2019-03-28T17:36:29.000+0000 |
| Updated | 2019-04-19T18:42:40.000+0000 |
Description
Description
While creating an iOS project using the file provider extension, we found that the capability was not appearing correctly in the generated Xcode project
Steps to reproduce
1) Create an iOS project
2) Create a file provider target, add the app groups capability
3) Ensure you have the appropriate provisioning profiles
4) Build the project
5) Examine the capabilities in the generated xCode project
Result
The capability is not set correctly.
Comments
JSON Source
Master PR: https://github.com/appcelerator/titanium_mobile/pull/10813 8_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/10814 To test: 1. Create a new app 2. Create an
extensionsfolder in your app (e.g./path/to/my-project/extensions) 3. Open Xcode, create a new project (name it something meaningful likeMyExtension) and save in the extensions folder 4. In the Xcode project, add a new Target of type FileProvider (check the box to also generate the FileProvider UI target) and name it something likeMyFileProvider5. In the Xcode project settings, use manual provisioning profile (not managed) 6. Go to the Apple Developer site and create an App Group likecom.mycompany.test7. Create App IDs for the FileProvider and FileProvider UI targets such ascom.mycompany.myextension.MyFileProviderandcom.mycompany.myextension.MyFileProviderUI. 8. Create provisioning profiles for the FileProvider and FileProvider UI targets using the App IDs created above. Apple requires the Titanium app and each extension to have its own provisioning profile. When creating the profile, enable app groups. You should probably set an explicit App ID and not a wildcard. After saving the profile, edit it, then assign the App Group name, then download it and install it by double clicking it and Xcode will copy it to the correct place. 9. Edit thetiapp.xmland add an<extensions>section under theiossection:10. Run<extensions> <extension projectPath="extensions/appcappext/appcappext.xcodeproj"> <target name="AppcAppFileProvider"> <provisioning-profiles> <device>UUID GOES HERE</device> <dist-appstore/> <dist-adhoc/> </provisioning-profiles> </target> <target name="AppcAppFileProviderUI"> <provisioning-profiles> <device>UUID GOES HERE</device> <dist-appstore/> <dist-adhoc/> </provisioning-profiles> </target> </extension> </extensions>appc ti info -t iosand find the provisioning profiles. Copy and paste the provisioning profile UUIDs for the FileProvider targets into thetiapp.xml. 11. Add the app groups to thetiapp.xmlunder theiossection:12. Clean the project:<capabilities> <app-groups> <group>group.appc.testext</group> </app-groups> </capabilities>appc ti clean13. Build the project:appc run -p ios -T deviceand supply the Titanium app's provisioning profile UUID and developer name. 14. Open the generated Xcode project/path/to/myapp/build/iphone/myapp.xcodeprojand verify app groups (under project settings -> capabilities) are enabled for all targets. Also verify the entitlements file under theExtensionsfolder in the Xcode project sidebar are correct.FR passed. Danger failed on master .waiting for that to get resolved to merge .PR merged for 8.0.X only
Merged to master and 8_0_X
Verified the fix on SDK 8.1.0.v20190419091515 and 8.0.1.v20190418104938. Entitlements file and capabilities shows as expected. closing.
Operating System Name = Mac OS X Version = 10.13.6 Architecture = 64bit Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version = 8.0.1.v20190418104938 and 8.1.0.v20190419091515 Cli=7.0.11-70X.1 Studio = 5.1.2.201903111843