Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a production apk #95

Closed
marfago opened this issue Sep 3, 2014 · 5 comments
Closed

How to create a production apk #95

marfago opened this issue Sep 3, 2014 · 5 comments

Comments

@marfago
Copy link

marfago commented Sep 3, 2014

How is it possible to create production package apk?
The command grunt cordova:build --release does not seem to work.

@diegonetto
Copy link
Owner

Use cordova directly. Here are two useful commands:
cordova build ios --release --device
cordova build android --release

I've opened #97 which will enhance the current functionality.

@jimthedev
Copy link
Contributor

@diegonetto Can you describe what the ios command does? I know the android one generates an apk.

@diegonetto
Copy link
Owner

@jimthedev the iOS command builds the app into platforms/ios/build/device/<NAME>.app which then paired with xcrun can be used to build an iOS .ipa (.apk equivalent) without using Xcode.

The cordova build android --release signs your .apk with a DEBUG key, but you need to use xcrun to create and sign the iOS .ipa. I have a build script that signs my apps with an Adhoc Provisioning Profile so I can deploy apps to my testers over the air as part of my workflow :)

Use xcrun like this:
xcrun -sdk iphoneos PackageApplication -v $BUILT_APP -o $TARGET_IPA --sign "$DEVELOPER_NAME" --embed "$PROVISIONING_PROFILE"

Where all the $ variables are paths except $DEVELOPER_NAME which is the name used on the certificate generated by the Apple Developer program. This name can be found using the Keychain Access Mac app and clicking on "My Certificates" on the left, then searching for iPhone.

Hope this helps! Made a note to add this question to the FAQ that will be incorporated soon as part of this generator's documentation.

@jimthedev
Copy link
Contributor

Very cool. Thanks for that. We currently just use Xcode so this could be a great improvement. One tricky bit for me on android was generating a key store, jar signing, running zipalign key vs creating ant.properties so that I just run platforms/android/Cordova/build --release and it would automatically ask for my password.

I feel like the Cordova docs drop off a bit when it comes to the release process.

Thanks!

On Mon, Sep 8, 2014 at 6:35 PM, Diego Netto notifications@github.com
wrote:

@jimthedev the iOS command builds the app into platforms/ios/build/device/<NAME>.app which then paired with xcrun can be used to build an iOS .ipa (.apk equivalent) without using Xcode.
The cordova build android --release signs your .apk with a DEBUG key, but you need to use xcrun to create and sign the iOS .ipa. I have a build script that signs my apps with an Adhoc Provisioning Profile so I can deploy apps to by beta testers over the air as part of my workflow :)
Use xcrun like this:
xcrun -sdk iphoneos PackageApplication -v $BUILT_APP -o $TARGET_IPA --sign "$DEVELOPER_NAME" --embed "$PROVISIONING_PROFILE"
Where all the $ variables are paths except $DEVELOPER_NAME which is the name used on the certificate generated by the Apple Developer program. This name can be found using the Keychain Access Mac app and clicking on "My Certificates" on the left, then searching for iPhone.

Hope this helps! Made a note to add this question to the FAQ that will be incorporated soon as part of this generator's documentation.

Reply to this email directly or view it on GitHub:
#95 (comment)

@jayeshjain24
Copy link

@diegonetto Hello!! I am using an ubuntu. I need to release my beta test app to few people before launching it on app store. Can you tell me what all things i need to do after I do ionic build ios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants