Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
533 views
in Technique[技术] by (71.8m points)

deployment - How can I deploy (create .ipa) iphone app using 'cordova build ios --release'?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...