iPhone:在命令行 (Mac OS X) 中压缩 .app 文件会删除 CodeSigning

发布于 2024-09-02 17:39:14 字数 492 浏览 2 评论 0原文

我正在尝试使用 TeamCity 对我的 iPhone 应用程序进行简单的构建自动化,但遇到了这个棘手的问题。

当我从构建文件夹中手动拾取并安装 .app 文件时,它工作得很好(与 iTunes 顺利同步,我可以看到该应用程序) 但是当我尝试使用 /bin/zip 或同上压缩此文件

时...然后压缩的内容会丢失 CodeSigning(iTunes 说它无法安装此应用程序,因为它未签名)

我尝试了这些的不同组合。 .

同上 -ck --rsrc --keepParent HelloWorld.app HelloWorld.zip

还有更多想法吗?

我也尝试过,但仍然遇到相同的错误

version=$(date "+%Y-%m-%d.%H.%M.%S")
cd "$CONFIGURATION_BUILD_DIR"
zip -r -y "HelloWorld-$version.zip" HelloWorld.app

I am trying to do a simple build automation of my iPhone apps with TeamCity, but having this nagging issue..

When I manually pickup and install .app file from the build folder it works great (syncs smoothly with iTunes and I can see the app on my phone)

But when I try to zip this with /bin/zip or ditto...then the zipped contents loose the CodeSigning (iTunes says that it cannot install this app because its not signed)

I have tried different combinations of these..

ditto -ck --rsrc --keepParent HelloWorld.app HelloWorld.zip

Any more ideas?

I tried this too but still getting the same error

version=$(date "+%Y-%m-%d.%H.%M.%S")
cd "$CONFIGURATION_BUILD_DIR"
zip -r -y "HelloWorld-$version.zip" HelloWorld.app

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

巷雨优美回忆 2024-09-09 17:39:14

您需要在 zip 上使用 -y 选项:

zip -r -y zipped_blahapp.zip blahapp.app

-y

将符号链接存储在 zip 存档中,而不是压缩
并存储引用的文件
链接(仅限 UNIX)。

更新

现在可以从命令行使用 Xcode 存档功能,您可能应该使用它:

xcodebuild archive -workspace $APPNAME.xcodeproj/project.xcworkspace -scheme $APPSCHEMENAME > $OUTDIR/logs/$APPNAME.log

You need to use the -y option on zip:

zip -r -y zipped_blahapp.zip blahapp.app

-y

Store symbolic links as such in the zip archive, instead of compressing
and storing the file referred to by
the link (UNIX only).

Update

Now the Xcode archive functionality is available from the command line, you should probably be using that:

xcodebuild archive -workspace $APPNAME.xcodeproj/project.xcworkspace -scheme $APPSCHEMENAME > $OUTDIR/logs/$APPNAME.log
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文