├── .editorconfig
├── .gitignore
├── README.md
├── config.xml
├── ionic.config.json
├── package-lock.json
├── package.json
├── resources
├── README.md
├── android
│ ├── icon
│ │ ├── drawable-hdpi-icon.png
│ │ ├── drawable-ldpi-icon.png
│ │ ├── drawable-mdpi-icon.png
│ │ ├── drawable-xhdpi-icon.png
│ │ ├── drawable-xxhdpi-icon.png
│ │ └── drawable-xxxhdpi-icon.png
│ └── splash
│ │ ├── drawable-land-hdpi-screen.png
│ │ ├── drawable-land-ldpi-screen.png
│ │ ├── drawable-land-mdpi-screen.png
│ │ ├── drawable-land-xhdpi-screen.png
│ │ ├── drawable-land-xxhdpi-screen.png
│ │ ├── drawable-land-xxxhdpi-screen.png
│ │ ├── drawable-port-hdpi-screen.png
│ │ ├── drawable-port-ldpi-screen.png
│ │ ├── drawable-port-mdpi-screen.png
│ │ ├── drawable-port-xhdpi-screen.png
│ │ ├── drawable-port-xxhdpi-screen.png
│ │ └── drawable-port-xxxhdpi-screen.png
├── icon.png
├── icon.png.md5
├── ios
│ ├── icon
│ │ ├── icon-1024.png
│ │ ├── icon-40.png
│ │ ├── icon-40@2x.png
│ │ ├── icon-40@3x.png
│ │ ├── icon-50.png
│ │ ├── icon-50@2x.png
│ │ ├── icon-60.png
│ │ ├── icon-60@2x.png
│ │ ├── icon-60@3x.png
│ │ ├── icon-72.png
│ │ ├── icon-72@2x.png
│ │ ├── icon-76.png
│ │ ├── icon-76@2x.png
│ │ ├── icon-83.5@2x.png
│ │ ├── icon-small.png
│ │ ├── icon-small@2x.png
│ │ ├── icon-small@3x.png
│ │ ├── icon.png
│ │ └── icon@2x.png
│ └── splash
│ │ ├── Default-568h@2x~iphone.png
│ │ ├── Default-667h.png
│ │ ├── Default-736h.png
│ │ ├── Default-Landscape-736h.png
│ │ ├── Default-Landscape@2x~ipad.png
│ │ ├── Default-Landscape@~ipadpro.png
│ │ ├── Default-Landscape~ipad.png
│ │ ├── Default-Portrait@2x~ipad.png
│ │ ├── Default-Portrait@~ipadpro.png
│ │ ├── Default-Portrait~ipad.png
│ │ ├── Default@2x~iphone.png
│ │ ├── Default@2x~universal~anyany.png
│ │ └── Default~iphone.png
├── splash.png
└── splash.png.md5
├── screenshots_readme
├── update_cp.png
└── update_cp_changed.png
├── src
├── app
│ ├── app.component.ts
│ ├── app.html
│ ├── app.module.ts
│ ├── app.scss
│ └── main.ts
├── assets
│ ├── icon
│ │ └── favicon.ico
│ └── imgs
│ │ └── logo.png
├── index.html
├── manifest.json
├── pages
│ └── home
│ │ ├── home.html
│ │ ├── home.scss
│ │ └── home.ts
├── service-worker.js
└── theme
│ └── variables.scss
├── tsconfig.json
├── tslint.json
└── typings
└── cordova-typings.d.ts
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | indent_style = space
8 | indent_size = 2
9 |
10 | # We recommend you to keep these unchanged
11 | end_of_line = lf
12 | charset = utf-8
13 | trim_trailing_whitespace = true
14 | insert_final_newline = true
15 |
16 | [*.md]
17 | trim_trailing_whitespace = false
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | *.log
7 | *.tmp
8 | *.tmp.*
9 | log.txt
10 | *.sublime-project
11 | *.sublime-workspace
12 | .vscode/
13 | npm-debug.log*
14 |
15 | .idea/
16 | .sourcemaps/
17 | .sass-cache/
18 | .tmp/
19 | .versions/
20 | coverage/
21 | dist/
22 | node_modules/
23 | tmp/
24 | temp/
25 | hooks/
26 | platforms/
27 | plugins/
28 | plugins/android.json
29 | plugins/ios.json
30 | www/
31 | $RECYCLE.BIN/
32 |
33 | .DS_Store
34 | Thumbs.db
35 | UserInterfaceState.xcuserstate
36 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # cordova-code-push + Ionic example
2 |
3 | Example of how to set up a basic Ionic APP with the code-push cordova plugin.
4 |
5 | ## Prepare the Ionic APP
6 |
7 | `ionic start codepush-ionic-test blank`
8 |
9 | `cd codepush-ionic-test`
10 |
11 | `ionic cordova plugin add cordova-plugin-code-push`
12 |
13 | `sudo npm install --save @ionic-native/code-push`
14 |
15 | `ionic cordova platform add ios`
16 |
17 | `ionic cordova platform add android`
18 |
19 | ## Code push set up
20 |
21 | `sudo npm install`
22 |
23 | `sudo npm install -g code-push-cli`
24 |
25 | `code-push login`
26 |
27 | > This command will open the browser and you will have to create an account with the code-push cloud services (you can use your Github, Google, Hotmail one). After successful sign-up, you must copy the token provided by the browser in the terminal.
28 |
29 | `code-push app add codepush-ionic-test-ios ios cordova`
30 |
31 | `code-push app add codepush-ionic-test-android android cordova`
32 |
33 | > It's better to add two different apps in your code-push account for each platform so you can handle them separately.
34 |
35 | **See again the deployment keys:**
36 |
37 | `code-push deployment ls codepush-ionic-test-android -k`
38 |
39 | `code-push deployment ls codepush-ionic-test-ios -k`
40 |
41 | Now set up these keys in your **config.xml**:
42 | ```xml
43 |
44 |
45 |
46 |
47 |
48 |
49 | ```
50 |
51 | Modify **src/app/app.module.ts** (to set `CodePush` as provider):
52 |
53 | ```typescript
54 | import { BrowserModule } from '@angular/platform-browser';
55 | import { ErrorHandler, NgModule } from '@angular/core';
56 | import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
57 | import { SplashScreen } from '@ionic-native/splash-screen';
58 | import { StatusBar } from '@ionic-native/status-bar';
59 |
60 | import { MyApp } from './app.component';
61 | import { HomePage } from '../pages/home/home';
62 |
63 | import { CodePush } from '@ionic-native/code-push';
64 |
65 | @NgModule({
66 | declarations: [
67 | MyApp,
68 | HomePage
69 | ],
70 | imports: [
71 | BrowserModule,
72 | IonicModule.forRoot(MyApp)
73 | ],
74 | bootstrap: [IonicApp],
75 | entryComponents: [
76 | MyApp,
77 | HomePage
78 | ],
79 | providers: [
80 | StatusBar,
81 | SplashScreen,
82 | CodePush,
83 | {provide: ErrorHandler, useClass: IonicErrorHandler}
84 | ]
85 | })
86 | export class AppModule {}
87 |
88 | ```
89 |
90 | Finally, use the plugin! Modify **src/app.component.ts** (this basic set up will show an **alert** to handle **updates**):
91 |
92 | ```typescript
93 | import { Component } from '@angular/core';
94 | import { Platform } from 'ionic-angular';
95 | import { StatusBar } from '@ionic-native/status-bar';
96 | import { SplashScreen } from '@ionic-native/splash-screen';
97 |
98 | import { HomePage } from '../pages/home/home';
99 |
100 | import { CodePush, InstallMode, SyncStatus } from '@ionic-native/code-push';
101 | import { AlertController } from 'ionic-angular/components/alert/alert-controller';
102 |
103 | @Component({
104 | templateUrl: 'app.html'
105 | })
106 | export class MyApp {
107 | rootPage:any = HomePage;
108 |
109 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen,
110 | private codePush: CodePush, private alertCtrl: AlertController) {
111 | platform.ready().then(() => {
112 | // Okay, so the platform is ready and our plugins are available.
113 | // Here you can do any higher level native things you might need.
114 | statusBar.styleDefault();
115 | splashScreen.hide();
116 | this.checkCodePush(); //Use the plugin always after platform.ready()
117 | });
118 | }
119 |
120 | checkCodePush() {
121 |
122 | this.codePush.sync({
123 | updateDialog: {
124 | appendReleaseDescription: true,
125 | descriptionPrefix: "\n\nChange log:\n"
126 | },
127 | installMode: InstallMode.IMMEDIATE
128 | }).subscribe(
129 | (data) => {
130 | console.log('CODE PUSH SUCCESSFUL: ' + data);
131 |
132 | },
133 | (err) => {
134 | console.log('CODE PUSH ERROR: ' + err);
135 |
136 | }
137 | );
138 | }
139 |
140 | }
141 | ```
142 |
143 | > **Note**: to handle more advanced code-push sync options, as creating your custom mechanism of handling updates with custom UI, etc., you should check out the [cordova code-push plugin API reference and examples](https://github.com/Microsoft/cordova-plugin-code-push#api-reference).
144 |
145 | Now, you should build your app and test it in your emulator/physical device. You will be only building it once, and then releasing the updates throw code-push.
146 |
147 | `ionic cordova build ios`
148 |
149 | `ionic cordova run ios`
150 |
151 | `ionic cordova build android`
152 |
153 | `ionic cordova run android`
154 |
155 | ## Release the updates
156 |
157 | **Each time** you modify anything in your code, you release an update like this:
158 |
159 | `ionic cordova prepare ios`
160 |
161 | `code-push release codepush-ionic-test-ios ./platforms/ios/www/ 0.0.1 --description "Your awesome change description" -d "Staging"` (the `-d` flag can be "Production" or "Staging", so you can manage and test your releases against staging APPs)
162 |
163 | `ionic cordova prepare android`
164 |
165 | `code-push release codepush-ionic-test-android ./platforms/android/app/src/main/assets/www/ 0.0.1 --description "Your awesome change description" -d "Staging"` (the `-d` flag can be "Production" or "Staging", so you can manage and test your releases against staging APPs)
166 |
167 | > :warning: The path changes from `cordova-android` 6 to 7. So in <= 6.x it's ./platforms/android/assets/www/ and and in >= 7.x it's ./platforms/android/app/src/main/assets/www/. Just check your `cordova-android` package version in the `package.json` file.
168 |
169 | > **Note**: the update will only be released for those devices matching the 0.0.1 version of your app.
170 |
171 | ### Releasing updates pro tips
172 |
173 | If you would like to release an update but not make it available until you specify it, you could release the update with the disabled mode enabled. Like this:
174 |
175 | `ionic cordova prepare android `
176 |
177 | `code-push release codepush-ionic-test-android ./platforms/android/assets/www/ 0.0.1 --description "Your awesome change description" -x true` (see the `-x` flag, that marks the release as disabled)
178 |
179 | This would send the release to the code push server, but it won't be downloable by the users. Then, whenever you want to, you would mark the release as not disabled, and thus immediately downloable, with the following command:
180 |
181 | `code-push patch codepush-ionic-test-android Staging -x false`
182 |
183 | What happens if we make a mistake in the release? We could rollback the release. This would make this release unavailable for the users, and would also make available the prior release to the one you are rollbacking available again for donwload. You can make a rollback with the following command:
184 |
185 | `code-push rollback codepush-ionic-test-android Staging`
186 |
187 | > **Note**: check out the [code-push cli README](https://github.com/Microsoft/code-push/tree/master/cli) for a more advanced use.
188 |
189 | ## Screenshots app update
190 |
191 |
192 |
193 |
--------------------------------------------------------------------------------
/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | MyApp
4 | An awesome Ionic/Cordova app.
5 | Ionic Framework Team
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "codepushtest-2",
3 | "app_id": "",
4 | "type": "ionic-angular",
5 | "integrations": {
6 | "cordova": {}
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "codepushtest-2",
3 | "version": "0.0.1",
4 | "author": "Ionic Framework",
5 | "homepage": "http://ionicframework.com/",
6 | "private": true,
7 | "scripts": {
8 | "clean": "ionic-app-scripts clean",
9 | "build": "ionic-app-scripts build",
10 | "lint": "ionic-app-scripts lint",
11 | "ionic:build": "ionic-app-scripts build",
12 | "ionic:serve": "ionic-app-scripts serve"
13 | },
14 | "dependencies": {
15 | "@angular/common": "5.0.3",
16 | "@angular/compiler": "5.0.3",
17 | "@angular/compiler-cli": "5.0.3",
18 | "@angular/core": "5.0.3",
19 | "@angular/forms": "5.0.3",
20 | "@angular/http": "5.0.3",
21 | "@angular/platform-browser": "5.0.3",
22 | "@angular/platform-browser-dynamic": "5.0.3",
23 | "@ionic-native/code-push": "^4.5.2",
24 | "@ionic-native/core": "4.4.0",
25 | "@ionic-native/splash-screen": "4.4.0",
26 | "@ionic-native/status-bar": "4.4.0",
27 | "@ionic/storage": "2.1.3",
28 | "code-push": "^2.0.4",
29 | "cordova-android": "^6.2.3",
30 | "cordova-ios": "^4.4.0",
31 | "cordova-plugin-code-push": "^1.11.0",
32 | "cordova-plugin-compat": "^1.2.0",
33 | "cordova-plugin-device": "1.1.4",
34 | "cordova-plugin-dialogs": "^2.0.1",
35 | "cordova-plugin-file": "^4.3.3",
36 | "cordova-plugin-file-transfer": "^1.6.3",
37 | "cordova-plugin-ionic-webview": "^1.1.16",
38 | "cordova-plugin-splashscreen": "^4.0.3",
39 | "cordova-plugin-whitelist": "^1.3.1",
40 | "cordova-plugin-zip": "^3.1.0",
41 | "ionic-angular": "3.9.2",
42 | "ionic-plugin-keyboard": "^2.2.1",
43 | "ionicons": "3.0.0",
44 | "rxjs": "5.5.2",
45 | "sw-toolbox": "3.6.0",
46 | "zone.js": "0.8.18"
47 | },
48 | "devDependencies": {
49 | "@ionic/app-scripts": "3.1.6",
50 | "typescript": "2.4.2"
51 | },
52 | "description": "An Ionic project",
53 | "cordova": {
54 | "plugins": {
55 | "cordova-plugin-code-push": {},
56 | "cordova-plugin-device": {},
57 | "cordova-plugin-ionic-webview": {},
58 | "cordova-plugin-splashscreen": {},
59 | "cordova-plugin-whitelist": {},
60 | "ionic-plugin-keyboard": {}
61 | },
62 | "platforms": [
63 | "android",
64 | "ios"
65 | ]
66 | }
67 | }
--------------------------------------------------------------------------------
/resources/README.md:
--------------------------------------------------------------------------------
1 | These are Cordova resources. You can replace icon.png and splash.png and run
2 | `ionic cordova resources` to generate custom icons and splash screens for your
3 | app. See `ionic cordova resources --help` for details.
4 |
5 | Cordova reference documentation:
6 |
7 | - Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
8 | - Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
9 |
--------------------------------------------------------------------------------
/resources/android/icon/drawable-hdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/icon/drawable-hdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-ldpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/icon/drawable-ldpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-mdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/icon/drawable-mdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/icon/drawable-xhdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/icon/drawable-xxhdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xxxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/icon/drawable-xxxhdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-land-hdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-land-ldpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-land-mdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-land-xhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-land-xxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-land-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-port-hdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-port-ldpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-port-mdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-port-xhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-port-xxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/android/splash/drawable-port-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/icon.png
--------------------------------------------------------------------------------
/resources/icon.png.md5:
--------------------------------------------------------------------------------
1 | 3f1bbdf1aefcb5ce7b60770ce907c68f
--------------------------------------------------------------------------------
/resources/ios/icon/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-1024.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-40.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-40@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-40@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-50.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-50@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-60.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-60@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-60@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-72.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-72@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-76.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-76@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-83.5@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-small.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-small@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon-small@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/icon/icon@2x.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-568h@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-568h@2x~iphone.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-667h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-667h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-736h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-Landscape-736h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-Landscape@2x~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape@~ipadpro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-Landscape@~ipadpro.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-Landscape~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-Portrait@2x~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait@~ipadpro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-Portrait@~ipadpro.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default-Portrait~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default@2x~iphone.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default@2x~universal~anyany.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default@2x~universal~anyany.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/ios/splash/Default~iphone.png
--------------------------------------------------------------------------------
/resources/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/resources/splash.png
--------------------------------------------------------------------------------
/resources/splash.png.md5:
--------------------------------------------------------------------------------
1 | 2412a8324a656ec5993eb50b3b293c69
--------------------------------------------------------------------------------
/screenshots_readme/update_cp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/screenshots_readme/update_cp.png
--------------------------------------------------------------------------------
/screenshots_readme/update_cp_changed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/screenshots_readme/update_cp_changed.png
--------------------------------------------------------------------------------
/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { Platform } from 'ionic-angular';
3 | import { StatusBar } from '@ionic-native/status-bar';
4 | import { SplashScreen } from '@ionic-native/splash-screen';
5 |
6 | import { HomePage } from '../pages/home/home';
7 |
8 | import { CodePush, InstallMode, SyncStatus } from '@ionic-native/code-push';
9 | import { AlertController } from 'ionic-angular/components/alert/alert-controller';
10 |
11 | @Component({
12 | templateUrl: 'app.html'
13 | })
14 | export class MyApp {
15 | rootPage:any = HomePage;
16 |
17 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen,
18 | private codePush: CodePush, private alertCtrl: AlertController) {
19 | platform.ready().then(() => {
20 | // Okay, so the platform is ready and our plugins are available.
21 | // Here you can do any higher level native things you might need.
22 | statusBar.styleDefault();
23 | splashScreen.hide();
24 | this.checkCodePush();
25 | });
26 | }
27 |
28 | checkCodePush() {
29 |
30 | this.codePush.sync({
31 | updateDialog: {
32 | appendReleaseDescription: true,
33 | descriptionPrefix: "\n\nChange log:\n"
34 | },
35 | installMode: InstallMode.IMMEDIATE
36 | }).subscribe(
37 | (data) => {
38 | console.log('CODE PUSH SUCCESSFUL: ' + data);
39 |
40 | },
41 | (err) => {
42 | console.log('CODE PUSH ERROR: ' + err);
43 |
44 | }
45 | );
46 | }
47 |
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/src/app/app.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { ErrorHandler, NgModule } from '@angular/core';
3 | import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
4 | import { SplashScreen } from '@ionic-native/splash-screen';
5 | import { StatusBar } from '@ionic-native/status-bar';
6 |
7 | import { MyApp } from './app.component';
8 | import { HomePage } from '../pages/home/home';
9 |
10 | import { CodePush } from '@ionic-native/code-push';
11 |
12 | @NgModule({
13 | declarations: [
14 | MyApp,
15 | HomePage
16 | ],
17 | imports: [
18 | BrowserModule,
19 | IonicModule.forRoot(MyApp)
20 | ],
21 | bootstrap: [IonicApp],
22 | entryComponents: [
23 | MyApp,
24 | HomePage
25 | ],
26 | providers: [
27 | StatusBar,
28 | SplashScreen,
29 | CodePush,
30 | {provide: ErrorHandler, useClass: IonicErrorHandler}
31 | ]
32 | })
33 | export class AppModule {}
34 |
--------------------------------------------------------------------------------
/src/app/app.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/theming/
2 |
3 |
4 | // App Global Sass
5 | // --------------------------------------------------
6 | // Put style rules here that you want to apply globally. These
7 | // styles are for the entire app and not just one component.
8 | // Additionally, this file can be also used as an entry point
9 | // to import other Sass files to be included in the output CSS.
10 | //
11 | // Shared Sass variables, which can be used to adjust Ionic's
12 | // default Sass variables, belong in "theme/variables.scss".
13 | //
14 | // To declare rules for a specific mode, create a child rule
15 | // for the .md, .ios, or .wp mode classes. The mode class is
16 | // automatically applied to the
element in the app.
17 |
--------------------------------------------------------------------------------
/src/app/main.ts:
--------------------------------------------------------------------------------
1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2 |
3 | import { AppModule } from './app.module';
4 |
5 | platformBrowserDynamic().bootstrapModule(AppModule);
6 |
--------------------------------------------------------------------------------
/src/assets/icon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/src/assets/icon/favicon.ico
--------------------------------------------------------------------------------
/src/assets/imgs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dellos7/example-cordova-code-push-plugin/e3748e090be56e79ce571ad995d764ae707467a2/src/assets/imgs/logo.png
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ionic App
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ionic",
3 | "short_name": "Ionic",
4 | "start_url": "index.html",
5 | "display": "standalone",
6 | "icons": [{
7 | "src": "assets/imgs/logo.png",
8 | "sizes": "512x512",
9 | "type": "image/png"
10 | }],
11 | "background_color": "#4e8ef7",
12 | "theme_color": "#4e8ef7"
13 | }
--------------------------------------------------------------------------------
/src/pages/home/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Ionic Blank
5 |
6 |
7 |
8 |
9 |
10 | The world is your oyster.
11 |
12 | If you get lost, the docs will be your guide.
13 |
14 |
15 | Hey!
16 | Heyo!!
17 | Heyoooo!!!
18 | :D
19 | Wooow!
20 |
21 |
--------------------------------------------------------------------------------
/src/pages/home/home.scss:
--------------------------------------------------------------------------------
1 | page-home {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/home/home.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { NavController } from 'ionic-angular';
3 |
4 | @Component({
5 | selector: 'page-home',
6 | templateUrl: 'home.html'
7 | })
8 | export class HomePage {
9 |
10 | constructor(public navCtrl: NavController) {
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/service-worker.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Check out https://googlechromelabs.github.io/sw-toolbox/ for
3 | * more info on how to use sw-toolbox to custom configure your service worker.
4 | */
5 |
6 |
7 | 'use strict';
8 | importScripts('./build/sw-toolbox.js');
9 |
10 | self.toolbox.options.cache = {
11 | name: 'ionic-cache'
12 | };
13 |
14 | // pre-cache our key assets
15 | self.toolbox.precache(
16 | [
17 | './build/main.js',
18 | './build/vendor.js',
19 | './build/main.css',
20 | './build/polyfills.js',
21 | 'index.html',
22 | 'manifest.json'
23 | ]
24 | );
25 |
26 | // dynamically cache any other local assets
27 | self.toolbox.router.any('/*', self.toolbox.fastest);
28 |
29 | // for any other requests go to the network, cache,
30 | // and then only use that cached resource if your user goes offline
31 | self.toolbox.router.default = self.toolbox.networkFirst;
32 |
--------------------------------------------------------------------------------
/src/theme/variables.scss:
--------------------------------------------------------------------------------
1 | // Ionic Variables and Theming. For more info, please see:
2 | // http://ionicframework.com/docs/theming/
3 |
4 | // Font path is used to include ionicons,
5 | // roboto, and noto sans fonts
6 | $font-path: "../assets/fonts";
7 |
8 |
9 | // The app direction is used to include
10 | // rtl styles in your app. For more info, please see:
11 | // http://ionicframework.com/docs/theming/rtl-support/
12 | $app-direction: ltr;
13 |
14 |
15 | @import "ionic.globals";
16 |
17 |
18 | // Shared Variables
19 | // --------------------------------------------------
20 | // To customize the look and feel of this app, you can override
21 | // the Sass variables found in Ionic's source scss files.
22 | // To view all the possible Ionic variables, see:
23 | // http://ionicframework.com/docs/theming/overriding-ionic-variables/
24 |
25 |
26 |
27 |
28 | // Named Color Variables
29 | // --------------------------------------------------
30 | // Named colors makes it easy to reuse colors on various components.
31 | // It's highly recommended to change the default colors
32 | // to match your app's branding. Ionic uses a Sass map of
33 | // colors so you can add, rename and remove colors as needed.
34 | // The "primary" color is the only required color in the map.
35 |
36 | $colors: (
37 | primary: #488aff,
38 | secondary: #32db64,
39 | danger: #f53d3d,
40 | light: #f4f4f4,
41 | dark: #222
42 | );
43 |
44 |
45 | // App iOS Variables
46 | // --------------------------------------------------
47 | // iOS only Sass variables can go here
48 |
49 |
50 |
51 |
52 | // App Material Design Variables
53 | // --------------------------------------------------
54 | // Material Design only Sass variables can go here
55 |
56 |
57 |
58 |
59 | // App Windows Variables
60 | // --------------------------------------------------
61 | // Windows only Sass variables can go here
62 |
63 |
64 |
65 |
66 | // App Theme
67 | // --------------------------------------------------
68 | // Ionic apps can have different themes applied, which can
69 | // then be future customized. This import comes last
70 | // so that the above variables are used and Ionic's
71 | // default are overridden.
72 |
73 | @import "ionic.theme.default";
74 |
75 |
76 | // Ionicons
77 | // --------------------------------------------------
78 | // The premium icon font for Ionic. For more info, please see:
79 | // http://ionicframework.com/docs/ionicons/
80 |
81 | @import "ionic.ionicons";
82 |
83 |
84 | // Fonts
85 | // --------------------------------------------------
86 |
87 | @import "roboto";
88 | @import "noto-sans";
89 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "declaration": false,
5 | "emitDecoratorMetadata": true,
6 | "experimentalDecorators": true,
7 | "lib": [
8 | "dom",
9 | "es2015"
10 | ],
11 | "module": "es2015",
12 | "moduleResolution": "node",
13 | "sourceMap": true,
14 | "target": "es5",
15 | "typeRoots": [
16 | "../node_modules/@types"
17 | ]
18 | },
19 | "include": [
20 | "src/**/*.ts"
21 | ],
22 | "exclude": [
23 | "node_modules",
24 | "src/**/*.spec.ts",
25 | "src/**/__tests__/*.ts"
26 | ],
27 | "compileOnSave": false,
28 | "atom": {
29 | "rewriteTsconfig": false
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "no-duplicate-variable": true,
4 | "no-unused-variable": [
5 | true
6 | ]
7 | },
8 | "rulesDirectory": [
9 | "node_modules/tslint-eslint-rules/dist/rules"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/typings/cordova-typings.d.ts:
--------------------------------------------------------------------------------
1 |
2 | ///
3 | ///
--------------------------------------------------------------------------------