This is a sample Ionic mobile app that shows results from the MediaCloud API.
- Install Node.js
- Install Ionic:
npm install -g ionic cordova - Checkout this github repo
- Copy
www/js/config.js.templatetowww/js/config.jsand edit it to put in your MediaCloud API key
To test in the browser on your computer, run ionic serve on the terminal in this directory. This will open your browser to a webpage showing your app running. Use console.log("some message") in the JS source code to debug things in the browser. Don't be surprised if the results don't come back in the browser (this is some Chrome cross-scripting permissions problem)... it works on the phone.
To run it on your iOS phone, you first need to add iOS as a build platform. You only need to do this once: ionic platform add ios. To install and open it on your device, do ionic run ios. This will create and ios project in platforms/ios/. Open the .xcodeproj project file in with xCode. Then click the run button in xCode and it should build and run in a simulator.
To run it on your Android phone, you first need to add Android as a build platform. You only need to do this once: ionic platform add android. To install and open it on your device, do ionic run android. To see console log messages, install Chrome and visit chrome://inspect/devices#devices, then click inspect next to your device on the list.