[TIMOB-24447] iOS: 6.0.2.GA iOS Store Builds Missing beta-reports-active
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2017-03-06T15:50:44.000+0000 |
| Affected Version/s | Release 6.0.2 |
| Fix Version/s | Release 6.0.3 |
| Components | iOS |
| Labels | beta-testing, distribution, ios |
| Reporter | Dawson Toth |
| Assignee | Chris Barber |
| Created | 2017-03-02T01:44:44.000+0000 |
| Updated | 2017-03-07T17:39:07.000+0000 |
Description
If I package my iOS app for store distribution and upload to iTunesConnect, the "beta-reports-active" entitlement is missing if I use 6.0.2.GA.
Using 6.0.1.GA with the same app, same provisioning profile, same commands, only difference is the SDK, the entitlement is included properly.
Whoops. OK, I fix. :)
I can't reproduce this. :( I tested with Titanium SDK 6.0.1.GA, 6.0.2.GA, and master (6.1.0) and built using Xcode 8.2 + iOS 10.2 and Xcode 8.3 beta 2 + iOS 10.3. All of them had the
beta-reports-activeentry in the entitlements file. I even uploaded it to the app store without issue. Maybe you need to do a clean build? I looked at the code and it looks pretty straight forward:It's possible to have a customif (this.target === 'dist-appstore' && !plist.hasOwnProperty('beta-reports-active')) { plist['beta-reports-active'] = true; }platform/ios/entitlements.plistfile with a<beta-reports-active>containing an invalid value such as nothing or some value other thantrueorfalse. I can see that causing an issue. On a side note, you can now put custom entitlements in the<ios><entitlements><plist>section of thetiapp.xmlthat override the custom entitlements plist.Hmm, the target might be the difference -- I target
dist-adhoc(with my store cert and profile) so that I can--output-dirthe IPA to a specific place, and then I [fastlane](https://github.com/fastlane/fastlane) it directly to iTunesConnect. Did something change recently there? Looking at the IPA, I see now that it's being signed with a different provisioning profile than what I specified. I'm guessing that because I specifieddist-adhoc, the tooling decided that I really meant that my adhoc profile should be used, instead of my store distribution profile? My build is essentially:I deleted the adhoc provisioning profile from my computer, and tried to build again, and got the following error:appc ti build\ --sdk=${sdk:-$sdkIOS}\ --no-banner\ --no-prompt\ --platform=ios\ --device-family="universal"\ --deploy-type="production"\ --distribution-name="$ios_distribution_name"\ --pp-uuid="$ios_distribution_uuid"\ --target="dist-adhoc"\ --output-dir=build\ --skip-js-minifyI then switched back to 6.0.1.GA, cleaned, and built again with the same command line, and it signed properly with the profile I specified...[ERROR] Failed to export archive to ipa [ERROR] 2017-03-05 23:07:58.948 xcodebuild[6997:134614] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/gb/bn5tvy2s2vqcf6hxs9qz17tm0000gn/T/Housters_2017-03-05_23-07-58.947.xcdistributionlogs'. [ERROR] 1.2.840.113635.100.1.61 [ERROR] 2017-03-05 23:07:59.090 xcodebuild[6997:134614] [MT] IDEDistribution: -[IDEDistributionProvisioning _itemToSigningInfoMap:]: Can't find any applicable signing identities for items: ( [ERROR] "<IDEDistributionItem: 0x7faac1fe7100 'com.tothsolutions.housters' '<DVTFilePath:0x7faac311a340:'/Users/dtoth/Code/houstersMobile/build/iphone/Housters.xcarchive/Products/Applications/Housters.app'>'>" [ERROR] ) [ERROR] Errors={ [ERROR] "<DVTSigningCertificate: 0x7faac1dbdaa0; name='iPhone Distribution: Housters, LLC. (X95YL24UT4)', ..., certificateKind='1.2.840.113635.100.6.1.4, issueDate='2017-02-22 01:29:19 +0000''>" = { [ERROR] "<IDEDistributionItem: 0x7faac1fe7100 'com.tothsolutions.housters' '<DVTFilePath:0x7faac311a340:'/Users/dtoth/Code/houstersMobile/build/iphone/Housters.xcarchive/Products/Applications/Housters.app'>'>" = "Error Domain=IDECodesignResolverErrorDomain Code=10 \"No matching provisioning profiles found\" UserInfo={NSLocalizedRecoverySuggestion=No valid 'ad-hoc' profiles were found., NSLocalizedDescription=No matching provisioning profiles found, IDECodesignResolverError_ResolutionInputsKey=<IDECodesignResolutionInputs: 0x7faac1ff4520; portalTeamID='X95YL24UT4', usingTeamBasedSigning='NO', bundleIdentifier='com.tothsolutions.housters', targetName='(null)', provisioningProfilePurpose='2', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n \"application-identifier\" = \"X95YL24UT4.com.tothsolutions.housters\";\n \"get-task-allow\" = 0;\n \"keychain-access-groups\" = (\n \"X95YL24UT4.com.tothsolutions.housters\"\n );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}"; [ERROR] }; [ERROR] } [ERROR] 2017-03-05 23:07:59.091 xcodebuild[6997:134614] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7faac3123bf0>: Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={ [ERROR] "<DVTSigningCertificate: 0x7faac1dbdaa0; name='iPhone Distribution: Housters, LLC. (X95YL24UT4)', ..., certificateKind='1.2.840.113635.100.6.1.4, issueDate='2017-02-22 01:29:19 +0000''>" = { [ERROR] "<IDEDistributionItem: 0x7faac1fe7100 'com.tothsolutions.housters' '<DVTFilePath:0x7faac311a340:'/Users/dtoth/Code/houstersMobile/build/iphone/Housters.xcarchive/Products/Applications/Housters.app'>'>" = "Error Domain=IDECodesignResolverErrorDomain Code=10 \"No matching provisioning profiles found\" UserInfo={NSLocalizedRecoverySuggestion=No valid 'ad-hoc' profiles were found., NSLocalizedDescription=No matching provisioning profiles found, IDECodesignResolverError_ResolutionInputsKey=<IDECodesignResolutionInputs: 0x7faac1ff4520; portalTeamID='X95YL24UT4', usingTeamBasedSigning='NO', bundleIdentifier='com.tothsolutions.housters', targetName='(null)', provisioningProfilePurpose='2', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n \"application-identifier\" = \"X95YL24UT4.com.tothsolutions.housters\";\n \"get-task-allow\" = 0;\n \"keychain-access-groups\" = (\n \"X95YL24UT4.com.tothsolutions.housters\"\n );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}"; [ERROR] }; [ERROR] }} [ERROR] error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.) [ERROR] [ERROR] Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={ [ERROR] "<DVTSigningCertificate: 0x7faac1dbdaa0; name='iPhone Distribution: Housters, LLC. (X95YL24UT4)', ..., certificateKind='1.2.840.113635.100.6.1.4, issueDate='2017-02-22 01:29:19 +0000''>" = { [ERROR] "<IDEDistributionItem: 0x7faac1fe7100 'com.tothsolutions.housters' '<DVTFilePath:0x7faac311a340:'/Users/dtoth/Code/houstersMobile/build/iphone/Housters.xcarchive/Products/Applications/Housters.app'>'>" = "Error Domain=IDECodesignResolverErrorDomain Code=10 \"No matching provisioning profiles found\" UserInfo={NSLocalizedRecoverySuggestion=No valid 'ad-hoc' profiles were found., NSLocalizedDescription=No matching provisioning profiles found, IDECodesignResolverError_ResolutionInputsKey=<IDECodesignResolutionInputs: 0x7faac1ff4520; portalTeamID='X95YL24UT4', usingTeamBasedSigning='NO', bundleIdentifier='com.tothsolutions.housters', targetName='(null)', provisioningProfilePurpose='2', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n \"application-identifier\" = \"X95YL24UT4.com.tothsolutions.housters\";\n \"get-task-allow\" = 0;\n \"keychain-access-groups\" = (\n \"X95YL24UT4.com.tothsolutions.housters\"\n );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}"; [ERROR] }; [ERROR] }}Meet TIMOB-24444. Titanium SDK 6.0.1.GA introduced support for Xcode 8.3 beta. Xcode 8.3 has completely removed the
PackageApplicationcommand line tool that we used. In order to generate the .ipa file, we callxcodebuildwith various export archive options to generate the .ipa file. Turns out thatxcodebuildis very picky about which provisioning profile you use. If you use an app store or development provisioning profile for adist-adhocbuild, it will blow up. We would love to validate the provisioning profile prior to building, but we simply don't know much about the provisioning profile aside from the vague info in the<plist>section of provisioning profile. There's a ton of binary data in the provisioning profile and I'm guessing it will tell you if it's an app store, ad hoc, or enterprise ad hoc provisioning profile.Makes perfect sense, then. Is there a way to make
dist-appstoreoutput to a particular directory, instead of opening the archives tab of Xcode? Or is that out of the CLI's hands?Without hacks, no. :( With hacks, yes! The easiest is to edit https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/hooks/package.js#L132 and just comment out whatever you want. The hard way is to write a hook that removes the
package.js'sbuild.post.compilehook duringbuild.pre.compileand adds a newbuild.post.compilethat does exactly what you want. Note that you would have to hijack either thedist-appstoreordist-adhoctarget.Thanks Chris! You can close this if you want -- no action required. It makes sense to me what happened now.
PS: <3 miss you :)
Resolving as sort of dupe of TIMOB-24444. PS: Aw, I'm blushing. :)
Verified that issue is being addressed in TIMOB-24444. Closing.