I am using iCloud capabilities to choose files from iCloud by using UIDocumentMenuViewController. It is working fine in development build but whenever I upload build with production provisioning profile on Testflight my app produce a crash in line [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[@"public.data"] inMode:UIDocumentPickerModeImport];
I make archive in one machine and then create production build by using command-line on different machine.
I also checked the provisioning profile for production, and found all the capabilities are included under entitlement section.
Can someone help ?
Problem: As I was creating archive with command-line without code-signing (provisioning profile) system was ignoring the entitlements ad not creating the entitlements file (entitlement file
archived-expanded-entitlements.xcent
was not being created inside archive package or APP_NAME.xcarchive).Solution: I wanted
archived-expanded-entitlements.xcent
file, so I created archive with Xcode by including provisioning profile and the package had thearchived-expanded-entitlements.xcent
file inside it. I copy this file everytime when I create archive by command-line without code signing. I copy thisarchived-expanded-entitlements.xcent
file inside the archive package.PS: If we change app capabilities we need to create new
archived-expanded-entitlements.xcent
as entitlements would changed.Thanks everyone for your suggestion and comments :-)