Skip to content

Instantly share code, notes, and snippets.

@elidupuis
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elidupuis/11297069 to your computer and use it in GitHub Desktop.
Save elidupuis/11297069 to your computer and use it in GitHub Desktop.
Cordova cross platform configuration gotchas

Cordova handles A LOT of cross platform issues for us, but not all of them. We can simplify these by using a YML or JSON config file to keep track of the differences so our code can stay slim and maintainable.

This concept is based on this article which I found from this SO answer.

{
"mediaPath": {
"default": "",
"android": "/android_asset/www/"
},
"audioRecordFormat": {
"default": "mp3",
"android": "amr",
"ios": "wav"
}
}
mediaPath:
default: ''
android: /android_asset/www/
audioRecordFormat:
default: mp3
android: amr
ios: wav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment