Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26948] CLI: File provider extension capability not appropriately set

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-04-19T18:42:40.000+0000
Affected Version/sRelease 8.0.0
Fix Version/sRelease 8.0.1
ComponentsiOS
Labelsn/a
ReporterEric Merriman
AssigneeChris Barber
Created2019-03-28T17:36:29.000+0000
Updated2019-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

  1. Chris Barber 2019-03-28

    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 extensions folder in your app (e.g. /path/to/my-project/extensions) 3. Open Xcode, create a new project (name it something meaningful like MyExtension) 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 like MyFileProvider 5. In the Xcode project settings, use manual provisioning profile (not managed) 6. Go to the Apple Developer site and create an App Group like com.mycompany.test 7. Create App IDs for the FileProvider and FileProvider UI targets such as com.mycompany.myextension.MyFileProvider and com.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 the tiapp.xml and add an <extensions> section under the ios section:
       <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>
       
    10. Run appc ti info -t ios and find the provisioning profiles. Copy and paste the provisioning profile UUIDs for the FileProvider targets into the tiapp.xml. 11. Add the app groups to the tiapp.xml under the ios section:
       <capabilities>
         <app-groups>
           <group>group.appc.testext</group>
         </app-groups>
       </capabilities>
       
    12. Clean the project: appc ti clean 13. Build the project: appc run -p ios -T device and supply the Titanium app's provisioning profile UUID and developer name. 14. Open the generated Xcode project /path/to/myapp/build/iphone/myapp.xcodeproj and verify app groups (under project settings -> capabilities) are enabled for all targets. Also verify the entitlements file under the Extensions folder in the Xcode project sidebar are correct.
  2. Keerthi Mahalingam 2019-04-12

    FR passed. Danger failed on master .waiting for that to get resolved to merge .PR merged for 8.0.X only
  3. Christopher Williams 2019-04-15

    Merged to master and 8_0_X
  4. Keerthi Mahalingam 2019-04-19

    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
       

JSON Source