Skip to content

Instantly share code, notes, and snippets.

@jspenc72
Last active May 26, 2017 17:38
Show Gist options
  • Save jspenc72/a65724542ebb0047a69338a8f31626e5 to your computer and use it in GitHub Desktop.
Save jspenc72/a65724542ebb0047a69338a8f31626e5 to your computer and use it in GitHub Desktop.
Useful commands to streamline common tasks for ionic development.

Running Locally iOS

Listing available images

$ ./platforms/ios/cordova/lib/list-emulator-images
iPhone-5, 10.0
iPhone-5s, 10.0
iPhone-6, 10.0
iPhone-6-Plus, 10.0
iPhone-6s, 10.0
iPhone-6s-Plus, 10.0
iPhone-7, 10.0
iPhone-7-Plus, 10.0
iPhone-SE, 10.0
iPad-Retina, 10.0
iPad-Air, 10.0
iPad-Air-2, 10.0
Apple-TV-1080p, tvOS 10.0
Apple-Watch-38mm, watchOS 3.0
Apple-Watch-42mm, watchOS 3.0
Apple-Watch-Series-2-38mm, watchOS 3.0
Apple-Watch-Series-2-42mm, watchOS 3.0
  1. Run on iPhone 6 Emulator
ionic cordova run ios -l -c --target="iPhone-6s"
  1. Run on iPhone 6 Plus Emulator
ionic cordova run ios -l -c --target="iPhone-6s-Plus"
  1. Run on iPhone 7 Emulator
ionic cordova run ios -l -c --target="iPhone-7"
  1. Run on iPhone 7 Plus Emulator
ionic cordova run ios -l -c --target="iPhone-7-Plus"
  1. Run on Device
ionic cordova run ios --device

##Android Publishing http://ionicframework.com/docs/guide/publishing.html

  1. Build
$ cordova build --release android
or
$ ionic cordova build --release android
  1. cd into cd platforms/android/build/outputs/apk/
$ cd platforms/android/build/outputs/apk/
  1. Jarsign
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore android-release-unsigned.apk alias_name
or
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore android-armv7-release-unsigned.apk alias_name
  1. ZipAlign
$ zipalign -v 4 android-release-unsigned.apk BeatPain.apk
or
$ zipalign -v 4 android-armv7-release-unsigned.apk BeatPain.apk
  1. Upload .apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment