native-update 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Readme.md CHANGED
@@ -191,14 +191,14 @@ export class AppComponent implements OnInit {
191
191
 
192
192
  async checkAllUpdates() {
193
193
  // 1. Check live updates first (fastest)
194
- const liveUpdate = await NativeUpdate.checkForUpdate();
195
- if (liveUpdate.available) {
194
+ const liveUpdate = await NativeUpdate.sync();
195
+ if (liveUpdate.status === 'UPDATE_AVAILABLE' || liveUpdate.status === 'UPDATE_INSTALLED') {
196
196
  await this.promptLiveUpdate(liveUpdate);
197
197
  return; // Don't check native if live update is available
198
198
  }
199
199
 
200
200
  // 2. Check native updates
201
- const nativeUpdate = await NativeUpdate.checkAppUpdate();
201
+ const nativeUpdate = await NativeUpdate.getAppUpdateInfo();
202
202
  if (nativeUpdate.updateAvailable) {
203
203
  await this.promptNativeUpdate(nativeUpdate);
204
204
  }
@@ -1,17 +1,7 @@
1
- ext {
2
- compileSdkVersion = 34
3
- targetSdkVersion = 34
4
- minSdkVersion = 21
5
- androidxAppCompatVersion = '1.6.1'
6
- androidxCoreVersion = '1.13.1'
7
- androidxWorkVersion = '2.9.0'
8
- playServicesVersion = '18.2.0'
9
- playReviewVersion = '2.0.1'
10
- okhttpVersion = '4.12.0'
11
- kotlinVersion = '2.0.21'
12
- }
13
-
14
1
  buildscript {
2
+ ext {
3
+ kotlinVersion = '1.9.22'
4
+ }
15
5
  repositories {
16
6
  google()
17
7
  mavenCentral()
@@ -22,6 +12,18 @@ buildscript {
22
12
  }
23
13
  }
24
14
 
15
+ ext {
16
+ compileSdkVersion = 34
17
+ targetSdkVersion = 34
18
+ minSdkVersion = 21
19
+ androidxAppCompatVersion = '1.6.1'
20
+ androidxCoreVersion = '1.13.1'
21
+ androidxWorkVersion = '2.9.0'
22
+ playAppUpdateVersion = '2.1.0'
23
+ playReviewVersion = '2.0.1'
24
+ okhttpVersion = '4.12.0'
25
+ }
26
+
25
27
  apply plugin: 'com.android.library'
26
28
  apply plugin: 'kotlin-android'
27
29
 
@@ -67,14 +69,17 @@ dependencies {
67
69
  implementation fileTree(dir: 'libs', include: ['*.jar'])
68
70
  implementation project(':capacitor-android')
69
71
 
72
+ // Kotlin
73
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
74
+
70
75
  // AndroidX
71
76
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
72
77
  implementation "androidx.core:core-ktx:$androidxCoreVersion"
73
78
  implementation "androidx.work:work-runtime-ktx:$androidxWorkVersion"
74
79
 
75
80
  // Google Play Services
76
- implementation "com.google.android.play:app-update:$playServicesVersion"
77
- implementation "com.google.android.play:app-update-ktx:$playServicesVersion"
81
+ implementation "com.google.android.play:app-update:$playAppUpdateVersion"
82
+ implementation "com.google.android.play:app-update-ktx:$playAppUpdateVersion"
78
83
  implementation "com.google.android.play:review:$playReviewVersion"
79
84
  implementation "com.google.android.play:review-ktx:$playReviewVersion"
80
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-update",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Foundation package for building a comprehensive update system for Capacitor apps. Provides architecture and interfaces but requires backend implementation.",
5
5
  "type": "module",
6
6
  "main": "dist/plugin.cjs.js",