Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cordova

Sean Lynch edited this page Nov 30, 2017 · 13 revisions

Docs

Articles

Tips

Emulate

cordova run --emulate
# or using alias
cordova emulate

Specific target

cordova emulate ios --target "iPad-Pro--12-9-inch---2nd-generation-, 11.1"

Simulate in the browser

Run on device

cordova run ios

React

create-react-app support

Set "homepage": "." in package.json

Deploy build to www directory

Change build script:

"scripts": {
  "build": "react-scripts build && cp -r ./build/* ./www",
}

Other tips

Whitelist

iPad Pro

Plugins

Open URLs / Apps

Push Notifications

Authentication

Android

Errors

How to fix

Subproject Path: CordovaLib
Error: spawn EACCES
  • chmod +x platforms/android/gradlew or
  • chmod +x /Applications/Android\ Studio.app/Contents/gradle/gradle-4.1/bin/gradle

iOS

Add space to app name

config.xml

<config-file parent="CFBundleDisplayName" platform="ios" target="*-Info.plist">
    <string>My App</string>
</config-file>

Use WKWebView instead of UIWebView

Hosted Web App

Network

Other

Clone this wiki locally