Friday 18 September 2015

How to compile Phonegap

<Windows>

Move c:\my-app folder into C:\Users\matthew.oh\Dropbox to work everywhere.

1. Open Visual Studio
2. Open Web site
3. Select folder, C:\Users\matthew.oh\Dropbox\my-app
Now you can edit  html and js etc.

4. To compile app, open cmd
5. Move to the app folder

6. Type in
phonegap build android
or
phonegap run android

7. After a while (takes sometime to build in first time), you will see below.
8. When you compile in dos cmd, there is no way to scale (You can scale in android SDK, but this hello example you created as phone gap app in cmd. Android SDK, I could import phone gap app, but I could not edit/compile in the SDK)

9. Alt + Space to move the emulator
10. Because you installed the badge plugin, you can run it.




<Mac>
1. Install dropbox (go to dropbox home page, download)
2. Open terminal
3. Mac + Space, type in terminal
4. /Users/administrator/Dropbox/my-app/hello
5. phonegap run iOS
5. phonegap build ios

2. Open xcode
3. Open Dropbox >> my-app >> hello >> platforms >> iOS >> HelloWorld.xcodeproj
4. Run
5. iOS Simulator pops up 

6. To deply, select your iPhone, and run

7. Enjoy your app in iPhone



No comments:

Post a Comment