【问题标题】:Code Sign error: No provisioning profiles found in xcode 7.3代码签名错误:在 xcode 7.3 中找不到配置文件
【发布时间】:2016-10-14 03:45:45
【问题描述】:

我有一个 ios 项目,我在其中编写了我的 ios ui 测试用例。

现在我已经创建了另一个 osx(swift) 命令行工具,我想从主文件中运行我的 ios 项目 ui 测试。

为此,我使用以下命令:

xcodebuild test -project /Users/usernamer/Desktop/Xocde/ios-ui-automation-demo-master/ios-ui-automation-demo.xcodeproj -scheme ios-ui-automation-demo -destination 'platform=iOS Simulator,name=iPad Air'

如果我从终端运行此命令,则 ios 项目 ui 测试运行正常。

但是,如果我从我的 osx 命令行工具 swift 文件(在新的 OSX 项目中)运行命令,则会显示错误。代码是

import Foundation

func shell(args: String...) -> Int32 {
let task = NSTask()
task.launchPath = "/usr/bin/xcodebuild"
task.arguments = args
task.currentDirectoryPath = "/Users/username/Desktop/Xocde/ios-ui-automation-demo-master/"
task.launch()
task.waitUntilExit()
return task.terminationStatus
}

print("This is test version edit")

shell("xcodebuild test -project /Users/username/Desktop/Xocde/ios-ui-automation-demo-master/ios-ui-automation-demo.xcodeproj -scheme ios-ui-automation-demo -destination 'platform=iOS Simulator,name=iPad Air'")

此代码显示以下错误:

Build settings from command line:
xcodebuild test -project ios-ui-automation-demo.xcodeproj -scheme ios-ui-automation-demo -destination 'platform = iOS Simulator,name=iPad Air'

=== BUILD TARGET ios-ui-automation-demo OF PROJECT ios-ui-automation-demo WITH THE DEFAULT CONFIGURATION (Release) ===

Check dependencies
Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found.

** BUILD FAILED **


The following build commands failed:
Check dependencies
(1 failure)
Program ended with exit code: 9

我已经通过这个Xcode 7.2 no matching provisioning profiles found

但没办法,请帮我看看我的错误是什么。

我正在使用 swift 2.2 xcode 7.3

【问题讨论】:

    标签: xcode swift macos osx-elcapitan xcode7.3


    【解决方案1】:

    看看你的苹果开发者页面http://developer.apple.com

    • 转到您的“证书、标识符和配置文件”页面
    • 左侧是导航
    • 向下滚动直到到达“Provisioning Profiles”
    • 点击“开发”或“分发”,查看是否有与您的应用相关的配置文件

    如果没有,创建一个。

    【讨论】:

    • 实际上我对 mac 完全陌生......我无法在你给我的页面中找到证书、标识符和配置文件选项。
    • 导航到该页面后,您可以在右上角看到一个名为“帐户”的导航条目。单击该登录。登录后,您将被转发到主页。在此页面上,您可以看到带有“证书、标识符和配置文件”标签的齿轮图标。单击该按钮会将您转到“证书”页面。现在只需向下滚动,在左侧您可以看到一个点“Provisioning Profiles”。在其下方单击“开发”或“分发”。你选择什么取决于你的目的。如果您正在测试或正在开发,请选择“开发”。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多