react-native-radar 4.33.0 → 4.35.0

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.
Files changed (50) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/radar/RadarModuleImpl.java +28 -0
  3. package/android/src/newarch/java/com/radar/RadarModule.kt +49 -2
  4. package/android/src/oldarch/java/com/radar/RadarModule.java +30 -2
  5. package/dist/@types/RadarNativeInterface.d.ts +5 -0
  6. package/dist/NativeRadar.d.ts +5 -0
  7. package/dist/helpers.d.ts +1 -0
  8. package/dist/helpers.js +3 -1
  9. package/dist/index.native.js +15 -0
  10. package/dist/ui/map.jsx +32 -4
  11. package/dist/version.d.ts +1 -1
  12. package/dist/version.js +1 -1
  13. package/ios/RNRadar.h +3 -2
  14. package/ios/RNRadar.mm +38 -2
  15. package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Headers/Radar.h +3 -4
  16. package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Headers/RadarSDK-Swift.h +1 -1
  17. package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Headers/RadarSdkConfiguration.h +1 -0
  18. package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Info.plist +0 -0
  19. package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios.abi.json +1447 -88
  20. package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +36 -2
  21. package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  22. package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios.swiftinterface +36 -2
  23. package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/RadarSDK +0 -0
  24. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Headers/Radar.h +3 -4
  25. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Headers/RadarSDK-Swift.h +2 -2
  26. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Headers/RadarSdkConfiguration.h +1 -0
  27. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Info.plist +0 -0
  28. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1447 -88
  29. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +36 -2
  30. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  31. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +36 -2
  32. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1447 -88
  33. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +36 -2
  34. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  35. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +36 -2
  36. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/RadarSDK +0 -0
  37. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/_CodeSignature/CodeDirectory +0 -0
  38. package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/_CodeSignature/CodeResources +27 -27
  39. package/ios/RadarSDKMotion.xcframework/Info.plist +5 -5
  40. package/ios/RadarSDKMotion.xcframework/ios-arm64/RadarSDKMotion.framework/Info.plist +0 -0
  41. package/ios/RadarSDKMotion.xcframework/ios-arm64_x86_64-simulator/RadarSDKMotion.framework/Info.plist +0 -0
  42. package/ios/RadarSDKMotion.xcframework/ios-arm64_x86_64-simulator/RadarSDKMotion.framework/_CodeSignature/CodeDirectory +0 -0
  43. package/ios/RadarSDKMotion.xcframework/ios-arm64_x86_64-simulator/RadarSDKMotion.framework/_CodeSignature/CodeResources +1 -1
  44. package/package.json +1 -1
  45. package/src/@types/RadarNativeInterface.ts +5 -0
  46. package/src/NativeRadar.ts +5 -0
  47. package/src/helpers.js +5 -1
  48. package/src/index.native.ts +15 -0
  49. package/src/ui/map.jsx +32 -4
  50. package/src/version.ts +1 -1
@@ -1,7 +1,7 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.3.2 (swiftlang-6.3.2.1.108 clang-2100.1.1.101)
2
+ // swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)
3
3
  // swift-module-flags: -target x86_64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name RadarSDK
4
- // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.2
4
+ // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
5
5
  import CoreLocation
6
6
  import CoreTelephony
7
7
  import Foundation
@@ -58,9 +58,43 @@ extension RadarSDK.RadarLogType : Swift.Codable {
58
58
  @objc public static func rollbackSyncState()
59
59
  @objc public static func markDwellFired(_ geofenceId: Swift.String)
60
60
  @objc public static func getObjCBeacons(for location: _LocationEssentials.CLLocation) -> [RadarSDK.RadarBeacon]
61
+ public static func getSyncedRegion() -> CoreLocation.CLCircularRegion?
62
+ public static func getSyncedGeofences() -> [RadarSDK.RadarSyncedGeofenceSnapshot]
63
+ public static func getSyncedPlaces() -> [RadarSDK.RadarSyncedPlaceSnapshot]
64
+ public static func getSyncedBeacons() -> [RadarSDK.RadarSyncedBeaconSnapshot]
61
65
  @objc override dynamic public init()
62
66
  @objc deinit
63
67
  }
68
+ public struct RadarSyncedGeofenceSnapshot {
69
+ public let id: Swift.String
70
+ public let description: Swift.String
71
+ public let tag: Swift.String?
72
+ public let externalId: Swift.String?
73
+ public let geometry: RadarSDK.RadarSyncedGeofenceSnapshot.Geometry
74
+ public enum Geometry {
75
+ case circle(center: _LocationEssentials.CLLocationCoordinate2D, radius: Swift.Double)
76
+ case polygon(coordinates: [_LocationEssentials.CLLocationCoordinate2D], center: _LocationEssentials.CLLocationCoordinate2D, radius: Swift.Double)
77
+ public var center: _LocationEssentials.CLLocationCoordinate2D {
78
+ get
79
+ }
80
+ }
81
+ }
82
+ public struct RadarSyncedPlaceSnapshot {
83
+ public let id: Swift.String
84
+ public let name: Swift.String
85
+ public let categories: [Swift.String]
86
+ public let group: Swift.String?
87
+ public let location: _LocationEssentials.CLLocationCoordinate2D
88
+ }
89
+ public struct RadarSyncedBeaconSnapshot {
90
+ public let id: Swift.String
91
+ public let description: Swift.String?
92
+ public let tag: Swift.String?
93
+ public let uuid: Swift.String
94
+ public let major: Swift.String
95
+ public let minor: Swift.String
96
+ public let location: _LocationEssentials.CLLocationCoordinate2D?
97
+ }
64
98
  @objc(RadarInAppMessage_Swift) @objcMembers final public class RadarInAppMessage_Swift : RadarSDK.RadarInAppMessage {
65
99
  public struct Text : Swift.Sendable {
66
100
  public var text: Swift.String
@@ -1,7 +1,7 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.3.2 (swiftlang-6.3.2.1.108 clang-2100.1.1.101)
2
+ // swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)
3
3
  // swift-module-flags: -target x86_64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name RadarSDK
4
- // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.2
4
+ // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
5
5
  import CoreLocation
6
6
  import CoreTelephony
7
7
  import Foundation
@@ -58,9 +58,43 @@ extension RadarSDK.RadarLogType : Swift.Codable {
58
58
  @objc public static func rollbackSyncState()
59
59
  @objc public static func markDwellFired(_ geofenceId: Swift.String)
60
60
  @objc public static func getObjCBeacons(for location: _LocationEssentials.CLLocation) -> [RadarSDK.RadarBeacon]
61
+ public static func getSyncedRegion() -> CoreLocation.CLCircularRegion?
62
+ public static func getSyncedGeofences() -> [RadarSDK.RadarSyncedGeofenceSnapshot]
63
+ public static func getSyncedPlaces() -> [RadarSDK.RadarSyncedPlaceSnapshot]
64
+ public static func getSyncedBeacons() -> [RadarSDK.RadarSyncedBeaconSnapshot]
61
65
  @objc override dynamic public init()
62
66
  @objc deinit
63
67
  }
68
+ public struct RadarSyncedGeofenceSnapshot {
69
+ public let id: Swift.String
70
+ public let description: Swift.String
71
+ public let tag: Swift.String?
72
+ public let externalId: Swift.String?
73
+ public let geometry: RadarSDK.RadarSyncedGeofenceSnapshot.Geometry
74
+ public enum Geometry {
75
+ case circle(center: _LocationEssentials.CLLocationCoordinate2D, radius: Swift.Double)
76
+ case polygon(coordinates: [_LocationEssentials.CLLocationCoordinate2D], center: _LocationEssentials.CLLocationCoordinate2D, radius: Swift.Double)
77
+ public var center: _LocationEssentials.CLLocationCoordinate2D {
78
+ get
79
+ }
80
+ }
81
+ }
82
+ public struct RadarSyncedPlaceSnapshot {
83
+ public let id: Swift.String
84
+ public let name: Swift.String
85
+ public let categories: [Swift.String]
86
+ public let group: Swift.String?
87
+ public let location: _LocationEssentials.CLLocationCoordinate2D
88
+ }
89
+ public struct RadarSyncedBeaconSnapshot {
90
+ public let id: Swift.String
91
+ public let description: Swift.String?
92
+ public let tag: Swift.String?
93
+ public let uuid: Swift.String
94
+ public let major: Swift.String
95
+ public let minor: Swift.String
96
+ public let location: _LocationEssentials.CLLocationCoordinate2D?
97
+ }
64
98
  @objc(RadarInAppMessage_Swift) @objcMembers final public class RadarInAppMessage_Swift : RadarSDK.RadarInAppMessage {
65
99
  public struct Text : Swift.Sendable {
66
100
  public var text: Swift.String
@@ -6,7 +6,7 @@
6
6
  <dict>
7
7
  <key>Headers/Radar.h</key>
8
8
  <data>
9
- 5rPICzdoyToRhSkhFN3XilZNp1Q=
9
+ jWUMGVwVVk4aiJayQP0LOLnud3A=
10
10
  </data>
11
11
  <key>Headers/RadarAddress.h</key>
12
12
  <data>
@@ -118,7 +118,7 @@
118
118
  </data>
119
119
  <key>Headers/RadarSDK-Swift.h</key>
120
120
  <data>
121
- kcKPOY1MyG8/6ANb5mBUIBhzoO8=
121
+ zmtugidwns6tpyrjNbpWiXMiEHs=
122
122
  </data>
123
123
  <key>Headers/RadarSDK.h</key>
124
124
  <data>
@@ -130,7 +130,7 @@
130
130
  </data>
131
131
  <key>Headers/RadarSdkConfiguration.h</key>
132
132
  <data>
133
- 4JcEZd1dn7TPdFzB9tQpvHIjj0g=
133
+ gCMKzGV+Wayq4nkJ/UT7zEKjmi4=
134
134
  </data>
135
135
  <key>Headers/RadarSegment.h</key>
136
136
  <data>
@@ -174,47 +174,47 @@
174
174
  </data>
175
175
  <key>Info.plist</key>
176
176
  <data>
177
- CyXIOlBk6Hbsm+mvd6FRvEHfLIs=
177
+ Elr8yEwQskHvXy5uU6mUOyW2nnE=
178
178
  </data>
179
179
  <key>Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
180
180
  <data>
181
- 3QovnEBl6opRQH4Wb4j3jGXlQQo=
181
+ Mkt29H4ZpsTxDWKj/tgOnXIXI4o=
182
182
  </data>
183
183
  <key>Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
184
184
  <data>
185
- 9Yfnadofj1NfYcl3hWfNZ9mcxi0=
185
+ b9n6cHXRKMnGznNk5/b/U1o6yng=
186
186
  </data>
187
187
  <key>Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
188
188
  <data>
189
- rLumBPT/Cjw0F0574EAL8DLOuqk=
189
+ 1Qombolnmeft3T1jV7I9YSKVV7c=
190
190
  </data>
191
191
  <key>Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
192
192
  <data>
193
- 9Yfnadofj1NfYcl3hWfNZ9mcxi0=
193
+ b9n6cHXRKMnGznNk5/b/U1o6yng=
194
194
  </data>
195
195
  <key>Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
196
196
  <data>
197
- cItqlzkovc3FxfcoLSF4AH7NEzY=
197
+ HGdY+wwHEKVnhjqYSohhcnROMBo=
198
198
  </data>
199
199
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
200
200
  <data>
201
- 3QovnEBl6opRQH4Wb4j3jGXlQQo=
201
+ Mkt29H4ZpsTxDWKj/tgOnXIXI4o=
202
202
  </data>
203
203
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
204
204
  <data>
205
- aohLAHkJZFq3ssLa6sLEruZO9eY=
205
+ n26May5sb5KitSBw52JWUAMjGDI=
206
206
  </data>
207
207
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
208
208
  <data>
209
- xaks/6l3PbK7VPMXd19zS8lFMx8=
209
+ 2HRnLSt/2qpGDcZL97+XkYpp2kk=
210
210
  </data>
211
211
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
212
212
  <data>
213
- aohLAHkJZFq3ssLa6sLEruZO9eY=
213
+ n26May5sb5KitSBw52JWUAMjGDI=
214
214
  </data>
215
215
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
216
216
  <data>
217
- CH/veN7YgY1fTv7wemEQH/8bkrI=
217
+ zMzDYtDZ9LMaqROzSIKtgH8Vw3s=
218
218
  </data>
219
219
  <key>Modules/module.modulemap</key>
220
220
  <data>
@@ -231,7 +231,7 @@
231
231
  <dict>
232
232
  <key>hash2</key>
233
233
  <data>
234
- 2C2Gn3PE7nMUxnn30tlogXPexoO5sBdg8CbdXhQOu34=
234
+ cMm5iwmhsMQiIx2pwmnU+uG/zKn4/xrXlqxQ5d/QKKM=
235
235
  </data>
236
236
  </dict>
237
237
  <key>Headers/RadarAddress.h</key>
@@ -427,7 +427,7 @@
427
427
  <dict>
428
428
  <key>hash2</key>
429
429
  <data>
430
- n4OkQnEtGdSAnEHmzJcW2bmXu3FEs3gf3nk9aPdtv1Y=
430
+ wL1xDJGOvS6QYC6irgf9/b2R8YW+bEtvA5TanPzyn6I=
431
431
  </data>
432
432
  </dict>
433
433
  <key>Headers/RadarSDK.h</key>
@@ -448,7 +448,7 @@
448
448
  <dict>
449
449
  <key>hash2</key>
450
450
  <data>
451
- ZnM8RbfUu44iiTLszOwkKNxR7E70gWyGi9TowvBRjEE=
451
+ jHjMq7zcA5UjTrcK9sf/EN6u6KsbeYr2TNoFeRZRsmI=
452
452
  </data>
453
453
  </dict>
454
454
  <key>Headers/RadarSegment.h</key>
@@ -525,70 +525,70 @@
525
525
  <dict>
526
526
  <key>hash2</key>
527
527
  <data>
528
- EcfHJflaMb6pWCS2rzPDUo1UyCidJzXAH57Rt5EW0+8=
528
+ hbMFnzt/6VJvBNCJsVuP99cPjQZemWUjN06vXx65Klk=
529
529
  </data>
530
530
  </dict>
531
531
  <key>Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
532
532
  <dict>
533
533
  <key>hash2</key>
534
534
  <data>
535
- 0nea0ENBwmm8oNdrOxQMY/1sNXOL9d67vuwWMA9hLHs=
535
+ XovTehTILb2ptV2bYza2ByvjiG2RnVYBlDwXQxkd9Io=
536
536
  </data>
537
537
  </dict>
538
538
  <key>Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
539
539
  <dict>
540
540
  <key>hash2</key>
541
541
  <data>
542
- HTtY/8vaD7hRqXWwa8rtA6/JemUU6p6BTup66KQjSZ0=
542
+ 1WcthKM95qkCFXKQgpa8t4Ko/CaMaVbLCOaPZAODk84=
543
543
  </data>
544
544
  </dict>
545
545
  <key>Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
546
546
  <dict>
547
547
  <key>hash2</key>
548
548
  <data>
549
- 0nea0ENBwmm8oNdrOxQMY/1sNXOL9d67vuwWMA9hLHs=
549
+ XovTehTILb2ptV2bYza2ByvjiG2RnVYBlDwXQxkd9Io=
550
550
  </data>
551
551
  </dict>
552
552
  <key>Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
553
553
  <dict>
554
554
  <key>hash2</key>
555
555
  <data>
556
- D1HjgitEAA/B8X3nN6f94rgL4fToaZe3oQavU9nVcto=
556
+ 7UcH8hxfXfOSosvOVu7gW44O03UkTF1FOitkaOOIXF0=
557
557
  </data>
558
558
  </dict>
559
559
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
560
560
  <dict>
561
561
  <key>hash2</key>
562
562
  <data>
563
- EcfHJflaMb6pWCS2rzPDUo1UyCidJzXAH57Rt5EW0+8=
563
+ hbMFnzt/6VJvBNCJsVuP99cPjQZemWUjN06vXx65Klk=
564
564
  </data>
565
565
  </dict>
566
566
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
567
567
  <dict>
568
568
  <key>hash2</key>
569
569
  <data>
570
- P3GHZQBmf7gC4BgGLAufrL0+5T8s9MsL0be1tKBH5HE=
570
+ k1qKXam1YS4YYb52DeYMdmjCxLCqIE0joBVqHaI+iC0=
571
571
  </data>
572
572
  </dict>
573
573
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
574
574
  <dict>
575
575
  <key>hash2</key>
576
576
  <data>
577
- gyU/QKF7OC59CqohFpdpfr3QCPYK9fs5F6zZLw7mjw0=
577
+ DipKar8KvTZNv7CbVd8G7wT06b24/PnM/DGDBMN3wTU=
578
578
  </data>
579
579
  </dict>
580
580
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
581
581
  <dict>
582
582
  <key>hash2</key>
583
583
  <data>
584
- P3GHZQBmf7gC4BgGLAufrL0+5T8s9MsL0be1tKBH5HE=
584
+ k1qKXam1YS4YYb52DeYMdmjCxLCqIE0joBVqHaI+iC0=
585
585
  </data>
586
586
  </dict>
587
587
  <key>Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
588
588
  <dict>
589
589
  <key>hash2</key>
590
590
  <data>
591
- q95jKjPhFBkyxrYz6H2gj35X0FqFZG40gVJrUEcS1pk=
591
+ 9iAHbqZnR4/WeiuNgaKkBEtHn/zvI0/nOqw6Bs64Qn0=
592
592
  </data>
593
593
  </dict>
594
594
  <key>Modules/module.modulemap</key>
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>RadarSDKMotion.framework/RadarSDKMotion</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64</string>
11
+ <string>ios-arm64_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>RadarSDKMotion.framework</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
+ <string>x86_64</string>
17
18
  </array>
18
19
  <key>SupportedPlatform</key>
19
20
  <string>ios</string>
21
+ <key>SupportedPlatformVariant</key>
22
+ <string>simulator</string>
20
23
  </dict>
21
24
  <dict>
22
25
  <key>BinaryPath</key>
23
26
  <string>RadarSDKMotion.framework/RadarSDKMotion</string>
24
27
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_x86_64-simulator</string>
28
+ <string>ios-arm64</string>
26
29
  <key>LibraryPath</key>
27
30
  <string>RadarSDKMotion.framework</string>
28
31
  <key>SupportedArchitectures</key>
29
32
  <array>
30
33
  <string>arm64</string>
31
- <string>x86_64</string>
32
34
  </array>
33
35
  <key>SupportedPlatform</key>
34
36
  <string>ios</string>
35
- <key>SupportedPlatformVariant</key>
36
- <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>
@@ -10,7 +10,7 @@
10
10
  </data>
11
11
  <key>Info.plist</key>
12
12
  <data>
13
- SSqCoYVv0RMtxbonOnjBGDDjwn0=
13
+ dM/AUMmvosO4MV8UdIfx26HDhfM=
14
14
  </data>
15
15
  <key>Modules/module.modulemap</key>
16
16
  <data>
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "React Native module for Radar, the leading geofencing and location tracking platform",
4
4
  "homepage": "https://radar.com",
5
5
  "license": "Apache-2.0",
6
- "version": "4.33.0",
6
+ "version": "4.35.0",
7
7
  "main": "dist/index.js",
8
8
  "files": [
9
9
  "dist",
@@ -67,6 +67,10 @@ export interface RadarNativeInterface {
67
67
  removeTags: (tags: string[]) => void;
68
68
  setProduct(product: string): void;
69
69
  getProduct: () => Promise<string>;
70
+ setUserLanguage: (language: string | null) => void;
71
+ getUserLanguage: () => Promise<string | null>;
72
+ isSharing: () => Promise<boolean>;
73
+ clearSharing: () => void;
70
74
  setAnonymousTrackingEnabled: (enabled: boolean) => void;
71
75
  getPermissionsStatus: () => Promise<RadarPermissionsStatus>;
72
76
  requestPermissions: (background: boolean) => Promise<RadarPermissionsStatus>;
@@ -147,4 +151,5 @@ export interface RadarNativeInterface {
147
151
  onInAppMessageClicked: (callback: RadarInAppMessageClickedCallback | null) => void;
148
152
  getHost: () => Promise<string>;
149
153
  getPublishableKey: () => Promise<string>;
154
+ getMobileOrigin: () => Promise<string>;
150
155
  }
@@ -61,6 +61,10 @@ export interface Spec extends TurboModule {
61
61
  removeTags(tags: Array<string>): void;
62
62
  setProduct(product: string): void;
63
63
  getProduct(): Promise<string>;
64
+ setUserLanguage(language: string | null): void;
65
+ getUserLanguage(): Promise<string>;
66
+ isSharing(): Promise<boolean>;
67
+ clearSharing(): void;
64
68
  setAnonymousTrackingEnabled(enabled: boolean): void;
65
69
  getLocation(desiredAccuracy: string | null): Promise<Object>;
66
70
  trackVerified(trackVerifiedOptions: Object | null): Promise<Object>;
@@ -103,6 +107,7 @@ export interface Spec extends TurboModule {
103
107
  nativeSdkVersion(): Promise<string>;
104
108
  getHost(): Promise<string>;
105
109
  getPublishableKey(): Promise<string>;
110
+ getMobileOrigin(): Promise<string>;
106
111
  showInAppMessage(inAppMessage: Object): void;
107
112
  setPushNotificationToken(token: string): void;
108
113
  isInitialized(): Promise<boolean>;
package/src/helpers.js CHANGED
@@ -8,4 +8,8 @@ const getPublishableKey = () => (
8
8
  Radar.getPublishableKey()
9
9
  );
10
10
 
11
- export { getHost, getPublishableKey };
11
+ const getMobileOrigin = () => (
12
+ Radar.getMobileOrigin()
13
+ );
14
+
15
+ export { getHost, getPublishableKey, getMobileOrigin };
@@ -387,6 +387,18 @@ const Radar: RadarNativeInterface = {
387
387
  getProduct: function (): Promise<string> {
388
388
  return NativeRadar.getProduct();
389
389
  },
390
+ setUserLanguage: function (language: string | null): void {
391
+ return NativeRadar.setUserLanguage(language);
392
+ },
393
+ getUserLanguage: function (): Promise<string | null> {
394
+ return NativeRadar.getUserLanguage();
395
+ },
396
+ isSharing: function (): Promise<boolean> {
397
+ return NativeRadar.isSharing();
398
+ },
399
+ clearSharing: function (): void {
400
+ return NativeRadar.clearSharing();
401
+ },
390
402
  setAnonymousTrackingEnabled: function (enabled: boolean): void {
391
403
  return NativeRadar.setAnonymousTrackingEnabled(enabled);
392
404
  },
@@ -570,6 +582,9 @@ const Radar: RadarNativeInterface = {
570
582
  getPublishableKey: function (): Promise<string> {
571
583
  return NativeRadar.getPublishableKey();
572
584
  },
585
+ getMobileOrigin: function (): Promise<string> {
586
+ return NativeRadar.getMobileOrigin();
587
+ },
573
588
  isInitialized: function (): Promise<boolean> {
574
589
  return NativeRadar.isInitialized();
575
590
  },
package/src/ui/map.jsx CHANGED
@@ -1,23 +1,26 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { View, Image } from 'react-native';
3
3
  import Radar from '../index.native';
4
- import { getHost, getPublishableKey } from '../helpers';
4
+ import { getHost, getPublishableKey, getMobileOrigin } from '../helpers';
5
5
  import styles from './styles';
6
6
 
7
7
  let MapLibreGL;
8
8
  let MapLibreMap;
9
9
  let GeoJSONSource;
10
10
  let Layer;
11
+ let TransformRequestManager;
11
12
  try {
12
13
  MapLibreGL = require('@maplibre/maplibre-react-native');
13
14
  MapLibreMap = MapLibreGL.Map;
14
15
  GeoJSONSource = MapLibreGL.GeoJSONSource;
15
16
  Layer = MapLibreGL.Layer;
17
+ TransformRequestManager = MapLibreGL.TransformRequestManager;
16
18
  } catch (e) {
17
19
  MapLibreGL = null;
18
20
  MapLibreMap = null;
19
21
  GeoJSONSource = null;
20
22
  Layer = null;
23
+ TransformRequestManager = null;
21
24
  }
22
25
 
23
26
  const DEFAULT_STYLE = 'radar-default-v1';
@@ -49,10 +52,35 @@ const RadarMap = ({ mapOptions, children }) => {
49
52
  const [userLocation, setUserLocation] = useState(null);
50
53
 
51
54
  useEffect(() => {
52
- createStyleURL(mapOptions?.mapStyle || DEFAULT_STYLE).then((result) => {
55
+ const setup = async () => {
56
+ const host = await getHost();
57
+
58
+ if (TransformRequestManager) {
59
+ try {
60
+ const mobileOrigin = await getMobileOrigin();
61
+ if (mobileOrigin) {
62
+ const mapHostPattern = `${host
63
+ .replace(/^https?:\/\//, '')
64
+ .replace(/\./g, '\\.')}/maps/`;
65
+ TransformRequestManager.addHeader({
66
+ id: 'radar-mobile-origin',
67
+ name: 'X-Radar-Mobile-Origin',
68
+ value: mobileOrigin,
69
+ match: mapHostPattern,
70
+ });
71
+ }
72
+ } catch (err) {
73
+ // eslint-disable-next-line no-console
74
+ console.warn(`Radar SDK: Failed to set mobile origin header: ${err}`);
75
+ }
76
+ }
77
+
78
+ const result = await createStyleURL(mapOptions?.mapStyle || DEFAULT_STYLE);
53
79
  setStyleURL(result);
54
- });
55
- }, [mapOptions]);
80
+ };
81
+
82
+ setup();
83
+ }, [mapOptions?.mapStyle]);
56
84
 
57
85
  useEffect(() => {
58
86
  Radar.getLocation().then((result) => {
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file contains the version of the react-native-radar package
2
2
  // It should be updated to match the version in package.json
3
- export const VERSION = '4.33.0';
3
+ export const VERSION = '4.35.0';