ios 在新的 Xcode 8.0 beta 中构建项目时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37807161/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error when build project in new Xcode 8.0 beta
提问by Alex_Burla
回答by Eric Meadows
I combatted this last night. I assume you are using Pods: For each Pod, change the Team under Signing (as shown here)
我昨晚与这个作斗争。我假设您正在使用Pod:对于每个Pod,更改 Signing 下的 Team(如下所示)
edit: Screenshots are in Xcode 8 (now)
编辑:截图在 Xcode 8(现在)
回答by Anton Tropashko
I stole this from Anish:
我从 Anish 那里偷了这个:
Project tab -> list of Targets -> General tab for the target xcode complains about (in my case that's my framework used by my applications) -> choose your team
项目选项卡 -> 目标列表 -> 目标 xcode 的常规选项卡抱怨(在我的情况下,这是我的应用程序使用的框架)-> 选择你的团队
My project does not use pods. Sheesh.
我的项目不使用 pod。嘘。
UPD: now my project has picked up developers from the brave new world and it does use pods now (sudo hardlyagem install cocoapods), but that's hardly relevant since the solution I stole from Anish predates the import of boatload of 3rd party problems, all alike
UPD:现在我的项目已经从美丽的新世界中挑选了开发人员,并且它现在确实使用了 pods(sudo hardagem install cocoapods),但这几乎不相关,因为我从 Anish 窃取的解决方案早于 3rd 方问题的大量导入,所有类似
回答by inzo
I solved this problem by deleting my apple id from Xcode preferences and restarting it . Sign in with your ID again and you'll be good to go
我通过从 Xcode 首选项中删除我的 apple id 并重新启动它来解决这个问题。再次使用您的 ID 登录,您就可以开始了
回答by keji
Cocoapods needs to be updated to add in your projects team information. Maybe this new version of Xcode doesn't rely on the active running project for code signing information anymore. This could also be an indication of a bug from the new code signing in Xcode 8.0. I suppose Apple's developers use SPM over Cocoapods (at least that is what they test with). From what I can tell its only a matter of adding in this data to Pods/Pods.xcodeproj/project.pbxproj
file
Cocoapods 需要更新以添加您的项目团队信息。也许这个新版本的 Xcode 不再依赖于正在运行的项目来获取代码签名信息。这也可能表明 Xcode 8.0 中的新代码签名存在错误。我想 Apple 的开发人员在 Cocoapods 上使用 SPM(至少这是他们测试的内容)。据我所知,这只是将这些数据添加到Pods/Pods.xcodeproj/project.pbxproj
文件中的问题
TargetAttributes = {
698A37611B31C6E9B1C5AEC735CECE70 = {
DevelopmentTeam = XXXXXXXXXX;
DevelopmentTeamName = My Team Name";
ProvisioningStyle = Automatic;
};
90B2840AB96CFDCBD62C7A56DFD6562C = {
DevelopmentTeam = XXXXXXXXXX;
DevelopmentTeamName = "My Team Name";
ProvisioningStyle = Automatic;
};
B07B012AE17952EE777271E277F90284 = {
DevelopmentTeam = XXXXXXXXXX;
DevelopmentTeamName = "My Team Name";
ProvisioningStyle = Automatic;
};
B6184234CE5B97D6DADDB68315E67B58 = {
DevelopmentTeam = XXXXXXXXXX;
DevelopmentTeamName = "My Team Name";
ProvisioningStyle = Automatic;
};
};
These target hashes can be found under /* Begin PBXNativeTarget section */
. So now it just needs to be implemented into Cocoapods.
这些目标哈希可以在/* Begin PBXNativeTarget section */
. 所以现在只需要在 Cocoapods 中实现即可。
UPDATE:
更新:
An issue has been opened on Github so I would just track this until it is resolved: https://github.com/CocoaPods/CocoaPods/issues/5523
Github 上已经打开了一个问题,所以我只会跟踪它,直到它得到解决:https: //github.com/CocoaPods/CocoaPods/issues/5523
UPDATE 2:
更新 2:
A PR has been created here: https://github.com/CocoaPods/CocoaPods/pull/5528. Seems the valid approach is to disable code signing completely for any Pod projects and targets.
这里已经创建了一个 PR:https: //github.com/CocoaPods/CocoaPods/pull/5528。似乎有效的方法是完全禁用任何 Pod 项目和目标的代码签名。
To use the above link, since it hasn't been merged as of 6/27/16, the branch that includes this feature is https://github.com/CocoaPods/CocoaPods/tree/xcode-8-codesigning
. Just follow the guide here to use this branch https://guides.cocoapods.org/using/unreleased-features.
要使用上述链接,由于截至 2016 年 6 月 27 日尚未合并,因此包含此功能的分支是https://github.com/CocoaPods/CocoaPods/tree/xcode-8-codesigning
. 只需按照此处的指南使用此分支https://guides.cocoapods.org/using/unreleased-features。
UPDATE 3:
更新 3:
The PR was merged so anybody who has this problem should just update Cocoapods via sudo gem install cocoapods
PR 已合并,因此遇到此问题的任何人都应该通过以下方式更新 Cocoapods sudo gem install cocoapods
回答by Mohamed Saleh
You should install cocoapods beta as they solved that issue on its RC version.
To install cocoapods beta
simply use the following command in your terminal
您应该安装 cocoapods beta,因为他们在其 RC 版本上解决了该问题。要安装cocoapods beta
只需在终端中使用以下命令
gem install cocoapods --pre
and run pod install again by
并再次运行 pod install
pod install
Your errors should be fixed now.
您的错误现在应该已修复。
回答by soos33
Click on each project in the navigator and choose a team.
单击导航器中的每个项目并选择一个团队。
回答by Sourabh Shekhar
Select each target in pod and select the team in General tab section It resolves the problem
在 pod 中选择每个目标并在 General 选项卡部分选择团队 它解决了问题
回答by Sohil R. Memon
To solve this issue I have deleted the current pod file and remove all the pods from the Xcode project and also it's settings.
为了解决这个问题,我删除了当前的 pod 文件并从 Xcode 项目中删除了所有的 pod 以及它的设置。
Further, I created a pod
file using the terminal.
此外,我pod
使用终端创建了一个文件。
- Open Terminal
- Navigate to your Project Path
- Type
pod init
in terminal to create new pod file - Open the newly created pod file and write the pod line which you want to install after
target "TargetName" do
and beforeend
. - Then type
pod install
in the terminal
- 打开终端
- 导航到您的项目路径
- 键入
pod init
在终端创造新的吊舱文件 - 打开新创建的 pod 文件,在 后
target "TargetName" do
和之前写入要安装的 pod 行end
。 - 然后
pod install
在终端输入
Then finally I solved the problem.
然后我终于解决了这个问题。