Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 3.24.0-beta.2
- Updates iOS sdk to 3.24.1

# 3.24.0-beta.1
- Updates iOS sdk to 3.24.0
- Adds `silentPush` initialization option to iOS

# 3.23.4-beta.2
- Changed iOS platform target to 12.0

# 3.23.4-beta.1
- Updates iOS and Android sdk to 3.23.4 and 3.23.5, respectively

# 3.23.4
- Updates iOS and Android sdk to 3.23.4 and 3.23.5, respectively
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Then, see the Flutter package documentation [here](https://radar.com/documentati

See an example app in `example/`.

## iOS Installation

For iOS projects using this plugin, if your iOS deployment target is below 15.0, you must add `use_frameworks!` to your `Podfile`:

## Support

Have questions? We're here to help! Email us at [support@radar.com](mailto:support@radar.com).
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {
minSdkVersion 16
targetSdkVersion 31
versionCode 1
versionName '3.23.4'
versionName '3.24.0-beta.2'
}
lintOptions {
disable 'InvalidPackage'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ private static void initialize(MethodCall call, Result result) {
String publishableKey = call.argument("publishableKey");
SharedPreferences.Editor editor = mContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
editor.putString("x_platform_sdk_type", "Flutter");
editor.putString("x_platform_sdk_version", "3.23.4");
editor.putString("x_platform_sdk_version", "3.24.0-beta.2");
editor.apply();
Radar.initialize(mContext, publishableKey, null, Radar.RadarLocationServicesProvider.GOOGLE, false, null, null, mActivity);
Radar.setReceiver(new RadarFlutterReceiver(channel));
Expand Down
3 changes: 3 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ app.*.map.json

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

.fvm/
.fvmrc
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>13.0</string>
<string>12.0</string>
</dict>
</plist>
5 changes: 3 additions & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '15.6'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -28,8 +28,9 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'RadarSDKMotion', '3.23.4'
pod 'RadarSDKMotion', '3.24.1'
end

post_install do |installer|
Expand Down
41 changes: 31 additions & 10 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
E0F475EE7DA180B233B26F03 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 80832F7060CA121BF7C5159A /* libPods-Runner.a */; };
E9202D87BABE3D21C4B8C9C4 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BF6B8D2FABC5D8F1A9DD5EE /* Pods_Runner.framework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -31,13 +31,13 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
0BF6B8D2FABC5D8F1A9DD5EE /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
80832F7060CA121BF7C5159A /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
87C188BC246525AC987E390D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
Expand All @@ -56,7 +56,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E0F475EE7DA180B233B26F03 /* libPods-Runner.a in Frameworks */,
E9202D87BABE3D21C4B8C9C4 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -66,7 +66,7 @@
69B467C1459EE0FA7AD9EAAD /* Frameworks */ = {
isa = PBXGroup;
children = (
80832F7060CA121BF7C5159A /* libPods-Runner.a */,
0BF6B8D2FABC5D8F1A9DD5EE /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -150,6 +150,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
717FBB0054865DEA34CA9827 /* [CP] Copy Pods Resources */,
BA45F2487E261BF5443C5B76 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -277,6 +278,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
BA45F2487E261BF5443C5B76 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -353,9 +371,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
STRIP_INSTALLED_PRODUCT = NO;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -375,7 +394,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -437,10 +456,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
STRIP_INSTALLED_PRODUCT = NO;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -486,9 +506,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
STRIP_INSTALLED_PRODUCT = NO;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -508,7 +529,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -536,7 +557,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
}

Future<void> initRadar() async {
Radar.initialize('prj_test_pk_0000000000000000000000000000000000000000');
Radar.initialize('prj_test_pk_0000000000000000000000000000000000000000', silentPush: true);
Copy link
Contributor

@ShiCheng-Lu ShiCheng-Lu Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make this initialize option a typed dictionary / object instead if those exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think dart has those, we'd have to make a class

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should make a class then, I think if we have more initialize options in the future, or if we want to expose some of the initialize options that we already have, it'll be easier to manage. maybe a non-typed dictionary can also work if we document the available options well within the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we use a class then the class would have to use the same constructor as here. if we make it non-typed we invite user error. silentPush is a named parameter here, so it's optional and they can pass it like silentPush: true. Basically a typed object without the brackets.

https://dart.dev/language/functions#named-parameters

Radar.setUserId('flutter');
Radar.setDescription('Flutter');
Radar.setMetadata({'foo': 'bar', 'bax': true, 'qux': 1});
Expand Down
7 changes: 5 additions & 2 deletions ios/Classes/RadarFlutterPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,12 @@ - (void)initialize:(FlutterMethodCall *)call withResult:(FlutterResult)result {
NSDictionary *argsDict = call.arguments;

NSString *publishableKey = argsDict[@"publishableKey"];
BOOL silentPush = argsDict[@"silentPush"];
[[NSUserDefaults standardUserDefaults] setObject:@"Flutter" forKey:@"radar-xPlatformSDKType"];
[[NSUserDefaults standardUserDefaults] setObject:@"3.23.4" forKey:@"radar-xPlatformSDKVersion"];
[Radar initializeWithPublishableKey:publishableKey];
[[NSUserDefaults standardUserDefaults] setObject:@"3.24.0-beta.2" forKey:@"radar-xPlatformSDKVersion"];
RadarInitializeOptions *options = [[RadarInitializeOptions alloc] init];
options.silentPush = silentPush;
[Radar initializeWithPublishableKey:publishableKey options:options];
result(nil);
}

Expand Down
6 changes: 3 additions & 3 deletions ios/flutter_radar.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'flutter_radar'
s.version = '3.23.4'
s.version = '3.24.0-beta.2'
s.summary = 'Flutter package for Radar, the leading geofencing and location tracking platform'
s.description = 'Flutter package for Radar, the leading geofencing and location tracking platform'
s.homepage = 'http://example.com'
Expand All @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'RadarSDK', '3.23.4'
s.platform = :ios, '15.6'
s.dependency 'RadarSDK', '3.24.1'
s.ios.deployment_target = '12.0'
s.static_framework = true

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
Expand Down
3 changes: 2 additions & 1 deletion ios/flutter_radar.podspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Pod::Spec.new do |s|
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'RadarSDK', '{{ version }}'
s.platform = :ios, '15.6'
s.platform = :ios, '12.0'
s.ios.deployment_target = '12.0'
s.static_framework = true

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
Expand Down
3 changes: 2 additions & 1 deletion lib/flutter_radar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ class Radar {
static EventsCallback? foregroundEventsCallback;
static TokenCallback? foregroundTokenCallback;

static Future initialize(String publishableKey) async {
static Future initialize(String publishableKey, {bool silentPush = false}) async {
try {
await _channel.invokeMethod('initialize', {
'publishableKey': publishableKey,
'silentPush': silentPush,
});
_channel.setMethodCallHandler(_handleMethodCall);
} on PlatformException catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_radar
description: Flutter package for Radar, the leading geofencing and location tracking platform
version: 3.23.4
version: 3.24.0-beta.2
homepage: https://github.com/radarlabs/flutter-radar

environment:
Expand Down
Loading