native-update-react-native 1.0.0 → 1.0.1

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
@@ -5,7 +5,7 @@ runs on the same Native Update account and licence as the Capacitor, Android and
5
5
 
6
6
  | | |
7
7
  |---|---|
8
- | Version | `1.0.0` |
8
+ | Version | `1.0.1` |
9
9
  | React Native | 0.80 or newer (New Architecture, TurboModule) |
10
10
  | Android | minSdk 26 |
11
11
  | iOS | not yet: the package links on Android only for now |
@@ -38,3 +38,4 @@ dependencies {
38
38
  implementation "com.google.android.play:app-update-ktx:2.1.0"
39
39
  implementation "com.google.android.play:review:2.0.2"
40
40
  }
41
+
@@ -37,7 +37,7 @@ import java.io.File
37
37
  */
38
38
  public object NativeUpdate {
39
39
  /** This SDK's version, sent as `X-Sdk-Version`. Must equal the Gradle `VERSION_NAME` (checked by the build). */
40
- public const val SDK_VERSION: String = "1.0.0"
40
+ public const val SDK_VERSION: String = "1.0.1"
41
41
 
42
42
  private const val TAG = "NativeUpdate"
43
43
 
@@ -65,6 +65,8 @@ internal class UpdateClient(
65
65
  }
66
66
  } catch (failure: IOException) {
67
67
  throw NativeUpdateException(ErrorCodes.NETWORK_ERROR, "Update check failed: ${failure.javaClass.simpleName}", failure)
68
+ } catch (failure: SecurityException) {
69
+ throw NativeUpdateException(ErrorCodes.NETWORK_ERROR, "Update check blocked: the app lacks the INTERNET permission", failure)
68
70
  }
69
71
  return parseCheck(body)
70
72
  }
@@ -105,6 +107,9 @@ internal class UpdateClient(
105
107
  } catch (failure: IOException) {
106
108
  destination.delete()
107
109
  throw NativeUpdateException(ErrorCodes.DOWNLOAD_ERROR, "Download stopped: ${failure.javaClass.simpleName}", failure)
110
+ } catch (failure: SecurityException) {
111
+ destination.delete()
112
+ throw NativeUpdateException(ErrorCodes.DOWNLOAD_ERROR, "Download blocked: the app lacks the INTERNET permission", failure)
108
113
  } catch (failure: NativeUpdateException) {
109
114
  destination.delete()
110
115
  throw failure
@@ -21,7 +21,7 @@ import com.aoneahsan.nativeupdate.android.NativeUpdateConfig
21
21
  */
22
22
  object NativeUpdateReactNative {
23
23
  /** This package's version, sent as X-Sdk-Version. Kept equal to package.json by the package's version check. */
24
- const val VERSION: String = "1.0.0"
24
+ const val VERSION: String = "1.0.1"
25
25
 
26
26
  /** File name of the JavaScript bundle inside an update ZIP (Metro's default for Android). */
27
27
  const val BUNDLE_FILE: String = "index.android.bundle"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-update-react-native",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Signed over-the-air JavaScript bundle updates, Play in-app update and in-app review for React Native apps, on Native Update.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",