-
13 Apr 2012 9:21 AM #11
That's basically what I was doing (beginning of thread). But doesn't `sencha app build package` use the packager.json as well? That was my question -- if you're later using a different packager.json file, then how do you know what gets used from which file?
But I would also like a clarification on whether this is Sencha command or SDK tools. I *think* mitchellsimoens may have been thinking of the `sencha package` from the old SDK tools (because he only uses new `sencha app build native` now), but it sounded like he was saying that the new `sencha package` command somehow runs the old SDK tools?
-
13 Apr 2012 9:50 AM #12
sencha app build package does not appear to use packager.json. I removed it and it builds the same. It is confusing as to what files are used by the sencha command. Also looks like the sencha command is distributed between the install folder and the sdk folder of the app.
-
13 Apr 2012 7:45 PM #13
This is the best solution I've gotten so far
This is the best solution I've gotten so far
This is the best solution I've gotten so far (thanks tareed for the pointers). AFAIK this is entirely using the "Sencha command" (i.e. the new one, not the old one from the SDK Tools).
1. Start with the Sencha recommended app structure:
2. Write your app.Code:sencha generate app ...
3. If you have extra stuff that needs to go in your final app (beyond images, CSS, etc.), add the paths to the "extras" section of your "app.json" file.
4. Create a "package" build, ("a self-contained, re-distributable production build that normally runs from local file system without the need for a web server"). This will appear in your ./build/package directory, and you should be able to run it directly with a WebKit browser. You can see exactly what will end up in your final native app (everything here). Note that this step does NOT use any of your packager.json files, which was part of my original issue with "sencha app build native".
5. Copy the default "packager.json" into e.g. "my_packager.json". Change "inputPath" from "build/native" to "build/package". You may create multiple JSON files with different options.Code:sencha app build package
6. Create a signed native packaged app from the package build you just made. This will create something like YourApp.app in the ./build directory. You can drag this file onto the iTunes icon to install it on your device. (You'll have to set up all kinds of wacky certificate/provisioning stuff to do this step, but that's beyond the scope of this thread.)
7. If you made multiple packager JSON files, you can specify any of them in the -p argument, so you could have one that builds for the Simulator, one that makes a Debug build, another Release build, etc. etc. You could also do `sencha app build testing` and have a separate JSON with inputPath that pulls from testing instead, but not sure how useful that would be.Code:sencha package build -p my_packager.json
I hope this helps somebody. Feedback is welcome. As mitchellsimoens shared, if you just want a quick and easy native app build that opens in the Simulator, you can just run `sencha app build native`, but this has some limitations like requiring you to use the single "packager.json" file and popping up the Simulator UI which you might not want.
-
30 May 2012 8:36 AM #14
I use this command to generate native packages of some examples that come inside Sencha toucha zip, everything goes "green" until the iOS simulator started, and then blank/white screen on the emulator, I tested all examples, I generated also for android (package.json modification), I also installed a generated apk on my samsung galaxy s2 (AOKP ICS) => Always the blank screen

Please help.
-
30 May 2012 8:58 AM #15Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
- Answers
- 3108
what does that get you?Code:cd /path/to/sencha-touch-2.0.1 (or 2.0.0 if you don't have 2.0.1) sencha app create MyApp /path/to/MyApp cd /path/to/MyApp sencha app build native
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
30 May 2012 11:01 AM #16
-
30 May 2012 11:03 AM #17Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
- Answers
- 3108
If you get a blank screen or the loading indicator remains I usually find out that all classes weren't required properly or there was a JS error somewhere.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
30 May 2012 11:08 AM #18
on Windows 7: I get "My Application.app" in "build/native" and then it tells me
If I modify the packager.json to package for Android it stops after it echos theCode:To run iOS simulator you need to use Mac OS X
No further error messages. Just stops...Code:[INFO]Packing your application a a native app...
The same result if I use
where "my_packager.json" is the modified for Android "packager.json"Code:sencha package build -p my_packager.json
Worth
-
30 May 2012 11:14 AM #19
I didn't modify any file in sencha examples, here is what I did :
1 - downloaded and extracted sencha-touch-2.0.0-gpl
2 - cd /Applications/sencha-touch-2.0.0-gpl/examples/kitchensink/
3 - sencha app build native
4 - All [info] green and iOS emulator started
5 - blank screen
It's very easy to reproduce if you want to check.
Thanks
-
30 May 2012 11:23 AM #20
Android problem I was having related to
It seems that the AndroidEmulator option described in the packager.json comments does not work.Code:"platform":"AndroidEmulator", -versus- "platform":"Android",
Worth



Reply With Quote