Okay here we go, maybe this helps others with the same problems i had, there are some holes in the sencha documentation regarding the building and distribution of iOS apps.
1) Follow the Getting started Guide (Video) - you will build an app from scratch by using the "sencha" command from the terminal and at the end of the guide you will be able to test your app in the iOSSimulator and on your personal developing device by editing the packager.json
2) make sure you edit your packager.json to build your app for release:
3) Build your app:
"applicationName":"APPNAME", = APPNAME from the Provisioning Portal -> App IDs
"applicationId":"com.COMPANY.APPNAME", = from the Provisioning Portal -> App IDs, without
the numbers before!
"certificatePath":"resources/Zertifikate.p12", = where you exported your p12 certificate from your keyring, i did put it into the resource tree, you can put it anywhere
"certificateAlias":"iPhone Distribution: NAME", = your distribution certificate, you will find it in your keyring (there are normally at least 2, one "iPhone Developer: XXX" = Developer certificate and "iPhone Distribution: XXX" = Distribution certificate
in the terminal from the root directory of your app, like you did before in die guide to try your app in the simulator or on your device, forget about the "Native iOS Packaging" guide in the documentation, the "sencha package xxx.json" command will not work, maybe its from the beta and not changed? I don't trust this guide because of this...
sencha app build native
4) Navigate in your Finder to the /build/native folder and press "ctrl" while clicking on your app (or rightclick) and choose "Paketinhalt anzeigen" (german.... "Show content" or so) to open the folder with all the stuff from your app. Look for the "Info.plist" file and open it in your favorite editor (TextWrangler or such), search for the line
and delete the path info (the png is in the app root now) ->
, save the file.
5) Get the yourappname_appstore.mobileprovision (thats how i name it, you may use a different name) file from the Provisional Portal -> Provisioning -> Distribution -> Download (you need a provisioning profile for the app store not the adhoc one) and put it into the /build/native directory. Now copy it into the app folder, in the terminal go to the build/native folder and use
6) while we are here make the "stbuild_template" executable -> in the terminal (still in build/native)
cp yourappname_appstore.mobileprovision "APPNAME.app/embedded.mobileprovision"
, else you will get a error while uploading to the app store
chmod a+x "APPNAME.app/stbuild_template"
7) Now its time to sign the app with your Distribution certificate by hand and add the Entitlements.plist to your app. Make a new file, called "Entitlements.plist" and put it into the "build/native" folder, edit it with TextWrangler or similar and paste this into it:
replace the "NUMBER.com.COMPANY.APPNAME" with the complete ID from the Provisioning Portal -> App IDs -> click configure to see the hole ID and copy&paste it. Now run from the terminal (still in build/native)
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- replace the "iPhone Distribution: NAME" with your distribution certificate name and the APPNAME ofcourse with the Name of your app.
codesign -f -dvvv -s "iPhone Distribution: NAME" --entitlements "Entitlements.plist" "APPNAME.app"
8) Zip the APPNAME.app (rightclick or hold ctrl + click on it and choose "compress"
9) Open Application Loader and Deliver your App, choose the zip file we created to upload
10) Congratulation! Wait for Apple to approve your app
I hope all of my information is correct, if i made some error somewhere please tell me and i will change/add it, thank you!