xcode 正在创建通用 xcode 存档而不是 iOS 应用存档
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20369290/
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
xcode is creating generic xcode archive instead of iOS App Archive
提问by Kalpesh Panchasara
I'm a beginner in iPhone development and I tried to create an ipa
with my profile and valid certificate but xcode is creating a generic xcode archive file instead of iOS app archive because in my code there are two .xcodeproj
in there.
我是 iPhone 开发的初学者,我试图ipa
用我的个人资料和有效证书创建一个,但 xcode 正在创建一个通用的 xcode 存档文件而不是 iOS 应用程序存档,因为在我的代码中有两个.xcodeproj
。
And from one of the stack overflow answer
I followed the following steps:
从stack overflow answer
我遵循以下步骤之一:
- Skip install is NO for the main project target
- Skip install is YES for framework (sub-projects) targets
- Sub-projects need to have Copy Headers in Project not Public
- Installation Directory under Deployment is valid (/Applications for example)
- 对于主要项目目标,跳过安装是否
- 对于框架(子项目)目标,跳过安装是 YES
- 子项目需要在 Project not Public 中有 Copy Headers
- 部署下的安装目录有效(例如/Applications)
But I'm still not getting the solution.
但我仍然没有得到解决方案。
采纳答案by AlexeyVMP
In my case problem was "Skip install" set to "NO" for one of embedded static libraries. Also useful link: https://developer.apple.com/library/mac/technotes/tn2215/_index.html
在我的情况下,问题是嵌入式静态库之一的“跳过安装”设置为“否”。同样有用的链接:https: //developer.apple.com/library/mac/technotes/tn2215/_index.html
回答by somasekhar
If you have any .xcodeproj files in Project>Targets>Build Phases>target dependencies remove it from there and then build your ipa. It works for me. Cheers
如果您在 Project>Targets>Build Phases>target dependencies 中有任何 .xcodeproj 文件,请将其从那里删除,然后构建您的 ipa。这个对我有用。干杯
回答by Got99Errors
My case wasn't 'skip install' nor a cocoapods issue. It appears that one of the 3rd party frameworks which I ended up not using was the cause for this. The solution was simply removing it.
我的情况不是“跳过安装”也不是 cocoapods 问题。看来我最终没有使用的第 3 方框架之一是导致此问题的原因。解决方案只是将其删除。
In order to track this issue I right clicked the generic archive file in Xcode's organizer and selected 'show in finder' -> right click the archive file -> select Show Package Contents -> Products -> Applications and inside this folder you can see what other files are in it besides the {project-name}.app file. In my case there was a file with the prefix of the framework I wasn't using, which led to its removal from the project's workspace.
为了跟踪这个问题,我右键单击了 Xcode 管理器中的通用存档文件并选择了“在查找器中显示”-> 右键单击存档文件-> 选择显示包内容-> 产品-> 应用程序,在此文件夹中您可以看到什么除了 {project-name}.app 文件之外,其他文件也在其中。在我的情况下,有一个带有我没有使用的框架前缀的文件,这导致它从项目的工作区中删除。
回答by Kasas
I had a problem with Cocoapods 0.38.1, after upgrading some projects it was generating me the xCode Generic Archive... after following all the steps the only way to create an ipa again was downloading cocoapods to 0.37.1 and following the steps on this link: http://9elements.com/io/index.php/cocoapods-best-practices/.
我在使用 Cocoapods 0.38.1 时遇到了问题,在升级了一些项目后,它为我生成了 xCode 通用存档......在完成所有步骤之后,再次创建 ipa 的唯一方法是将 cocoapods 下载到 0.37.1 并按照以下步骤操作这个链接:http: //9elements.com/io/index.php/cocoapods-best-practices/。
I hope that helps!
我希望这有帮助!
回答by Benkax
My case is I got 2 target in the project, and once I set one of the target to Skip Install = "YES", the issue resolved
我的情况是我在项目中有 2 个目标,一旦我将其中一个目标设置为 Skip Install = "YES",问题就解决了
回答by Nianliang
One of cases is you have to move headers (if any) from Public to Project in the Build Phase / Headers.
一种情况是您必须在构建阶段/标题中将标题(如果有)从公共移动到项目。
回答by Yhondri
The problem that I had was CocoaPods version 0.38.2
., after upgrade CocoaPods
to the later version (0.39.0.beta.4)
all works fine.
我遇到的问题是CocoaPods version 0.38.2
.,升级CocoaPods
到更高版本后(0.39.0.beta.4)
一切正常。
$gem install cocoapods --pre
Then:
然后:
$pod update
回答by Kalpesh Panchasara
I know its late to reply, but yes i got the solution by following below steps:
我知道回复晚了,但是我通过以下步骤得到了解决方案:
- Go to Project Navigator
- Select Targets
- Go to Build Phases
- Check for Target Dependencies and remove it
- Clean & Build code
- Try to archive and you will get iOS app archive this time.
- 转到项目导航器
- 选择目标
- 转到构建阶段
- 检查目标依赖项并将其删除
- 清理和构建代码
- 尝试存档,这次您将获得 iOS 应用存档。
Best Luck & Cheer from KP :)
来自 KP 的好运和欢呼 :)
回答by cat
In XCode 5 the same error occurs if you have multiple targets and wrong checkmarks in Manage Schemes. Then Xcode puts 2 binaries into 1 Generic Archive. This does not affect checked in files into e.g. git!
在 XCode 5 中,如果您在管理方案中有多个目标和错误的复选标记,则会发生相同的错误。然后 Xcode 将 2 个二进制文件放入 1 个通用存档。这不会影响签入文件到例如 git 中!
回答by helloWorld
I agree with @cat's response.
我同意@cat 的回应。
I by mistake had two build targets under manage scheme and that was the issue for me. Sip was NO already.
我错误地在管理方案下有两个构建目标,这就是我的问题。啜饮已经不是了。
Checking this step can help you debug more if Skip is already set to no.
如果 Skip 已设置为 no,则检查此步骤可以帮助您进行更多调试。