如何从watchkit应用程序的命令行生成.ipa文件 [英] How to generate .ipa file from command line with watchkit app

查看:235
本文介绍了如何从watchkit应用程序的命令行生成.ipa文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个jenkins实例,使用xcodebuild进行版本构建。然后我有一个脚本(在Jenkins上)使用xcrun创建.ipa文件。这对我们来说很好,直到现在。现在我们有一个watchkit应用程序,并且从这个过程创建的.ipa文件与创建归档文件并从Xcode导出时创建的.ipa文件不同。

I have a jenkins instance that does a release build using xcodebuild. I then have a script (on Jenkins) to create the .ipa file using xcrun. this worked fine for us until now. Now we have a watchkit app and the .ipa file that is created from this process is not the same as the one that is created if you do an archive build and export it from Xcode.

从Xcode导出的.ipa有一个'Payload'文件夹,'Symbols'文件夹(可能是可选的)和一个'WatchKitSupport'文件夹。从xcrun生成的ipa没有'Symbols'或'WatchKitSupport'文件夹。有关结构的详情,请点击此处: http://stackoverflow.com/a/29400301/327386

The exported .ipa from Xcode has a 'Payload' folder, a 'Symbols' folder (probably optional) and a 'WatchKitSupport' folder. The ipa generated from the xcrun doesnt have the 'Symbols' or the 'WatchKitSupport' folder. See more about the structure here : http://stackoverflow.com/a/29400301/327386

我在SO上看到这则讯息: http://stackoverflow.com/a/19856005/327386 ,它具有存档和导出.ipa构建的命令(类似于Xcode进程),但即使没有创建新的文件夹。

I saw this post on SO : http://stackoverflow.com/a/19856005/327386 that has commands to archive and export the .ipa build (similar to the Xcode process) but even that didn't create the new folders in question.

任何人知道是否有一种方法使用命令行工具来创建一个.ipa文件,它等效于Xcode创建的文件?我没有在此找到任何官方文档

Does anyone know if there is a way to use the command line tools to create an .ipa file that is equivalent to the one created by Xcode? I didn't find any official documentation on this

推荐答案

确切问题

xcodebuild -exportArchive 无法使用Watch扩展名生成有效的IPA,它是一个Apple错误( http://openradar.appspot.com/20898925 )。

xcodebuild -exportArchive cannot make valid IPA with Watch Extension, it's an Apple bug (http://openradar.appspot.com/20898925).

官方(Xcode 7)解决方案

Apple使用 xcodebuild的 -exportOptionsPlist 标志解决了Xcode 7中的这个问题-exportArchive 命令。您可以在此文章中找到更多详细信息

Apple solved this problem in Xcode 7 with the -exportOptionsPlist flag of the xcodebuild -exportArchive command. You can find more details about it in this article.

非官方(Xcode 6)解决方案

此问题有解决方法。如果紧急,那么你可以和他们一起玩,但是我找不到适合每个人的解决方法(根据论坛讨论)。

There are workarounds for the problem. If it's urgent then you can play with them, but I couldn't find a workaround which was working for everybody (based on forum discussions).


  1. 添加WatchKitSupport和Symbols文件夹。更多详情这里此处。这不是为我工作。

  2. 辞职整个申请。有关详情,请此处。它是hacky,但工作比以前提到的解决方案更好。

  1. Adding WatchKitSupport and Symbols folders. More details here and here. It was not working for me.
  2. Resigning the whole application. More details here. It's hacky, but working better than the previously mentioned solution.

这篇关于如何从watchkit应用程序的命令行生成.ipa文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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