@bubblsdk/react-native-sdk 3.0.5 → 3.0.7

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.
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'BubblReactNativeSdk'
3
- s.version = '3.0.5'
3
+ s.version = '3.0.7'
4
4
  s.summary = 'React Native wrapper for Bubbl SDK v3 native Android and iOS cores.'
5
5
  s.homepage = 'https://bubbl.tech'
6
6
  s.license = { :type => 'Commercial', :text => 'Copyright Bubbl. All rights reserved.' }
@@ -13,5 +13,5 @@ Pod::Spec.new do |s|
13
13
  s.static_framework = true
14
14
 
15
15
  s.dependency 'React-Core'
16
- s.dependency 'BubblSDK', '3.0.5'
16
+ s.dependency 'BubblSDK', '3.0.7'
17
17
  end
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.7
4
+
5
+ - Restyles the native SDK default notification modal on Android and iOS with a light card layout, clearer actions, and polished survey controls.
6
+ - Adds regression coverage so survey options/choices continue to survive notification payload parsing.
7
+ - Aligns the React Native wrapper with the native SDK 3.0.7 release.
8
+
9
+ ## 3.0.6
10
+
11
+ - Bridges iOS `geofenceSnapshot` events through the React Native wrapper so iOS map/campaign UIs receive the same active geofence snapshot as Android.
12
+ - Expands native geofence parsing to accept imported runtime aliases such as `locations`, `location`, `notifications`, and `curatedNotifications`.
13
+ - Aligns the React Native wrapper with the native SDK 3.0.6 release.
14
+
3
15
  ## 3.0.5
4
16
 
5
17
  - Android SDK notifications now create the shared `bubbl_notifications` channel at high importance, replacing an older lower-importance channel when possible so eligible notifications can appear as heads-up banners.
package/README.md CHANGED
@@ -18,6 +18,23 @@ import { Bubbl } from '@bubblsdk/react-native-sdk';
18
18
  await Bubbl.boot({ apiKey: '...' });
19
19
  ```
20
20
 
21
+ Enable SDK-owned location/background processing when the host app has collected
22
+ location permission:
23
+
24
+ ```ts
25
+ await Bubbl.boot({
26
+ apiKey: '...',
27
+ enableLocationTracking: true,
28
+ });
29
+
30
+ await Bubbl.startLocationTracking();
31
+ ```
32
+
33
+ The SDK owns the native background mechanics once enabled: Android uses the
34
+ bundled foreground location service and WorkManager restore/refresh path, and
35
+ iOS uses the bundled CoreLocation monitor. The host app still owns platform
36
+ declarations and runtime permission UX.
37
+
21
38
  For apps that render their own in-app notification modal while still letting
22
39
  the native SDK trigger device notifications:
23
40
 
@@ -94,4 +111,4 @@ subscription.remove();
94
111
 
95
112
  - Android depends on `tech.bubbl.sdk:bubbl-sdk` and requires `minSdkVersion 27` or higher.
96
113
  - iOS depends on the `BubblSDK` CocoaPods/Swift package release and requires iOS 15 or higher.
97
- - Host apps still need the usual platform permissions for push notifications and location tracking.
114
+ - Host apps must declare push/location permissions. Android needs coarse/fine/background location, foreground-service location, and notification permissions. iOS needs location usage descriptions and `UIBackgroundModes` entries for `location` and `remote-notification`.
@@ -4,7 +4,7 @@ plugins {
4
4
  }
5
5
 
6
6
  group = "tech.bubbl.reactnative"
7
- version = "3.0.4"
7
+ version = "3.0.7"
8
8
 
9
9
  def isNewArchitectureEnabled() {
10
10
  project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
@@ -41,6 +41,6 @@ android {
41
41
 
42
42
  dependencies {
43
43
  implementation "com.facebook.react:react-android:${reactNativeVersion}"
44
- implementation "tech.bubbl.sdk:bubbl-sdk:3.0.4"
44
+ implementation "tech.bubbl.sdk:bubbl-sdk:3.0.7"
45
45
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1"
46
46
  }
@@ -603,6 +603,48 @@ private extension BubblGeofenceTransition {
603
603
  }
604
604
  }
605
605
 
606
+ private extension BubblGeofenceVertex {
607
+ func reactMap() -> [String: Any] {
608
+ ["latitude": latitude, "longitude": longitude]
609
+ }
610
+ }
611
+
612
+ private extension BubblGeofencePolygon {
613
+ func reactMap() -> [String: Any] {
614
+ [
615
+ "campaignId": reactValue(campaignId),
616
+ "campaignName": reactValue(campaignName),
617
+ "locationId": reactValue(locationId),
618
+ "vertices": vertices.map { $0.reactMap() }
619
+ ]
620
+ }
621
+ }
622
+
623
+ private extension BubblGeofenceCircle {
624
+ func reactMap() -> [String: Any] {
625
+ [
626
+ "campaignId": reactValue(campaignId),
627
+ "campaignName": reactValue(campaignName),
628
+ "locationId": reactValue(locationId),
629
+ "center": center.reactMap(),
630
+ "radiusMeters": radiusMeters
631
+ ]
632
+ }
633
+ }
634
+
635
+ private extension BubblGeofenceSnapshot {
636
+ func reactMap() -> [String: Any] {
637
+ [
638
+ "stats": [
639
+ "campaignsTotal": stats.campaignsTotal,
640
+ "polygonsTotal": stats.polygonsTotal
641
+ ],
642
+ "polygons": polygons.map { $0.reactMap() },
643
+ "circles": circles.map { $0.reactMap() }
644
+ ]
645
+ }
646
+ }
647
+
606
648
  private extension BubblNotificationPayload {
607
649
  func reactMap() -> [String: Any] {
608
650
  [
@@ -673,6 +715,8 @@ private extension BubblEvent {
673
715
  return ["type": "notificationSurveyRequested", "payload": payload.reactMap()]
674
716
  case .locationUpdated(let location):
675
717
  return ["type": "locationUpdated", "location": location.reactMap()]
718
+ case .geofenceSnapshot(let snapshot):
719
+ return ["type": "geofenceSnapshot", "snapshot": snapshot.reactMap()]
676
720
  case .geofenceEntered(let transition):
677
721
  return ["type": "geofenceEntered", "transition": transition.reactMap()]
678
722
  case .geofenceExited(let transition):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bubblsdk/react-native-sdk",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "description": "React Native wrapper for Bubbl SDK v3 native Android and iOS cores.",
5
5
  "main": "src/index.ts",
6
6
  "module": "src/index.ts",