-
Notifications
You must be signed in to change notification settings - Fork 3
Debugging
Debugging of this plug-in should be an easy one if you have proper setup or devices. Each platform has some instructions below. On all of these situation you can not use emulator, you need a real device as in-app purchasing is only available on real devices.
As an overall architecture decision, this plugin outputs all of the logs (also from native) back to the JS console. The reason is that many of the developers will not have access to specific platforms (like OSX and Xcode) to listen to native log outputs.
In order to debug on android, you need following things:
-
device
Android 4.4+: Remote Web Inspector is only available as of android 4.4 -
desktop
Chrome 30+: chrome 30+ is needed to be able to do Remote Web Inspection - Cordova 3.4+: you can downgrade this one to 3.2 with a plugin as described here
Before going further you have to set your android app as debuggable. This is automatically done when you build a dubug APK, but as such APKs are not able to do any kind of in app purchase, you will probably need a production signed APK. Even when you are using production APK, the debug output can be enabled by adding android:debuggable="true"
to <application>
tag inside AndroidManifest.xml
, found under platforms/android/
. Your <application>
start tag should look like:
<application android:debuggable="true" android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name">
such an APK can not be submitted to play store, therefore you have to remove this after you are done with debugging.
If you have all of these, debugging is easy. Just compile and install your app, connect your device to your desktop, run chrome and input chrome://inspect
as URL. If not already, select Discover USB devices and there you will see all the webviews (including from browser) and also yours, click on inspect related to your app's webview:
On iOS you can have remote debugging with following setup:
-
device
iOS 6+ -
desktop
Safari 6.0+
For exact steps on how to enable it refer to this tutorial
- Installation
- [Stores setup](Stores setup)
- [Purchase verification](Purchase verification)
- [Testing plugin](Automatic tests)
- [API documentation](API documentation)
- Debugging
- Roadmap
- [Compatibility issues](Compatibility issues)