Xcode 7不会从在Xcode 6中构建有效存档的同一项目中构建有效的存档 [英] Xcode 7 will NOT build a valid Archive from the same project that builds a valid archive in Xcode 6

查看:117
本文介绍了Xcode 7不会从在Xcode 6中构建有效存档的同一项目中构建有效的存档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Xcode 7b5构建包含Today Extension的应用时,我无法创建有效的存档。当我进行存档时,构建成功,然后在管理器中它显示在其他项目下而不是iOS应用程序下。

When using Xcode 7b5 to build my app that contains a Today Extension I cannot create a valid archive. When I make an archive the build succeeds and then in Organizer it shows up under "Other Items" instead of under "iOS Apps".

如果我关闭项目并在Xcode 6.3.2中打开相同的项目,当我进行存档时,它会显示在iOS Apps下。

If I close the project and open up the same project in Xcode 6.3.2 when I make the archive it shows up under "iOS Apps".

我比较了档案,我注意到的一件事是我的今日小工具被放置在Applications目录之外。对于Xcode 6.3.2和Xcode 7b5,结构看起来像这样:

I compared the archives and the one thing I noticed is that my Today Widget is being placed outside of the Applications directory. The structure looks like this for Xcode 6.3.2 vs Xcode 7b5:

Xcode 6.3.2

| -Archive

| - 产品

| ---应用程序

| ---- MyMainApp.app

Xcode 6.3.2
|-Archive
|--Products
|---Applications
|----MyMainApp.app

Xcode 7 Beta 5

| -Archive

| --Products

| --- Applications

| ---- MyMainApp.app

| --- MyTodayWidget.appex

Xcode 7 Beta 5
|-Archive
|--Products
|---Applications
|----MyMainApp.app
|---MyTodayWidget.appex

我认为问题在于MyTodayWidget是打包在Applications目录之外和.app之外。我不确定为什么Xcode 7 beta 5会以不同于Xcode 6.3.2的方式打包应用程序,而我没有做任何更改。

I think the problem is that the MyTodayWidget is packaged outside of the Applications dir and outside of the .app. I'm not sure why Xcode 7 beta 5 would package the app differently than Xcode 6.3.2 when I didn't make any changes.

更新2015年8月14日:
这似乎是CocoaPods和Extensions的问题,如WatchKit或Today扩展。据报道,在Xcode 7 beta 5(带有watchkit扩展名)中使用Archive时,产生的档案无效#4021 由另一位开发者提供。这似乎是这个问题的根本原因。

UPDATE 8/14/2015: This appears to be an issue with CocoaPods and Extensions like a WatchKit or Today extension. It has been reported as Invalid archive produced when using "Archive" in Xcode 7 beta 5 (with watchkit extension) #4021 by another developer. It appears to be the root cause of this issue.

环境:

- Xcode 7 Beta 5

- 今日延期

- 普通应用< br>
- CocoaPods 0.38.2 (截至9月22日的最新发布版本)

- AFNetworking用于Extension&应用程序

Environment:
- Xcode 7 Beta 5
- Today Extension
- Normal App
- CocoaPods 0.38.2 (Latest Released Version as of 9/22)
- AFNetworking Used in Extension & App

推荐答案

我今天刚刚确认这对我来说是一个CocoaPods问题,特别是 4​​021 。我尝试了其他用户的问题,并从我今天的扩展目标中删除了复制pod资源。一旦删除,我就能够在Xcode 7 Beta 5中成功打包存档。

I just confirmed today that this was a CocoaPods issue for me, specifically 4021. I tried as the other users on the issue and removed "copy pod resources" from my today extension target. Once that was removed I was able to package up an archive successfully in Xcode 7 Beta 5.

希望这仍然适用于下一个测试版和GM ...

Hopefully this still works in the next beta and the GM...

更新9月22日:如果您使用 0.38.2 的CocoaPods,他们的最新发布版本截至2015年9月22日,这就是答案。我可以使用这种方法使用Xcode 7 GM将我的应用程序提交到应用程序商店。

UPDATE 9/22: This is the answer if you are using 0.38.2 of CocoaPods their latest Release version as of 9/22/2015. I was able to submit my app to the app store using Xcode 7 GM using this method.

这篇关于Xcode 7不会从在Xcode 6中构建有效存档的同一项目中构建有效的存档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆