@bubblsdk/react-native-sdk 5.0.0-alpha.1 → 5.0.0-alpha.2
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/CHANGELOG.md +5 -1
- package/android/build.gradle +1 -1
- package/ios-extension/Sources/BubblCore/BubblVersion.swift +1 -1
- package/ios-sdk/BubblCore/BubblVersion.swift +1 -1
- package/ios-sdk/BubblSDK/Bubbl.swift +2 -2
- package/ios-sdk/BubblSDK/BubblPermissions.swift +3 -1
- package/ios-sdk/BubblSDK/Engine/SupportedBubbl.swift +3 -1
- package/ios-sdk/BubblSDK/Permissions/PermissionFlow.swift +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 5.0.0-alpha.2
|
|
4
|
+
|
|
5
|
+
- `Bubbl.permissions.openSettings()` now works before `Bubbl.start` on Android, so an app can send people to its settings page (for example after a camera refusal) before it starts Bubbl. iOS 17+ already did. Below the minimum OS it stays a no-op.
|
|
6
|
+
|
|
7
|
+
## 5.0.0-alpha.1
|
|
4
8
|
|
|
5
9
|
- New v5 wrapper, replacing the 4.x one: a TurboModule (React Native 0.76+, New Architecture)
|
|
6
10
|
with the public API of docs/PUBLIC_API.md — `start(apiKey, options)`, consent and privacy,
|
package/android/build.gradle
CHANGED
|
@@ -45,5 +45,5 @@ repositories {
|
|
|
45
45
|
dependencies {
|
|
46
46
|
implementation "com.facebook.react:react-android"
|
|
47
47
|
// The Bubbl Android SDK, the same version as this package (stamped by scripts/sync-version.mjs).
|
|
48
|
-
implementation "tech.bubbl.sdk:bubbl-sdk:5.0.0-alpha.
|
|
48
|
+
implementation "tech.bubbl.sdk:bubbl-sdk:5.0.0-alpha.2"
|
|
49
49
|
}
|
|
@@ -12,8 +12,8 @@ import BubblCore
|
|
|
12
12
|
///
|
|
13
13
|
/// Bubbl.start(apiKey: "pk_live_…", options: BubblOptions(baseUrl: "https://…"))
|
|
14
14
|
///
|
|
15
|
-
/// Every call is safe from any thread. Calls before `start` do nothing (and log a warning)
|
|
16
|
-
/// never stops the app: a mistake (an empty key, an http:// URL) is logged, not thrown.
|
|
15
|
+
/// Every call is safe from any thread. Calls before `start` do nothing (and log a warning), except
|
|
16
|
+
/// `permissions.openSettings()`, which needs nothing of Bubbl's. Bubbl never stops the app: a mistake (an empty key, an http:// URL) is logged, not thrown.
|
|
17
17
|
///
|
|
18
18
|
/// Bubbl works on iOS 17 and later. An app supporting older versions can still include it: on
|
|
19
19
|
/// those phones `isSupported` is false and every call does nothing (see `isSupported`).
|
|
@@ -66,7 +66,9 @@ public struct BubblPermissions: Sendable {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
/// The app's page in the system's Settings
|
|
69
|
+
/// The app's page in the system's Settings, for a permission the user refused (one of the app's
|
|
70
|
+
/// own, like the camera, too). Works before `Bubbl.start`: it needs nothing of Bubbl's. Opens on
|
|
71
|
+
/// the main thread, whichever thread this is called from.
|
|
70
72
|
public func openSettings() {
|
|
71
73
|
Bubbl.backend.openSettings()
|
|
72
74
|
}
|
|
@@ -229,9 +229,11 @@ struct SupportedBubbl: BubblBackend {
|
|
|
229
229
|
#endif
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
/// No engine needed, so no `start` check: an app can send the user to its settings page before
|
|
233
|
+
/// starting Bubbl.
|
|
232
234
|
func openSettings() {
|
|
233
235
|
#if os(iOS)
|
|
234
|
-
Task { @MainActor in PermissionFlow.
|
|
236
|
+
Task { @MainActor in PermissionFlow.openSettings() }
|
|
235
237
|
#endif
|
|
236
238
|
}
|
|
237
239
|
|
|
@@ -89,7 +89,9 @@ final class PermissionFlow: NSObject, CLLocationManagerDelegate {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
/// Static: opening the app's settings page needs none of the flow's state (no location manager),
|
|
93
|
+
/// so it can run before `Bubbl.start`.
|
|
94
|
+
static func openSettings() {
|
|
93
95
|
guard let url = URL(string: UIApplication.openSettingsURLString) else { return }
|
|
94
96
|
UIApplication.shared.open(url)
|
|
95
97
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bubblsdk/react-native-sdk",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.2",
|
|
4
4
|
"description": "Bubbl for React Native: geofenced and scheduled notifications, surveys and analytics, over the native Bubbl SDKs.",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/module/index.js",
|