{ "id": "166390", "key": "TIMOB-24447", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "19275", "description": "Patch release for 6.0.x regressions or important fixes", "name": "Release 6.0.3", "archived": false, "released": true, "releaseDate": "2017-03-22" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2017-03-06T15:50:44.000+0000", "created": "2017-03-02T01:44:44.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "beta-testing", "distribution", "ios" ], "versions": [ { "id": "18928", "name": "Release 6.0.2", "archived": false, "released": true, "releaseDate": "2017-02-27" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-07T17:39:07.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "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.\r\n\r\nUsing 6.0.1.GA with the same app, same provisioning profile, same commands, only difference is the SDK, the entitlement is included properly.", "attachment": [], "flagged": false, "summary": "iOS: 6.0.2.GA iOS Store Builds Missing beta-reports-active", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "6.0.1.GA vs 6.0.2.GA", "closedSprints": [ { "id": 850, "state": "closed", "name": "2017 Sprint 05 Tooling", "startDate": "2017-02-26T17:42:58.088Z", "endDate": "2017-03-12T17:42:00.000Z", "completeDate": "2017-03-12T19:11:36.057Z", "originBoardId": 199 } ], "comment": { "comments": [ { "id": "408311", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Whoops. OK, I fix. :)", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-02T14:06:50.000+0000", "updated": "2017-03-02T14:06:50.000+0000" }, { "id": "408316", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I can't reproduce this. :(\r\n\r\nI 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-active}} entry in the entitlements file. I even uploaded it to the app store without issue.\r\n\r\nMaybe you need to do a clean build?\r\n\r\nI looked at the code and it looks pretty straight forward:\r\n\r\n{code}\r\nif (this.target === 'dist-appstore' && !plist.hasOwnProperty('beta-reports-active')) {\r\n plist['beta-reports-active'] = true;\r\n}\r\n{code}\r\n\r\nIt's possible to have a custom {{platform/ios/entitlements.plist}} file with a {{}} containing an invalid value such as nothing or some value other than {{true}} or {{false}}. I can see that causing an issue.\r\n\r\nOn a side note, you can now put custom entitlements in the {{}} section of the {{tiapp.xml}} that override the custom entitlements plist.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-02T17:07:11.000+0000", "updated": "2017-03-02T17:07:11.000+0000" }, { "id": "409282", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Hmm, the target might be the difference -- I target `dist-adhoc` (with my store cert and profile) so that I can `--output-dir` the IPA to a specific place, and then I [fastlane|https://github.com/fastlane/fastlane] it directly to iTunesConnect. Did something change recently there?\r\n\r\nLooking 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 specified `dist-adhoc`, the tooling decided that I really meant that my adhoc profile should be used, instead of my store distribution profile?\r\n\r\nMy build is essentially:\r\n\r\n{code}\r\nappc ti build\\\r\n \t--sdk=${sdk:-$sdkIOS}\\\r\n\t--no-banner\\\r\n\t--no-prompt\\\r\n\t--platform=ios\\\r\n\t--device-family=\"universal\"\\\r\n\t--deploy-type=\"production\"\\\r\n\t--distribution-name=\"$ios_distribution_name\"\\\r\n\t--pp-uuid=\"$ios_distribution_uuid\"\\\r\n\t--target=\"dist-adhoc\"\\\r\n\t--output-dir=build\\\r\n\t--skip-js-minify\r\n{code}\r\n\r\nI deleted the adhoc provisioning profile from my computer, and tried to build again, and got the following error:\r\n\r\n\r\n{code}\r\n[ERROR] Failed to export archive to ipa\r\n[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'.\r\n[ERROR] 1.2.840.113635.100.1.61\r\n[ERROR] 2017-03-05 23:07:59.090 xcodebuild[6997:134614] [MT] IDEDistribution: -[IDEDistributionProvisioning _itemToSigningInfoMap:]: Can't find any applicable signing identities for items: (\r\n[ERROR] \"'>\"\r\n[ERROR] ) \r\n[ERROR] Errors={\r\n[ERROR] \"\" = {\r\n[ERROR] \"'>\" = \"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=\\n}\";\r\n[ERROR] };\r\n[ERROR] } \r\n[ERROR] 2017-03-05 23:07:59.091 xcodebuild[6997:134614] [MT] IDEDistribution: Step failed: : Error Domain=IDEDistributionErrorDomain Code=3 \"(null)\" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={\r\n[ERROR] \"\" = {\r\n[ERROR] \"'>\" = \"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=\\n}\";\r\n[ERROR] };\r\n[ERROR] }}\r\n[ERROR] error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.)\r\n[ERROR] \r\n[ERROR] Error Domain=IDEDistributionErrorDomain Code=3 \"(null)\" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={\r\n[ERROR] \"\" = {\r\n[ERROR] \"'>\" = \"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=\\n}\";\r\n[ERROR] };\r\n[ERROR] }}\r\n{code}\r\n\r\nI 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...", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2017-03-06T04:13:55.000+0000", "updated": "2017-03-06T04:13:55.000+0000" }, { "id": "409283", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Meet TIMOB-24444.\r\n\r\nTitanium SDK 6.0.1.GA introduced support for Xcode 8.3 beta. Xcode 8.3 has completely removed the {{PackageApplication}} command line tool that we used. In order to generate the .ipa file, we call {{xcodebuild}} with various export archive options to generate the .ipa file. Turns out that {{xcodebuild}} is very picky about which provisioning profile you use. If you use an app store or development provisioning profile for a {{dist-adhoc}} build, it will blow up.\r\n\r\nWe 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 {{}} 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.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-06T04:21:50.000+0000", "updated": "2017-03-06T04:21:50.000+0000" }, { "id": "409284", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Makes perfect sense, then. Is there a way to make `dist-appstore` output to a particular directory, instead of opening the archives tab of Xcode? Or is that out of the CLI's hands?", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2017-03-06T04:25:25.000+0000", "updated": "2017-03-06T04:25:25.000+0000" }, { "id": "409285", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Without hacks, no. :(\r\n\r\nWith 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}}'s {{build.post.compile}} hook during {{build.pre.compile}} and adds a new {{build.post.compile}} that does exactly what you want. Note that you would have to hijack either the {{dist-appstore}} or {{dist-adhoc}} target.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-06T04:31:44.000+0000", "updated": "2017-03-06T04:31:44.000+0000" }, { "id": "409286", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Thanks Chris! You can close this if you want -- no action required. It makes sense to me what happened now.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2017-03-06T05:02:50.000+0000", "updated": "2017-03-06T05:02:50.000+0000" }, { "id": "409287", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "PS: <3 miss you :)", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2017-03-06T05:03:07.000+0000", "updated": "2017-03-06T05:03:07.000+0000" }, { "id": "409310", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Resolving as sort of dupe of TIMOB-24444.\r\n\r\nPS: Aw, I'm blushing. :)", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-06T15:50:44.000+0000", "updated": "2017-03-06T15:50:44.000+0000" }, { "id": "409518", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified that issue is being addressed in TIMOB-24444. Closing.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-07T17:38:51.000+0000", "updated": "2017-03-07T17:38:51.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }