This repository has been archived by the owner on Jul 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d58489
commit d005eb8
Showing
1 changed file
with
5 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,9 @@ | ||
# Hello World PhoneGap Template [![bitHound Score][bithound-img]][bithound-url] | ||
|
||
# Foodloop App | ||
A PhoneGap Hello World template | ||
|
||
## Usage | ||
|
||
#### PhoneGap CLI | ||
|
||
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 | ||
|
||
## [config.xml][config-xml] | ||
|
||
#### android-minSdkVersion (Android only) | ||
|
||
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" /> | ||
|
||
#### <access ...> (All) | ||
|
||
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] | ||
|
||
## [www/index.html][index-html] | ||
|
||
#### Content Security Policy (CSP) | ||
|
||
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] | ||
|
||
|
||
[phonegap-cli-url]: http://github.com/phonegap/phonegap-cli | ||
[cordova-app]: http://github.com/apache/cordova-app-hello-world | ||
[bithound-img]: https://www.bithound.io/github/phonegap/phonegap-app-hello-world/badges/score.svg | ||
[bithound-url]: https://www.bithound.io/github/phonegap/phonegap-app-hello-world | ||
[config-xml]: https://github.com/phonegap/phonegap-template-hello-world/blob/master/config.xml | ||
[index-html]: https://github.com/phonegap/phonegap-template-hello-world/blob/master/www/index.html | ||
[cordova-whitelist-guide]: https://cordova.apache.org/docs/en/dev/guide/appdev/whitelist/index.html | ||
[cordova-plugin-whitelist]: http://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist | ||
[cordova-plugin-whitelist-csp]: http://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist#content-security-policy | ||
[csp-is-awesome]: http://cspisawesome.com | ||
This is an app being made for http://lancasterfoodloopgame.weebly.com/ | ||
Its function is to send data to a database on a server and receive it, including user authentication and the sending of data such as a photo with some data attached to it. | ||
The code for the server side is available at https://github.com/Pear-Trading/Foodloop-Server | ||
The wiki for both codebases describe the interaction between the two with API calls, describing what both waits to receive and sends. |