After some struggling, I got the PhoneGap app for the Akron Art Prize submitted to the iOS and Android app stores. Since it was a new thing for me and I wanted to ensure I could do it again, I took some notes on how to submit them to each store. I tried to do as much with the PhoneGap CLI as possible so it was easily reproducible from a git repo. Note that I used ‘cordova-icon’ and ‘cordova-splash’ for the PhoneGap-side assets, so I didn’t need to touch the platform folders beyond what is mentioned below.
iOS
- Go to Apple developer site > ‘Certificates, Identifiers, Profiles’
- click ‘Provisioning Profiles > All’ in sidebar
- click ‘+’ top right
- follow wizard: ‘Distribution: App Store’…
- Go to iTunes connect site > My Apps
- click on app
- click ‘+ Version or Platform’, select iOS
- enter number and then all information about version
- Open preferences in xcode
- accounts
- add apple id
- team -> view details
- click ‘create’ button near ‘iOS Distribution’
- provisioning profile will appear here after creating at developer.apple.com and opening. You can right click and select to see the profile file, whose name will have the
provisioningProfile
for ‘build.json’ in the next step
- accounts
- build signed app with PhoneGap / Cordova (details)
- create ‘build.json’ in project root
json
{
"ios": {
"release": {
"codeSignIdentity": "iOS Distribution"
,"provisioningProfile": "abcdefg-1234-jkld-qwer-aoiuwer2938sf"
}
}
} - run build:
phonegap build ios --release -- --buildConfig=build.json
- create ‘build.json’ in project root
- open project in xcode (eg
platforms/ios/ProjectName.xcodeproj
)- click on the project in the left sidebar
- in general:
- Set team in drop-down
- set ‘Deployment Target’ to lowest number (unless you have special needs)
- in general:
- in the top toolbar, click on the app name. a drop-down will open. Select ‘Generic iOS Device’ (picture). This one really tripped me up.
- click menu bar
Product > Archive
- try ‘Upload to App Store…’ from the window that pops up (this is called the ‘Organizer’ window). for me this failed. If not, skip 5.5 and 6
- run ‘Export…’ from the ‘Organizer’ window
- click on the project in the left sidebar
- open ‘Application Loader’ (can be run from menu
XCode > Open Developer Tool
menu)- open exported
.ipa
file
- open exported
- configure app, version, etc through itunes connect for testing / review
Android
- Build app with PhoneGap
phonegap build android
- Open generated app in Android Studio (details)
- Run
Build > Build APK
- Run
Build > Generate Signed APK…
- Create keystore with their form
- Run
- Set up build.json
json
{
"android": {
"release": {
"alias": "keystore"
,"keystore": "./keys/android.jsk"
,"password": "12345"
,"storePassword": "54321"
}
}
} - build with CLI:
phonegap build android --release -- --buildConfig=build.json
Will be built toplatforms/android/build/outputs/apk/android-release.apk
. You may need to run the build multiple times or delete a previous build, as I had some troubles with this. - Log into Play Store publish area, upload APK
- click app, click APK in left sidebar, click ‘Upload new APK to Production’ button
- Drag APK into dialog, enter change description, hit ‘Save Draft’
- Press ‘Publish Now’ button at top of pane