我们可以在 Xcode 4 中导入 .apparchive 包吗
在 Xcode 3 中,应用程序存档在 .apparchive 文件夹中。
在 Xcode 4 中,应用程序现在存档在 .xcarchive 包中。
有没有办法转换 .xcarchive 捆绑包中的 .apparchive 文件夹或使用 Xcode 4 打开 .apparchive 文件夹?
In Xcode 3, applications were archived in .apparchive folders.
In Xcode 4, applications are now archived in an .xcarchive bundle.
Is there a way to convert .apparchive folders in .xcarchive bundles or to open .apparchive folders with Xcode 4?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
戴夫·邓金(Dave Dunkin)的脚本效果很好,但在某些情况下我错过了图标和版本。下面是脚本的略有调整的版本。
您需要安装 MacRuby,可在此处获取:http://www.macruby.org/downloads.html 。Dave Dunkin's script worked great, but I missed the icon and version in some cases. Below a slightly adjusted version of the script.
You need to install MacRuby, available here: http://www.macruby.org/downloads.html.这是我为完成此任务而编写的 MacRuby 脚本。
Here's a MacRuby script I wrote to do this for me.
我只是手工做了一个,所以绝对是可能的,但是超过一两个就很乏味了。只要花点时间,有人就可以编写一个脚本来做到这一点。
.xcarchive
捆绑包只是目录,就像它们之前的.apparchive
捆绑包一样。新的格式移动了一些内容并简化了顶层Info.plist
。Xcode 3 将存档存储在
~/Library/Application Support/Developer/Shared/Archived Applications
中。各个存档包被命名为 GUID。每个内部都有ArchiveInfo.plist
、实际的.app
包和.dSYM
包。Xcode 4 将存档存储在
~/Library/Developer/Xcode/Archives
中,并分成以存档创建日期命名的文件夹。每个日期文件夹中都有.xcarchive
包,使用可读名称而不是 GUID。其中包含Info.plist
、.app
所在的Products
文件夹以及用于存放.app
的dSYMs
文件夹。持有.dSYM
捆绑包。将
.apparchive
复制到.xcarchive
的一种快速而肮脏的方法:.apparchive
的内容复制到该新文件夹中以.xcarchive
结尾的新文件夹中。cd
进入新的.xcarchive
文件夹。从现在开始,一切都与此相关。Products
和dSYMs
文件夹。.app
包移至Products
中。.dSYM
包移动到dSYMs
中。ArchiveInfo.plist
文件。Info.plist
,并根据需要进行替换。(结束列表以便 StackOverflow 正确格式化 XML...)
I just did one by hand, so it's definitely possible, but tedious for more than one or two. With a bit of time, someone could write a script to do this.
.xcarchive
bundles are just directories, like.apparchive
bundles before them. The newer format moved some things around and simplified the top levelInfo.plist
.Xcode 3 stores the archives in
~/Library/Application Support/Developer/Shared/Archived Applications
. Individual archive bundles are named as a GUID. Inside each is theArchiveInfo.plist
, the actual.app
bundle and the.dSYM
bundle.Xcode 4 stores the archives in
~/Library/Developer/Xcode/Archives
, separated into folders named after the date the archive is created. Within each date folder is the.xcarchive
bundle, using a readable name instead of a GUID. Within that is theInfo.plist
, aProducts
folder where the.app
lives, and adSYMs
folder to hold the.dSYM
bundles.A quick-and-dirty way to copy a
.apparchive
to a.xcarchive
:.apparchive
into a new folder ending with.xcarchive
inside that new folder.cd
into that new.xcarchive
folder. Everything is relative to that from this point forward.Products
anddSYMs
folders..app
bundle intoProducts
..dSYM
bundle intodSYMs
.ArchiveInfo.plist
file.Info.plist
that looks like this, substituting as appropriate.(ending the list so StackOverflow formats the XML properly...)