Please read the Installation Guide first.
Now that you have installed the Mobile Chrome Apps framework, lets use it to create your first App.
Starting from scratch:
mca create com.companyname.YourApp
Importing an existing desktop chrome app:
mca create com.companyname.YourApp --source=path/to/existing/ChromeApp
- Currently,
--source
will create a copy of your chrome app, so any changes will need to be synchronized manually.- Support for symlinks is coming shortly.
- Note: Don't create projects inside the
mobile-chrome-apps
directory, since that is a git repo which mca command will auto-update.
The easiest way to build your app is through an IDE.
-
Open xcode:
cd YourApp open platforms/ios/*.xcodeproj
- open Eclipse
- From the menu,
File
->Import
- Chose
Android
>Existing Android Code Into Workspace
. - Import from the path you just created with
mca
.- You should expect to have two projects to import, one of which is
*-CordovaLib
- You should expect to have two projects to import, one of which is
You should be all set to build and run, but there are a few things to watch for.
- Make sure you are building the right target.
- In the top left (beside Run&Stop buttons) there is a dropdown to select target project and device. Ensure that
YourApp
is selected and notCordovaLib
.
- In the top left (beside Run&Stop buttons) there is a dropdown to select target project and device. Ensure that
- You will need to create a Run Configuration (as with all Java applications). You usually get prompted for this the first time.
- You will need to manage your devices/emulators the first time as well.
[Coming soon]
Your HTML, CSS and JS files live within the www
directory.
Every time you change them, you must run ./mca prepare
from the root of your project. Otherwise, those changes will not be reflected when running your app.
Please reach out to us.
Now read the API Status document.