Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: exportArchive: No profiles for 'io.ionic.starter' were found

I am trying to build my ionic 3 application and deploy and live reload on my device for that reason I am trying following command:

ionic cordova run ios --device --prod -lcs

But after running that command, I get below error:

error: exportArchive: No profiles for 'io.ionic.starter' were found

and

"No profiles for 'io.ionic.starter' were found" UserInfo={NSLocalizedDescription=No profiles for 'io.ionic.starter' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Development provisioning profiles matching 'io.ionic.starter'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}

It says To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. but how in cordova?

Some additional error output. As you can see below, first Archive Succeeded but then it failed.

** ARCHIVE SUCCEEDED **

2018-03-21 15:34:28.042 xcodebuild[1673:18415] [MT] IDEDistribution: -[IDEDistributionLogging   _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/rh/w_gp1jjn4zz2mhhhnkq3_xqh0000gn/T/RemoteWorkersEvents_2018-03-21_15-34-28.034.xcdistributionlogs'.
2018-03-21 15:34:31.900 xcodebuild[1673:18415] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fa985924610>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed.,    IDEDistributionSigningAssetStepUnderlyingErrors=(
    "Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'io.ionic.starter' were found\"     UserInfo={NSLocalizedDescription=No profiles for 'io.ionic.starter' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Development provisioning profiles matching 'io.ionic.starter'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}"
)}
error: exportArchive: No profiles for 'io.ionic.starter' were found

Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'io.ionic.starter' were found"    UserInfo={NSLocalizedDescription=No profiles for 'io.ionic.starter' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Development provisioning profiles matching 'io.ionic.starter'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}

** EXPORT FAILED **

(node:1256) UnhandledPromiseRejectionWarning: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,RemoteWorkersEvents.xcarchive,-exportOptionsPlist,/Users/zafar/Documents/Projects/dne/ne-frontend/platforms/ios/exportOptions.plist,-exportPath,/Users/zafar/Documents/Projects/dne/ne-frontend/platforms/ios/build/device
(node:1256) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1256) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Here is more output

Signing Identity:     "iPhone Developer: [email protected] (7V8DET9FFF)"
*****------>>>>>    Provisioning Profile: "iOS Team Provisioning Profile: io.ionic.dne" // <--- Here it says different profile which is correct because I set it up in xcode for this project.
                      (c37524bf-b317-4957-85a4-01877cfac047)

    /usr/bin/codesign --force --sign 0180A41A2E305542B7292E256F380F50BADCD73B --entitlements /Users/zafar/Library/Developer/Xcode/DerivedData/RemoteWorkersEvents-dxaeeftqppxbkmehuratdfbvdnom/Build/Intermediates.noindex/ArchiveIntermediates/RemoteWorkersEvents/IntermediateBuildFilesPath/RemoteWorkersEvents.build/Debug-iphoneos/RemoteWorkersEvents.build/RemoteWorkersEvents.app.xcent --timestamp=none /Users/zafar/Library/Developer/Xcode/DerivedData/RemoteWorkersEvents-dxaeeftqppxbkmehuratdfbvdnom/Build/Intermediates.noindex/ArchiveIntermediates/RemoteWorkersEvents/InstallationBuildProductsLocation/Applications/RemoteWorkersEvents.app

Validate /Users/zafar/Library/Developer/Xcode/DerivedData/RemoteWorkersEvents-dxaeeftqppxbkmehuratdfbvdnom/Build/Intermediates.noindex/ArchiveIntermediates/RemoteWorkersEvents/InstallationBuildProductsLocation/Applications/RemoteWorkersEvents.app
    cd /Users/zafar/Documents/Projects/dne/ne-frontend/platforms/ios
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/zafar/Documents/Projects/dne/ne-frontend/node_modules/.bin:/Users/zafar/.nvm/versions/node/v9.6.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export PRODUCT_TYPE=com.apple.product-type.application
    builtin-validationUtility /Users/zafar/Library/Developer/Xcode/DerivedData/RemoteWorkersEvents-dxaeeftqppxbkmehuratdfbvdnom/Build/Intermediates.noindex/ArchiveIntermediates/RemoteWorkersEvents/InstallationBuildProductsLocation/Applications/RemoteWorkersEvents.app

Touch build/device/RemoteWorkersEvents.app.dSYM
    cd /Users/zafar/Documents/Projects/dne/ne-frontend/platforms/ios
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/zafar/Documents/Projects/dne/ne-frontend/node_modules/.bin:/Users/zafar/.nvm/versions/node/v9.6.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/bin/touch -c /Users/zafar/Documents/Projects/dne/ne-frontend/platforms/ios/build/device/RemoteWorkersEvents.app.dSYM

** ARCHIVE SUCCEEDED **

2018-03-24 13:47:59.274 xcodebuild[3032:92302] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/rh/w_gp1jjn4zz2mhhhnkq3_xqh0000gn/T/RemoteWorkersEvents_2018-03-24_13-47-59.269.xcdistributionlogs'.
2018-03-24 13:48:02.328 xcodebuild[3032:92302] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fb937015e10>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
    "Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'io.ionic.starter' were found\" UserInfo={NSLocalizedDescription=No profiles for 'io.ionic.starter' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Development provisioning profiles matching 'io.ionic.starter'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}"
)}
*****------>>>>>    error: exportArchive: No profiles for 'io.ionic.starter' were found // <--- Here it says different profile which is default but I changed it the one above

Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'io.ionic.starter' were found" UserInfo={NSLocalizedDescription=No profiles for 'io.ionic.starter' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Development provisioning profiles matching 'io.ionic.starter'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}

** EXPORT FAILED **

(node:2553) UnhandledPromiseRejectionWarning: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,RemoteWorkersEvents.xcarchive,-exportOptionsPlist,/Users/zafar/Documents/Projects/dne/ne-frontend/platforms/ios/exportOptions.plist,-exportPath,/Users/zafar/Documents/Projects/dne/ne-frontend/platforms/ios/build/device
(node:2553) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2553) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Please check the line begins with *****------>>>>> Those are the two lines I am concerned with and I think something weird is happening there. Any idea what is happening here and how can I fix this?

like image 728
null Avatar asked Mar 21 '18 18:03

null


People also ask

What is Allowprovisioningupdates?

Aug 14, 2020. Since Xcode 9, Apple provides automatic code signing identity management from the command line by using the xcodebuild command. Using the “allowprovisioningupdates” flag, you can enable code signing; however you may get errors like: Your session has expired.

What is a provisioning profile Xcode?

A provisioning profile links your signing certificate and App ID so that you can sign apps to install and launch on iOS devices. You must have a development provisioning profile to sign apps for use with iOS Gateway version 3.4 and later.


1 Answers

To deploy and test an app on an iOS device you need to create a developer certificate and a provisioning profile.

iOS developers need to generate a provisioning profile to code sign their apps for testing. The good news is that, as of iOS 9, you can develop and test your apps on your iOS device without a paid Apple Developer account. This is particularly great for developers who want to try out mobile development with Ionic since it saves the cost but still provides a lot of the features of having a full Apple Developer account. For a full breakdown of the features included, check out Apple’s docs.

Basic Requirements to run your iOS app:

  • MacOS (10.10 or higher)
  • Xcode 7 or higher
  • iOS 9
  • A free Apple ID or paid Apple Developer account

Need to Generate Certificate & Profile:

Open your Xcode > Go to Preferences > Account > Add account

Xcode screenshot preferences accounts

Add Your Apple account credential:

Xcode screenshot sign in

Xcode screenshot project settings

Now Come back to the ionic project and follow below steps:

  • Run a build (production or debug) of your app with below command

    $ionic cordova build ios --prod

  • Open the .xcworkspace file from path platforms/ios/ in Xcode.

For Profile Selection from XCode follow below steps:

Now Go to your App Setting (By clicking on App name in Left Menu panel)

enter image description here

Check "Automatically manage signin" (by checking this Xcode will create a profile automatically)

After setting all this now your app is ready to test on the device there are 2 ways to run your app on the device.

  1. Directly run your app from XCode by hitting on the play button on the top left corner.

  2. run $ionic cordova run ios --device through your ionic project terminal.

Hope above steps will help to run your app on the iOS device.

Useful links :

  1. How to deploy app on device (android & iOS)
  2. Apple Certificate Sign in flow
like image 189
CodeChanger Avatar answered Nov 15 '22 05:11

CodeChanger