phonegap-template-hello-world
Version:
> A Hello World template built with PhoneGap
70 lines (39 loc) • 2.85 kB
Markdown
A PhoneGap Hello World template
The hello-world template is the default when you create a new application using the [phonegap-cli][phonegap-cli-url].
phonegap create my-app
Create an app using this template specifically:
phonegap create my-app --template hello-world
To see a list of other available PhoneGap templates:
phonegap template list
Minimum SDK version supported on the target device. Maximum version is blank by default.
This template sets the minimum to `14`.
<preference name="android-minSdkVersion" value="14" />
This template defaults to wide open access.
<access origin="*" />
It is strongly encouraged that you restrict access to external resources in your application before releasing to production.
For more information on whitelist configuration, see the [Cordova Whitelist Guide][cordova-whitelist-guide] and the [Cordova Whitelist Plugin documentation][cordova-plugin-whitelist]
The default CSP is similarly open:
<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline'; style-src 'self' 'unsafe-inline'; media-src *" />
Much like the access tag above, you are strongly encouraged to use a more restrictive CSP in production.
A good starting point declaration might be:
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: 'unsafe-inline' https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *" />
For more information on the Content Security Policy, see the [section on CSP in the Cordova Whitelist Plugin documentation][cordova-plugin-whitelist-csp].
Another good resource for generating a good CSP declaration is [CSP is Awesome][csp-is-awesome]
[]: http://github.com/phonegap/phonegap-cli
[]: http://github.com/apache/cordova-app-hello-world
[]: https://www.bithound.io/github/phonegap/phonegap-app-hello-world/badges/score.svg
[]: https://www.bithound.io/github/phonegap/phonegap-app-hello-world
[]: https://github.com/phonegap/phonegap-template-hello-world/blob/master/config.xml
[]: https://github.com/phonegap/phonegap-template-hello-world/blob/master/www/index.html
[]: https://cordova.apache.org/docs/en/dev/guide/appdev/whitelist/index.html
[]: http://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist
[]: http://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist#content-security-policy
[]: http://cspisawesome.com