Open mwbrooks opened 7 years ago
@imhotep is excited
@hollyschinsky and @devgeeks had some issues around deviceready
not firing in the dev app. It turns on that it seems to be caused by Content Security Policy. I know nothing about it but this CSP seems to work:
<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 *" />
The CLI would also display the wrong URL that is now fixed by this commit
Next step is to define what we want to do with this.
@shazron has expressed some valid concerns regarding the security/safety of a feature like this one and I can only offer two simple solutions:
1) limit the archive size to 50Mb (should be enough for basic app with splash screens, icons, etc…)
2) add some simple checks to make sure that anything that is not html
, css
, js
and images is denied.
Description
Sharing a PhoneGap app is intended to make it easier to share a preview of PhoneGap / Cordova app without having the receiving person setup a developer environment.
Sharing an app
An app can be shared from the PhoneGap CLI using the command:
The share Id is stored in the local
.cordova/config.json
so that it can be reused.Preview on desktop browser
Opening http://share.phonegap.com/a47b6f on a desktop browser will display a static browser platform version of the app.
In a future release, we would like to wrap the app in a device UI similar to what Web Inspector does in device mode.
Preview on mobile developer app
Opening http://share.phonegap.com/a47b6f on the Mobile Developer App will use content sync to pull down the app assets and display it on the device with full device capabilities. An example of this function can be found on http://ar.phonegap.com/
The release will not include
connect-phonegap
) capabilitiesphonegap serve --share
We will consider each of these for future releases.
Original work
Follow