如何使用“cordova build ios --release"部署(创建 .ipa)iphone 应用程序? [英] How can I deploy (create .ipa) iphone app using 'cordova build ios --release'?
问题描述
我使用 文档.当我运行 cordova emulate ios
时,应用程序成功运行.我不能做的是在我运行 cordova build --release
时进行部署.它不会在那里创建任何 .ipa
文件.我找到的只是 PROJECT_ROOT/platforms/ios/build
目录中的一个 Helloworld.build
文件.我在这里遗漏了什么吗?
I have created a 'helloworld' iOS app with cordova
using there documentation. The app successfully runs when I run cordova emulate ios
. What I can't do, is while deploying when I run cordova build --release
. It doesn't create any .ipa
files there. All I find is a Helloworld.build
file in the PROJECT_ROOT/platforms/ios/build
directory. Am I missing something here?
推荐答案
我发现这个命令对我有用:
I found this command which worked for me:
cordova build ios --device
cd platforms/ios/build/device
/usr/bin/xcrun -sdk iphoneos PackageApplication "$(pwd)/$PROJECT_NAME.app" -o "$(pwd)/$PROJECT_NAME.ipa"
来源:http://www.splinter.com.au/xcode-4-command-line-builds-of-iphone-apps/
我确实运行了@MD.首先是 Mohiuddin Ahmed 的 Ruby 脚本,它会改变我的 xcodeproj 文件.我不确定这是否有必要,但我认为没有必要.
I did run @MD. Mohiuddin Ahmed's Ruby script first, which would have changed my xcodeproj file. I'm not sure if that was necessary but I don't think so.
XCode 8 更新:正如评论者所指出的,PackageApplication
已从 XCode 8 中删除.要更新过程,请参阅问题:Xcode 的 PackageApplication 有什么替代品?
Update for XCode 8: As a commenter has noted, PackageApplication
has been removed from XCode 8. To update the process, see the question: What's the replacement for Xcode's PackageApplication?
根据评论的建议,通过添加 cordova build
命令来阐明流程.
Edited to clarify process by adding cordova build
command as suggested by comments.
这篇关于如何使用“cordova build ios --release"部署(创建 .ipa)iphone 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!