forcedroid version 4.0.0 cordova version 5.4.1 phonegap version 5.3.9 cordova platform version android 5.0.0 mac OS X Yosemite 10.10.5
I followed the below steps to create a new app,
$ forcedroid create hybrid_local myApp /Users/itsme/projects/ com.demo.myapp Creating a new cordova project. /Users/itsme/projects/myApp /Users/itsme/projects Adding android project... Creating Cordova project for the Android platform: Path: platforms/android Package: com.demo.myapp Name: myApp Activity: MainActivity Android target: android-23 Android project created with email@example.com Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project Fetching plugin "cordova-plugin-whitelist@1" via npm Installing "cordova-plugin-whitelist" for android This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in. Fetching plugin "https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin" via git clone Repository "https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin" checked out to git ref "master". Installing "com.salesforce" for android Dependent plugin "cordova-plugin-whitelist" already installed on android. Fetching plugin "cordova-plugin-device" via npm Installing "cordova-plugin-device" for android Fetching plugin "phonegap-plugin-push" via npm Installing "phonegap-plugin-push" for android Running SalesforceMobileSDK plugin android post-install script The node package shelljs is required to use this script. Run 'npm install shelljs' before running this script. /Users/itsme/projects/myApp Your application project is ready in /Users/itsme/projects/
Then, I ran the following code
$ cd myApp $ cordova build BUILD SUCCESSFUL $ cordova emulate android BUILD SUCCESSFUL INSTALL SUCCESS LAUNCH SUCCESS
I see an empty screen in my emulator with below error in the browser console i.e., via chrome://inspect/#devices
No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.
I added the following line in my
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src *; frame-src *;">
<allow-navigation href="https://localhost" /> <allow-navigation href="https://*.force.com" /> <allow-navigation href="https://*.salesforce.com" /> <access origin="https://localhost" /> <access origin="https://*.force.com" /> <access origin="https://*.salesforce.com" />
When I re-built it, there was no error or warnings but I still see the empty page. I am not sure why this simple app is not redirecting to the Salesforce login page, am i missing anything?
Thanks in advance.