错误:exportArchive:找不到'io.ionic.starter'的配置文件

时间:2018-03-21 18:22:32

标签: angular cordova ionic-framework ionic3

我正在尝试构建我的离子3应用程序并在我的设备上部署和实时重新加载,因为我正在尝试以下命令:

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

但是在运行该命令后,我得到以下错误:

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

"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.}

它说To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.但是怎么用cordova?

一些额外的错误输出。正如您在下面看到的那样,首先Archive Succeeded然后失败了。

** 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.

这是更多输出

Signing Identity:     "iPhone Developer: email@email.com (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.

请检查以*****------>>>>>开头的行。这是我关注的两行,我觉得有些奇怪的事情发生在那里。知道这里发生了什么,我该如何解决这个问题?

4 个答案:

答案 0 :(得分:2)

要在iOS设备上部署和测试应用,您需要创建开发者证书&amp;供应资料。

  

iOS开发人员需要为代码签名生成配置文件   他们的测试应用程序。好消息是,从iOS9开始,你可以   在没有付费Apple的情况下在iOS设备上开发和测试您的应用   开发者帐户。这对于想要的开发人员来说特别棒   尝试使用Ionic进行移动开发,因为它可以节省成本   仍然提供了拥有完整Apple开发人员的许多功能   帐户。有关所包含功能的完整细分,请查看   Apple’s docs

运行iOS应用的基本要求:

  • MacOS(10.10或更高版本)
  • Xcode 7或更高版本
  • iOS 9
  • 免费Apple ID或付费Apple开发者帐户

需要生成证书&amp;资料:

打开您的XCode - &gt;转到preferences - &gt;帐户 - &gt;添加帐户

enter image description here

添加您的Apple帐户凭据:

enter image description here

enter image description here

现在回到离子项目并按照以下步骤进行操作:

  • 使用以下命令

    运行应用程序的构建(生产或调试)

    $ ionic cordova build ios --prod

  • 从Xcode中的路径.xcworkspace打开platforms/ios/文件。

从XCode选择配置文件,请按照以下步骤操作:

现在转到您的应用程序设置(通过单击“左侧菜单”面板中的“应用程序名称”)

enter image description here

选中“自动管理登录”(通过检查此Xcode会自动创建配置文件)

现在设置了所有这些后,您的应用已准备好在设备上进行测试,有两种方法可以在设备上运行您的应用。

  1. 点击左上角的播放按钮,直接从XCode运行您的应用。

  2. 通过您的离子项目终端运行$ionic cordova run ios --device

  3. 希望以上步骤有助于在iOS设备上运行您的应用。

    有用的链接:

    1. How to deploy app on device (android & iOS)
    2. Apple Certificate SignIn flow

答案 1 :(得分:0)

我之前也遇到过同样的问题,我通过使用xcode GUI实际存档和验证ios应用程序来解决它。如果您选中“自动管理签名”,则将创建所需的配置文件。 (PS。如果无法通过验证,则是由于其他一些原因,您需要用Google搜索)xcode自动创建了所有必要的配置文件之后。然后,尝试再次运行该命令。这次应该可以了!我希望可以解决您的问题。

答案 2 :(得分:0)

只需在名称包标识符之间添加引号!

例如:

“ io.ionic.starter”

-io.ionic.starter-

答案 3 :(得分:0)

我遇到了同样的问题,我写了电子邮件解决了这个问题,但是我写了引号“-”而不是“ @”。那给了我证书,现在可以使用了。