Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Cutover to new code push SDK (#563)
Browse files Browse the repository at this point in the history
* Start upgrading to newest code-push sdk version

Use new DNS alias for codepush server.

* Update to lastest beta version of code-push + bump version number
  • Loading branch information
cjonsmith authored Aug 16, 2019
1 parent 6bbab8d commit 8575c9d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 41 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ With the CodePush plugin installed, configure your app to use it via the followi
2. If you're using an `<access origin="*" />` element in your `config.xml` file, then your app is already allowed to communicate with the CodePush servers and you can safely skip this step. Otherwise, add the following additional `<access />` elements:

```xml
<access origin="https://codepush.azurewebsites.net" />
<access origin="https://codepush.appcenter.ms" />
<access origin="https://codepush.blob.core.windows.net" />
<access origin="https://codepushupdates.azureedge.net" />
```

3. To ensure that your app can access the CodePush server on [CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Introducing_Content_Security_Policy)-compliant platforms, add `https://codepush.azurewebsites.net` to the `Content-Security-Policy` `meta` tag in your `index.html` file:
3. To ensure that your app can access the CodePush server on [CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Introducing_Content_Security_Policy)-compliant platforms, add `https://codepush.appcenter.ms` to the `Content-Security-Policy` `meta` tag in your `index.html` file:

```xml
<meta http-equiv="Content-Security-Policy" content="default-src https://codepush.azurewebsites.net 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *" />
<meta http-equiv="Content-Security-Policy" content="default-src https://codepush.appcenter.ms 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *" />
```

4. Finally, double-check that you already have the [`cordova-plugin-whitelist`](https://github.com/apache/cordova-plugin-whitelist) plugin installed (most apps will). To check this, simply run the following command:
Expand Down
2 changes: 1 addition & 1 deletion bin/www/nativeAppInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


"use strict";
var DefaultServerUrl = "https://codepush.azurewebsites.net/";
var DefaultServerUrl = "https://codepush.appcenter.ms/";
var NativeAppInfo = (function () {
function NativeAppInfo() {
}
Expand Down
43 changes: 12 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-code-push",
"version": "1.11.20",
"version": "1.12.0-beta.0",
"description": "CodePush Plugin for Apache Cordova",
"cordova": {
"id": "cordova-plugin-code-push",
Expand Down
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-code-push" version="1.11.20">
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-code-push" version="1.12.0-beta.0">
<name>CodePush</name>
<description>This plugin allows you to push code updates to your apps instantly using the CodePush service</description>
<license>MIT</license>
<keywords>cordova,code,push</keywords>
<repo>https://github.com/Microsoft/cordova-plugin-code-push.git</repo>

<dependency id="code-push" version="2.0.7" />
<dependency id="code-push" version="3.0.0-beta.2" />
<dependency id="cordova-plugin-dialogs" version=">=1.1.1" />
<dependency id="cordova-plugin-device" version=">=1.1.0" />

Expand Down
2 changes: 1 addition & 1 deletion samples/advanced/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* Enable inline JS: add 'unsafe-inline' to default-src
* CodePush users, you need to add the CodePush server URL to the CSP's default-src
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://codepush.azurewebsites.net/ data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://codepush.appcenter.ms/ data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
Expand Down
2 changes: 1 addition & 1 deletion samples/basic/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* Enable inline JS: add 'unsafe-inline' to default-src
* CodePush users, you need to add the CodePush server URL to the CSP's default-src
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://codepush.azurewebsites.net/ data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://codepush.appcenter.ms/ data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
Expand Down
2 changes: 1 addition & 1 deletion www/nativeAppInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

declare var cordova: Cordova;

const DefaultServerUrl: string = "https://codepush.azurewebsites.net/";
const DefaultServerUrl: string = "https://codepush.appcenter.ms/";

/**
* Provides information about the native app.
Expand Down

0 comments on commit 8575c9d

Please sign in to comment.