Skip to content

Commit 4aadf21

Browse files
FENCE-2649: Add vendored xcframework (#431)
* add vendored xcframework * cleanup * cleanup * remove apple team * beta testing version * add pod_target_xcconfig search paths to podspec * update download script to build static frameworks * add static frameworks * bump beta version * prepare for release
1 parent 257705c commit 4aadf21

File tree

134 files changed

+21238
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+21238
-18
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ junit.xml
3737
lib/
3838

3939
.vscode/
40+
41+
# Do NOT ignore these - they're vendored dependencies
42+
!ios/RadarSDK.xcframework/**
43+
!ios/RadarSDKMotion.xcframework/**

Radar.podspec

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ Pod::Spec.new do |s|
1313
s.platforms = { :ios => min_ios_version_supported }
1414
s.source = { :git => "https://github.com/radarlabs/react-native-radar.git/react-native-radar.git", :tag => "#{s.version}" }
1515

16-
s.source_files = "ios/**/*.{h,m,mm,cpp}"
17-
s.private_header_files = "ios/**/*.h"
16+
s.source_files = "ios/*.{h,m,mm,cpp}"
17+
s.private_header_files = "ios/*.h"
1818

19-
s.dependency "RadarSDK", "3.25.0"
19+
s.vendored_frameworks = "ios/RadarSDK.xcframework"
20+
21+
s.pod_target_xcconfig = {
22+
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_TARGET_SRCROOT}/ios/RadarSDK.xcframework/ios-arm64" "${PODS_TARGET_SRCROOT}/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator"'
23+
}
2024

2125
install_modules_dependencies(s)
2226
end

RadarSDKMotion.podspec

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
require "json"
2+
3+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4+
5+
Pod::Spec.new do |s|
6+
s.name = "RadarSDKMotion"
7+
s.version = package["version"]
8+
s.summary = "RadarSDKMotion extension for react-native-radar"
9+
s.homepage = "https://github.com/radarlabs/react-native-radar"
10+
s.license = package["license"]
11+
s.authors = "radarlabs"
12+
13+
s.platforms = { :ios => min_ios_version_supported }
14+
s.source = { :git => "https://github.com/radarlabs/react-native-radar.git", :tag => "#{s.version}" }
15+
16+
s.source_files = "ios/RadarSDKMotionStub.swift"
17+
18+
s.vendored_frameworks = "ios/RadarSDKMotion.xcframework"
19+
20+
s.dependency "Radar", "#{s.version}"
21+
22+
install_modules_dependencies(s)
23+
end

android/src/newarch/java/com/radar/RadarModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
143143
override fun initialize(publishableKey: String, fraud: Boolean): Unit {
144144
val editor = reactApplicationContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit()
145145
editor.putString("x_platform_sdk_type", "ReactNative")
146-
editor.putString("x_platform_sdk_version", "3.24.1")
146+
editor.putString("x_platform_sdk_version", "3.30.0")
147147
editor.apply()
148148

149149
Radar.initialize(reactApplicationContext, publishableKey, radarReceiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud, null, radarInAppMessageReceiver, currentActivity)

android/src/oldarch/java/com/radar/RadarModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void initialize(String publishableKey, boolean fraud) {
102102
this.fraud = fraud;
103103
SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
104104
editor.putString("x_platform_sdk_type", "ReactNative");
105-
editor.putString("x_platform_sdk_version", "3.24.1");
105+
editor.putString("x_platform_sdk_version", "3.30.0");
106106
editor.apply();
107107
Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud, null, inAppMessageReceiver, getCurrentActivity());
108108
if (fraud) {

example/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/RNRadar.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#endif
66

77
#import <RadarSDK/RadarSDK.h>
8-
#import <RadarSDK/RadarSettings.h>
98
#import <React/RCTBridgeModule.h>
109

1110
#ifdef RCT_NEW_ARCH_ENABLED

ios/RNRadar.mm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#import <CoreLocation/CoreLocation.h>
44
#import <React/RCTConvert.h>
55

6+
static NSString *_publishableKey = nil;
7+
68
@implementation RNRadar {
79
CLLocationManager *locationManager;
810
RCTPromiseResolveBlock permissionsRequestResolver;
@@ -185,8 +187,9 @@ - (void)didUpdateToken:(RadarVerifiedLocationToken *)token {
185187
}
186188

187189
RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud) {
190+
_publishableKey = publishableKey;
188191
[[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
189-
[[NSUserDefaults standardUserDefaults] setObject:@"3.24.1" forKey:@"radar-xPlatformSDKVersion"];
192+
[[NSUserDefaults standardUserDefaults] setObject:@"3.30.0" forKey:@"radar-xPlatformSDKVersion"];
190193
[Radar initializeWithPublishableKey:publishableKey];
191194
}
192195

@@ -259,11 +262,11 @@ - (void)didUpdateToken:(RadarVerifiedLocationToken *)token {
259262
}
260263

261264
RCT_EXPORT_METHOD(getHost:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) {
262-
resolve([RadarSettings host]);
265+
resolve(@"https://api.radar.io");
263266
}
264267

265268
RCT_EXPORT_METHOD(getPublishableKey:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) {
266-
resolve([RadarSettings publishableKey]);
269+
resolve(_publishableKey);
267270
}
268271

269272
RCT_EXPORT_METHOD(getPermissionsStatus:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) {
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>RadarSDK.framework/RadarSDK</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64_x86_64-simulator</string>
12+
<key>LibraryPath</key>
13+
<string>RadarSDK.framework</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
<string>x86_64</string>
18+
</array>
19+
<key>SupportedPlatform</key>
20+
<string>ios</string>
21+
<key>SupportedPlatformVariant</key>
22+
<string>simulator</string>
23+
</dict>
24+
<dict>
25+
<key>BinaryPath</key>
26+
<string>RadarSDK.framework/RadarSDK</string>
27+
<key>LibraryIdentifier</key>
28+
<string>ios-arm64</string>
29+
<key>LibraryPath</key>
30+
<string>RadarSDK.framework</string>
31+
<key>SupportedArchitectures</key>
32+
<array>
33+
<string>arm64</string>
34+
</array>
35+
<key>SupportedPlatform</key>
36+
<string>ios</string>
37+
</dict>
38+
</array>
39+
<key>CFBundlePackageType</key>
40+
<string>XFWK</string>
41+
<key>XCFrameworkFormatVersion</key>
42+
<string>1.0</string>
43+
</dict>
44+
</plist>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//
2+
// Radar-Swift.h
3+
// RadarSDK
4+
//
5+
// Copyright © 2025 Radar Labs, Inc. All rights reserved.
6+
//
7+

0 commit comments

Comments
 (0)