PDA

View Full Version : iOS Simulator to iOS



wilzdezign
27 Apr 2012, 8:28 AM
Finally had everything ready to go with the command line (http://docs.sencha.com/touch/2-0/guide/command) for packaging:

sencha app build testing/package/production/native (iOSSimulator)

After getting each of these builds working, even the native iOSSimulator, it is time to send it to the connected iPad. I jump into the packager.json and change only one setting "platform":"iOSSimulator" to "platform":"iOS", the rest the same even "configuration":"Debug"

I then run sencha app build native

but I get the following (after 2 pop-ups says "codesign wants to sign using key 'Me' in your keychain" and I click [ Allow ]):

$ sencha app build native
[INFO] Deploying your application to /Users/me/CODE/SenchaTouch/EvCCMobile/build/package
...
...
[INFO] Generated app.json
[INFO] Embedded microloader into index.html
[INFO] Packaging your application as a native app...
[INFO] The application was successfully packaged
The application was successfuly signed
Only iOS simulator is supported to run packaged apps
Failed to run packaged application

Does that "Failed" message mean anything?

I drag the app from the build/native/ folder into iTunes and it shows up on the "Sync Apps" screen (though the icon is generic, not one specified in config) and then click "Sync". iTunes goes to sync and looks done. View then the connected iPad and it says "iTunes Sync: 'EvCC Mobile' failed to install". Is this due to some type of mismatch of what Provisioning Profile / Cert / App ID I have setup on the iOS Dev Center?

wilzdezign
27 Apr 2012, 1:11 PM
Since I am new to the iOS Provisioning Portal, I think I created duplicates of the profiles, and App IDs. So, instead of looking at iTunes to see a generic error why the app would not work, I opened Xcode's Organizer, dragged the .app file to the iPad Applications and I got the error "The executable was signed with invalid entitlements"

The error in the Xcode Organizer >> Console:

Apr 27 13:54:00 unknown installd[3411] <Error>: entitlement 'keychain-access-groups' has value not permitted by a provisioning profileApr 27 13:54:00 unknown installd[3411] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Apr 27 13:54:00 unknown installd[3411] <Error>: 001f8000 verify_signer_identity: Could not copy validate signature: -402620394
Apr 27 13:54:00 unknown installd[3411] <Error>: 001f8000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.SAgdfo/EvCC Mobile.app
Apr 27 13:54:00 unknown mobile_installation_proxy[3416] <Error>: handle_install: Installation failed
Apr 27 13:54:00 unknown installd[3411] <Error>: 001f8000 install_application: Could not preflight application install
Apr 27 13:54:00 unknown installd[3411] <Error>: 001f8000 handle_install: API failed
Apr 27 13:54:00 unknown installd[3411] <Error>: 001f8000 send_message: failed to send mach message of 71 bytes: 10000003
Apr 27 13:54:00 unknown installd[3411] <Error>: 001f8000 send_error: Could not send error response to client

So I need to go back to the provision portal and maybe re-download everything with the correct app ID and profile provision

wilzdezign
4 May 2012, 3:55 PM
After getting the correct provisioning profile/bundleSeedID in the packager.json, it seems that it builds the native file properly.

Now the next issue (still with the Debug build), iPad connected, I drop the application (2.3 MB) onto the xCode Organizer - Devices under the iPad. The application icon shows up on the iPad screen. On press of the finger, the application loads on the iPad with the initial startup PNG image screen, then it goes to the page with the fading dots but never loads the viewport. These are the default fading dots in the index.html for the <div id="appLoadingIndicator">.

The mobile app works find and loads the viewport after the "appLoadingIndicator" in the browser with build testing/package/production, plus the build native iOSSimulator, but not when it is the actual app build native (iOS) and ran on the iPad. Any suggestions from here?:-/

confile
13 May 2012, 9:05 AM
I use sencha app build native but I get the following error:

[INFO] The application was successfully packaged
The application was successfuly signed
Only iOS simulator is supported to run packaged apps
Failed to run packaged application


my packager.json looks like:

"applicationName":"Future Apps",
"applicationId":"de.domain",
"bundleSeedId":"ERFDGM9JG",
"versionString":"1.0",
"iconName":"icon.png",
"inputPath":"./",
"outputPath":"build/",
"configuration":"Debug",
"platform":"iOS",
"deviceType":"iPhone",
"certificatePath":"/path-to/Zertifikate.p12",
"provisionProfile":"/path-to/Web.mobileprovision",
"certificateAlias":"iPhone Developer: first last",
"rawConfig":"UIPrerenderedIcon",
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]

What is wrong?

wilzdezign
29 May 2012, 11:45 AM
I don't think anything is wrong on this, as when it is packaged for the native build, the local iOSSimulator will not work. Look in the build/native/ folder and the .app file should be there.

The next step is to test it on your device. So as long as you have your device setup for the development provisions and when you open the Xcode Organizer, it will show the connected device, dragged the .app file to the Applications of the device and it should show up on the device (as long as the provisional certificate and everything is authorized)