Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24362] iOS: Unable to package for Ad Hoc with Xcode 8.3 Beta

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-02-02T19:43:13.000+0000
Affected Version/sRelease 6.0.1
Fix Version/sRelease 6.0.2
ComponentsiOS
Labelsqe-6.0.1
ReporterEric Wieber
AssigneeChris Barber
Created2017-02-01T00:23:12.000+0000
Updated2017-05-07T16:41:19.000+0000

Description

When using Xcode 8.3 Beta 1 and trying to package for ad hoc, I get the following error:
[ERROR] Failed to package application
[ERROR] /bin/sh: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication: No such file or directory
[ERROR]
*Steps to reproduce issue* 1. Ensure you have installed, launched, and selected Xcode 8.3 Beta 2. Create a new project 3. Package the project for Ad Hoc: appc run -p ios -T dist-adhoc *Expected Results* The ipa is successfully created *Actual Results* The build fails with the above error

Comments

  1. Chris Barber 2017-02-01

    Confirmed. I'll need to research alternatives to PackageApplication.
  2. Hans Knöchel 2017-02-01

    We should use xcodebuild archive, similar to [this StackOverflow](http://stackoverflow.com/a/19856005/5537752).
  3. Chris Barber 2017-02-01

    I updated the iOS build to use xcodebuild archive and then export the archive to an ipa, but I'm running into problems. First off, here's the commit with my changes: https://github.com/cb1kenobi/titanium_mobile/commit/4aa90b891d7d5a6b25a79d53205ff06a0336e4dc. You can pull my timob-24362 branch to test. When I run an adhoc build, I get this:
       [TRACE] ** ARCHIVE SUCCEEDED **
       [INFO]  Packaging for Ad Hoc distribution
       [DEBUG] Running: /Applications/Xcode-8.3-beta.app/Contents/Developer/usr/bin/xcodebuild -exportArchive -archivePath "/Users/chris/appc/workspace/testapp/build/iphone/testapp.xcarchive" -exportPath "/Users/chris/appc/workspace/testapp/dist/testapp.ipa" -exportOptionsPlist "/Users/chris/appc/workspace/testapp/build/iphone/export_options.plist"
       [ERROR] Failed to export archive to ipa
       [ERROR] 2017-02-01 14:41:28.735 xcodebuild[37353:957450] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/wx/j1v32g355xj28rnt9yb_6hfm0000gn/T/testapp_2017-02-01_14-41-28.734.xcdistributionlogs'.
       [ERROR] 1.2.840.113635.100.1.61
       [ERROR] 2017-02-01 14:41:28.815 xcodebuild[37353:957450] [MT] IDEDistribution: -[IDEDistributionProvisioning _itemToSigningInfoMap:]: Can't find any applicable signing identities for items: (
       [ERROR]     "<IDEDistributionItem: 0x7fa5318ccc00 'com.appcelerator.testapp3' '<DVTFilePath:0x7fa531a24c60:'/Users/chris/appc/workspace/testapp/build/iphone/testapp.xcarchive/Products/Applications/testapp.app'>'>"
       [ERROR] )
       [ERROR] Errors={
       [ERROR]     "<DVTSigningCertificate: 0x7fa52e7d9450; name='iPhone Distribution: Appcelerator, Inc. (<TEAM_ID>)', hash='DDF3902B870376432F073F04E7C4A1EE0B0BEBC5', serialNumber='77062BBF3933640C', certificateKind='1.2.840.113635.100.6.1.4, issueDate='2016-09-20 22:06:04 +0000''>" =     {
       [ERROR]         "<IDEDistributionItem: 0x7fa5318ccc00 'com.appcelerator.testapp3' '<DVTFilePath:0x7fa531a24c60:'/Users/chris/appc/workspace/testapp/build/iphone/testapp.xcarchive/Products/Applications/testapp.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: 0x7fa531a6dbe0; portalTeamID='<TEAM_ID>', usingTeamBasedSigning='NO', bundleIdentifier='com.appcelerator.testapp3', targetName='(null)', provisioningProfilePurpose='2', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n    \"application-identifier\" = \"<TEAM_ID>.com.appcelerator.testapp3\";\n    \"aps-environment\" = production;\n    \"get-task-allow\" = 0;\n    \"keychain-access-groups\" =     (\n        \"<TEAM_ID>.com.appcelerator.testapp3\"\n    );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
       [ERROR]     };
       [ERROR] }
       [ERROR] 2017-02-01 14:41:28.815 xcodebuild[37353:957450] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fa52e737420>: Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={
       [ERROR]     "<DVTSigningCertificate: 0x7fa52e7d9450; name='iPhone Distribution: Appcelerator, Inc. (<TEAM_ID>)', hash='DDF3902B870376432F073F04E7C4A1EE0B0BEBC5', serialNumber='77062BBF3933640C', certificateKind='1.2.840.113635.100.6.1.4, issueDate='2016-09-20 22:06:04 +0000''>" =     {
       [ERROR]         "<IDEDistributionItem: 0x7fa5318ccc00 'com.appcelerator.testapp3' '<DVTFilePath:0x7fa531a24c60:'/Users/chris/appc/workspace/testapp/build/iphone/testapp.xcarchive/Products/Applications/testapp.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: 0x7fa531a6dbe0; portalTeamID='<TEAM_ID>', usingTeamBasedSigning='NO', bundleIdentifier='com.appcelerator.testapp3', targetName='(null)', provisioningProfilePurpose='2', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n    \"application-identifier\" = \"<TEAM_ID>.com.appcelerator.testapp3\";\n    \"aps-environment\" = production;\n    \"get-task-allow\" = 0;\n    \"keychain-access-groups\" =     (\n        \"<TEAM_ID>.com.appcelerator.testapp3\"\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: 0x7fa52e7d9450; name='iPhone Distribution: Appcelerator, Inc. (<TEAM_ID>)', hash='DDF3902B870376432F073F04E7C4A1EE0B0BEBC5', serialNumber='77062BBF3933640C', certificateKind='1.2.840.113635.100.6.1.4, issueDate='2016-09-20 22:06:04 +0000''>" =     {
       [ERROR]         "<IDEDistributionItem: 0x7fa5318ccc00 'com.appcelerator.testapp3' '<DVTFilePath:0x7fa531a24c60:'/Users/chris/appc/workspace/testapp/build/iphone/testapp.xcarchive/Products/Applications/testapp.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: 0x7fa531a6dbe0; portalTeamID='<TEAM_ID>', usingTeamBasedSigning='NO', bundleIdentifier='com.appcelerator.testapp3', targetName='(null)', provisioningProfilePurpose='2', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n    \"application-identifier\" = \"<TEAM_ID>.com.appcelerator.testapp3\";\n    \"aps-environment\" = production;\n    \"get-task-allow\" = 0;\n    \"keychain-access-groups\" =     (\n        \"<TEAM_ID>.com.appcelerator.testapp3\"\n    );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
       [ERROR]     };
       [ERROR] }}
       
    Obviously, it can't figure out the provisioning profile. There used to be a -exportProvisioningProfile option to xcodebuild, but it no longer exists. It appears to be replaced with -exportOptionsPlist which I have the iOS build generate and looks like:
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
       <plist version="1.0">
       <dict>
       	<key>method</key>
       	<string>ad-hoc</string>
       	<key>team</key>
       	<string><TEAM_ID></string>
       </dict>
       </plist>
       
    Next, I created a vanilla native iOS app and built it using:
       DEVELOPER_DIR=/Applications/Xcode-8.3-beta.app/Contents/Developer /Applications/Xcode-8.3-beta.app/Contents/Developer/usr/bin/xcodebuild archive -target testapp3 -configuration Release -scheme testapp3 -archivePath /Users/chris/appc/testapp3/testapp3.xcarchive
       
    The build succeeds. Then I run:
       /Applications/Xcode-8.3-beta.app/Contents/Developer/usr/bin/xcodebuild -exportArchive -archivePath /Users/chris/appc/testapp3/testapp3.xcarchive -exportPath /Users/chris/appc/testapp3/testapp.ipa -exportOptionsPlist /Users/chris/appc/testapp3/export_options.plist
       
    and it errors with:
       2017-02-01 17:11:55.878 xcodebuild[39056:1073982] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/wx/j1v32g355xj28rnt9yb_6hfm0000gn/T/testapp3_2017-02-01_17-11-55.876.xcdistributionlogs'.
       1.2.840.113635.100.1.61
       2017-02-01 17:11:56.005 xcodebuild[39056:1073982] [MT] IDEDistribution: -[IDEDistributionProvisioning _itemToSigningInfoMap:]: Can't find any applicable signing identities for items: (
           "<IDEDistributionItem: 0x7fc6a109a7a0 'com.appcelerator.testapp3' '<DVTFilePath:0x7fc69e6c0f20:'/Users/chris/appc/testapp3/testapp3.xcarchive/Products/Applications/testapp3.app'>'>"
       )
       Errors={
           "<DVTSigningCertificate: 0x7fc6a13462c0; name='iPhone Distribution: Appcelerator, Inc. (<TEAM_ID>)', hash='DDF3902B870376432F073F04E7C4A1EE0B0BEBC5', serialNumber='77062BBF3933640C', certificateKind='1.2.840.113635.100.6.1.4, issueDate='2016-09-20 22:06:04 +0000''>" =     {
               "<IDEDistributionItem: 0x7fc6a109a7a0 'com.appcelerator.testapp3' '<DVTFilePath:0x7fc69e6c0f20:'/Users/chris/appc/testapp3/testapp3.xcarchive/Products/Applications/testapp3.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: 0x7fc6a112f9b0; portalTeamID='<TEAM_ID>', usingTeamBasedSigning='NO', bundleIdentifier='com.appcelerator.testapp3', targetName='(null)', provisioningProfilePurpose='2', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n    \"application-identifier\" = \"<TEAM_ID>.com.appcelerator.testapp3\";\n    \"keychain-access-groups\" =     (\n        \"<TEAM_ID>.com.appcelerator.testapp3\"\n    );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
           };
       }
       2017-02-01 17:11:56.005 xcodebuild[39056:1073982] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fc6a132c150>: Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={
           "<DVTSigningCertificate: 0x7fc6a13462c0; name='iPhone Distribution: Appcelerator, Inc. (<TEAM_ID>)', hash='DDF3902B870376432F073F04E7C4A1EE0B0BEBC5', serialNumber='77062BBF3933640C', certificateKind='1.2.840.113635.100.6.1.4, issueDate='2016-09-20 22:06:04 +0000''>" =     {
               "<IDEDistributionItem: 0x7fc6a109a7a0 'com.appcelerator.testapp3' '<DVTFilePath:0x7fc69e6c0f20:'/Users/chris/appc/testapp3/testapp3.xcarchive/Products/Applications/testapp3.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: 0x7fc6a112f9b0; portalTeamID='<TEAM_ID>', usingTeamBasedSigning='NO', bundleIdentifier='com.appcelerator.testapp3', targetName='(null)', provisioningProfilePurpose='2', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n    \"application-identifier\" = \"<TEAM_ID>.com.appcelerator.testapp3\";\n    \"keychain-access-groups\" =     (\n        \"<TEAM_ID>.com.appcelerator.testapp3\"\n    );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
           };
       }}
       error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.)
       
       Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={
           "<DVTSigningCertificate: 0x7fc6a13462c0; name='iPhone Distribution: Appcelerator, Inc. (<TEAM_ID>)', hash='DDF3902B870376432F073F04E7C4A1EE0B0BEBC5', serialNumber='77062BBF3933640C', certificateKind='1.2.840.113635.100.6.1.4, issueDate='2016-09-20 22:06:04 +0000''>" =     {
               "<IDEDistributionItem: 0x7fc6a109a7a0 'com.appcelerator.testapp3' '<DVTFilePath:0x7fc69e6c0f20:'/Users/chris/appc/testapp3/testapp3.xcarchive/Products/Applications/testapp3.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: 0x7fc6a112f9b0; portalTeamID='<TEAM_ID>', usingTeamBasedSigning='NO', bundleIdentifier='com.appcelerator.testapp3', targetName='(null)', provisioningProfilePurpose='2', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n    \"application-identifier\" = \"<TEAM_ID>.com.appcelerator.testapp3\";\n    \"keychain-access-groups\" =     (\n        \"<TEAM_ID>.com.appcelerator.testapp3\"\n    );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
           };
       }}
       
       ** EXPORT FAILED **
       
    I'm at a loss of what to do. I've followed the information on http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/ and http://www.matrixprojects.net/p/xcodebuild-export-options-plist/, but I don't see anything that I'm not already doing.
  4. Chris Barber 2017-02-02

    TiSDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8814 TiSDK 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8815 To test, clean your project, then run a dist-adhoc build. Ensure that Xcode 8.3 beta is selected by specifying -I 10.3.
  5. Eric Wieber 2017-02-03

    Verified fixed, using: MacOS 10.12 (16A323) Studio 4.8.1.201701192045 Ti SDK 6.0.2.v20170202114945 Appc NPM 4.2.8 Appc CLI 6.1.0 Alloy 1.9.5 Xcode 8.2 (8C38) & Xcode 8.3 (8W109m) Able to package for ad-hoc using Xcode 8.3 and Xcode 8.2, without issue.
  6. Joshua A. Ceaser 2017-04-26

    I'm still seeing this issue with 8.3.2(8E2002) Appcelerator Command-Line Interface, version 6.2.0 Copyright (c) 2014-2017, Appcelerator, Inc. All Rights Reserved. Operating System Name = Mac OS X Version = 10.12.4 Architecture = 64bit # CPUs = 4 Memory = 4.0GB Node.js Node.js Version = 4.6.0 npm Version = 2.15.9 Titanium CLI CLI Version = 5.0.12 node-appc Version = 0.2.41
  7. Eric Wieber 2017-04-26

    [~jceaser], which SDK do you have selected on your system and which SDK are you using to build your project with? You can check these by running appc ti sdk list and looking for the "selected" tag and by looking in your tiapp.xml to see which SDK is present there.
  8. Joshua A. Ceaser 2017-04-26

    Here is the output. The app sdk is 5.5.1 Appcelerator Command-Line Interface, version 6.2.0 Copyright (c) 2014-2017, Appcelerator, Inc. All Rights Reserved. SDK Install Locations: /Library/Application Support/Titanium /Users/Shared/Jenkins/Library/Application Support/Titanium [default] Installed SDKs: 6.0.3.GA [selected] 6.0.3.v20170322115949 /Users/Shared/Jenkins/Library/Application Support/Titanium/mobilesdk/osx/6.0.3.GA 5.5.1.GA 5.5.1.v20160927053850 /Users/Shared/Jenkins/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA Thanks.
  9. Eric Wieber 2017-04-26

    [~jceaser], changing the SDK version in your tiapp.xml to 6.0.2.GA or later should get you working again. Based on your output, you have 6.0.3.GA installed and selected at the system level, so just change the tiapp.xml SDK (app level) to 6.0.3.GA and you're good to go. The fix was in SDK 6.0.2.GA, so you will still see the issue when using SDKs prior to that (in your case, 5.5.1).
  10. michael warnes 2017-05-07

    thanks for updating this guys, was hitting this problem with no clue what was going on until I saw this ticket. Thank you

JSON Source