-
25 Apr 2012 9:21 AM #1
run in iOSSimulator
run in iOSSimulator
So moving to ST1 >> ST2, I decided to start from scratch and run through the tutorials again following along and creating a simple MVC site. However, I did not use the command line to start "sencha app create MyApp /path/to/www/myapp" -- so it does not have the packager/loader anything.. starts straight at Ext.application({});
Now I have my app ready to move towards getting it up on the Apple App store. I have my provision profile, the p12 cert created, Xcode 4.3.2 installed, Sencha SDK Tools installed, etc. Walking through the tutorial for iOS Packaging, I run the command line "sencha package generate myconfig.json" in the root of the app next to the index.html -- After clearing the comments out and inserting my data:
I then open Terminal and change directory to the location of the app files (index.html). I hit "sudo sencha package run myconfig.json" and it creates a "build" folder with an application named "Mobile App.app" at 15.5 MB (since this is still all debug). Is the terminal supposed to create any feedback message about building? It did not for me.. it just returned to the prompt and it built the fileCode:{ "applicationName":"Mobile App", "applicationId":"##############.*", "versionString":"1.0", "iconName":"icon.png", "inputPath":"~/Documents/touch/app/", "outputPath":"build/", "configuration":"Debug", "platform":"iOSSimulator", "deviceType":"Universal", "certificatePath": "/Developer/iOSCertificateDeveloper.p12", "certificatePassword":"############", "certificateAlias":"iPhone Developer: Me (###########)", "orientations": [ "portrait", "landscapeLeft", "landscapeRight", "portraitUpsideDown" ] }
At this point, I drag app to the docked iTunes and it opens iTunes but then nothing. Or at this point should it open the app in the iOSSimulator? Is this a different process between the newer Xcode 4.3.2 and Xcode 4.2 since 4.2 was under the Developer folder and now 4.3.2 is under Applications?
-
25 Apr 2012 10:03 AM #2
for iOS package, do I need to start from a clean "sencha app create MobileApp /path"? Does this have the right packaging/loader configs to run "sencha package run config.json"?
I went and changed the paths in the config to take from the root (removing the trailing '/'):
"inputPath":"~/Documents/touch/demo1",
"outputPath":"~/Documents/touch/demo1/build",
and on running , I get errors now to figure out:
.. and the iOSSimulator opens as iPhone and is blank white. So at least it is now opening, but the copy operation is error now to findCode:$ sudo sencha package run myconfig.json Copy operation failed src=/usr/local/stbuild/templates/stbuild_template_sim.app/Info.plist dst=/Users/me/Documents/touch/demo1/build/=Mobile App.app/Info.plist Can not open destination file for writing Copy operation failed src=/usr/local/stbuild/templates/stbuild_template_sim.app/PkgInfo dst=/Users/me/Documents/touch/demo1/build/=Mobile App.app/PkgInfo Can not open destination file for writing [...] [...] // for each file The application was successfully packaged Path: //Users/me/Documents/touch/demo1/build/Mobile App.app Device: iphone
$ sencha --help
Sencha Command v2.0.0 Beta
Copyright (c) 2012 Sencha Inc.
Mac OS X 10.7.3
-
26 Apr 2012 9:49 AM #3
Well looking through that initial Getting Started video, instead of using
sencha package run config.json
... Ed was using thesencha app build native
which came from the originalsencha generate app MyApp ../MyApp
and it opened right up in the iOSSimulator. So what I will do is start with the template created that has the loader/package as part of it.
Is there no way to start from just an index.html, app.js file and the SDK sencha-touch-debug.js to package it? Or must that microloader be part of it and all the resources for Sencha command (keep intact the js file <script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script> )?


Reply With Quote