如何使用'cordova build ios - 释放'部署(创建.ipa)iphone应用程序?(How can I deploy (create .ipa) iphone app using 'cordova build ios --release'?)

我已经创建了一个'helloworld'的iOS应用程序与cordova使用文档 。 当我运行cordova emulate ios时,该应用程序成功运行。 我不能做的,是在我运行cordova build --release时候部署 - 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?

最满意答案

我发现这个命令对我有用:

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文件。 我不知道这是否有必要,但我不这么认为。

编辑以通过添加cordova build命令澄清过程由建议的意见。

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"

Source: http://www.splinter.com.au/xcode-4-command-line-builds-of-iphone-apps/

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.

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?

Edited to clarify process by adding cordova build command as suggested by comments.

如何使用'cordova build ios - 释放'部署(创建.ipa)iphone应用程序?(How can I deploy (create .ipa) iphone app using 'cordova build ios --release'?)

我已经创建了一个'helloworld'的iOS应用程序与cordova使用文档 。 当我运行cordova emulate ios时,该应用程序成功运行。 我不能做的,是在我运行cordova build --release时候部署 - 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?

最满意答案

我发现这个命令对我有用:

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文件。 我不知道这是否有必要,但我不这么认为。

编辑以通过添加cordova build命令澄清过程由建议的意见。

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"

Source: http://www.splinter.com.au/xcode-4-command-line-builds-of-iphone-apps/

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.

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?

Edited to clarify process by adding cordova build command as suggested by comments.