radarlabs / radar-sdk-ios Goto Github PK
View Code? Open in Web Editor NEWiOS SDK for Radar, the leading geofencing and location tracking platform
Home Page: https://radar.com
License: Apache License 2.0
iOS SDK for Radar, the leading geofencing and location tracking platform
Home Page: https://radar.com
License: Apache License 2.0
Hi,
I am tryna track foreground location using Radar.trackOnce(completionHandler: { (status: RadarStatus, location: CLLocation?, events: [RadarEvent]?, user: RadarUser?) in
and user.events
, user?.geofences
are empty even after adding a geofence using the dashboard. I made sure that my Test Publishable is correctly set in Applegate.
What am I missing?
Thanks
Seems the Radar SDK is using APIs not available on iOS 8 and 9.
iOS 8 devices are crashing with the following exception:
Fatal Exception: NSInvalidArgumentException
-[CLLocationManager setAllowsBackgroundLocationUpdates:]: unrecognized selector sent to instance 0x17000d040
-[_Radar locationManager:didChangeAuthorizationStatus:]
iOS 9 devices are crashing with the following exception:
Fatal Exception: NSInvalidArgumentException
+[NSTimer scheduledTimerWithTimeInterval:repeats:block:]: unrecognized selector sent to class 0x1a12b6868
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x183b55900 __exceptionPreprocess
1 libobjc.A.dylib 0x1831c3f80 objc_exception_throw
2 CoreFoundation 0x183b5c514 __CFExceptionProem
3 CoreFoundation 0x183b595b8 ___forwarding___
4 CoreFoundation 0x183a5d68c _CF_forwarding_prep_0
5 MyApp 0x10040a3a4 -[_RadarLocationRequest initWithTimeout:completionHandler:] (_RadarLocationRequest.m:26)
6 MyApp 0x100403c00 -[_Radar trackOnceWithCompletionHandler:] (_Radar.m:109)
7 MyApp 0x100402ae8 +[Radar trackOnceWithCompletionHandler:] (Radar.m:42)
Would it be possible to add a SPM support in near future?
Our app automatically upgraded from 3.11.2 to latest release over the weekend causing app failure.
It appears a mandatory delegate method was added to RadarDelegate which qualifies as a breaking change.
SPM
Removal of RadarDelegate.didUpdateLocationPermissionStatus(status: RadarLocationPermissionStatus) method causes breaking change for those that had it implemented in v3.14.0 (which was mandatory so probably most). The breaking change is that RadarLocationPermissionStatus no longer exists.
This is the second breaking change released recently that should have been a major version. Again, in this case, resolution was relatively easy. However, there is significant frustration and time lost from consumers development.
Swift Package Manager with versioning rule 'up to next major'
3.14.X upgrade to 3.15.X
With carthage update
Actually I have to send some of location data & Helath kit data to server , So I want to know that if Radar Delegate method calls even App is not running (suspended state) ?
Support static xcframework instead of using dynamic xcframework. Using dynamic xcframework would reduce the app start up launch time.
N/A
Using Terminal
you can see if the xcframework is dynamic or static.
file Pods/RadarSDK/dist/RadarSDK.xcframework/ios-arm64_armv7/RadarSDK.framework/RadarSDK
Pods/RadarSDK/dist/RadarSDK.xcframework/ios-arm64_armv7/RadarSDK.framework/RadarSDK: Mach-O universal binary with 2 architectures: [arm_v7:Mach-O dynamically linked shared library arm_v7] [arm64]
Pods/RadarSDK/dist/RadarSDK.xcframework/ios-arm64_armv7/RadarSDK.framework/RadarSDK (for architecture armv7): Mach-O dynamically linked shared library arm_v7
Pods/RadarSDK/dist/RadarSDK.xcframework/ios-arm64_armv7/RadarSDK.framework/RadarSDK (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
Notice the 'dynamically linked shared library'
Vendor/Frameworks/realm-objc-3.21.0/Realm.xcframework/ios-arm64/Realm.framework/Realm: Mach-O universal binary with 1 architecture: [arm64:current ar archive]
Vendor/Frameworks/realm-objc-3.21.0/Realm.xcframework/ios-arm64/Realm.framework/Realm (for architecture arm64): current ar archive
Notice the 'current ar archive'
iOS 15
Using CocoaPods 1.11.2
with Podfile
:
use_frameworks! :linkage => :static
pod 'RadarSDK' , '= 3.2.4'
3.2.4
Receiving the following error message 'Unhandled/unexpected case where no run destinations were produced' when building the Radar SDK with Xcode 14. Building with Xcode 13.x works just fine.
Executing Carthage via fastlane
carthage(
command: 'bootstrap',
use_binaries: false,
use_xcframeworks: true,
platform: 'iOS',
log_path: "#{Dir.pwd}/carthage.log"
)
Mac OS Monterey 12.6
Carthage 0.38.0
Radar SDK 3.5.3
Console output attached:
A shell task (/usr/bin/xcrun xcodebuild -project /Users/<username>/Git/CodeRepo/Carthage/Checkouts/radar-sdk-ios/RadarSDK.xcodeproj -scheme Library -configuration Release CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -showBuildSettings -skipUnavailableActions) failed with exit code 6:
2022-09-13 11:13:50.869 xcodebuild[19088:137663] [MT] DVTAssertions: ASSERTION FAILURE in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-21335/IDEFoundation/Execution/RunDestinations/IDERunDestinationCLI.m:566
Details: Unhandled/unexpected case where no run destinations were produced.
Object: <IDERunDestinationCLI>
Method: +resolveRunDestinationsWithWorkspace:scheme:buildAction:schemeCommand:schemeTask:destinationSpecifications:architectures:timeout:runDestinationManager:deviceManager:fallbackPreferredSDK:fallbackPreferredArchitectures:skipUnsupportedDestinations:shouldSkipRunDestinationValidation:didDisambiguate:disambiguatedMatches:disambiguatedMatchesDescription:error:
Thread: <_NSMainThread: 0x6000001781c0>{number = 1, name = main}
Hints:
Backtrace:
0 -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 _sortDevicesForDisplay (in IDEFoundation)
4 -[Xcode3CommandLineBuildTool _resolveRunDestinationsForBuildAction:] (in Xcode3Core)
5 -[Xcode3CommandLineBuildTool _resolveInputOptionsWithTimingSection:] (in Xcode3Core)
6 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
7 XcodeBuildMain (in libxcodebuildLoader.dylib)
8 start (in dyld)
Hi,
I am using RadarSDK 2.0.0 for facebook places.
I get RadarEvent with RadarPlace object in it, but that object sometimes contains facebookPlaceId which facebook graph cannot find, e.g. this id: 326477860701555
Can you check that, thank you.
btw. I see RadarPlace has two facebook ids, can you tell me what the difference between those two are, thank you?
@property (nullable, copy, nonatomic, readonly) NSString *facebookId;
@property (nullable, copy, nonatomic, readonly) NSString *facebookPlaceId;
I tried in my projekt implement background tracking but it is not working.
I also tried test it using the your Example project and it is not wokring.
let options = RadarTrackingOptions.efficient
options.sync = .all
Radar.startTracking(trackingOptions: options)
Run Example project, give all location and notification permissions, use RadarTrackingOptions.efficient for Radar.startTracking, move around the city and issue is that didReceiveEvents never get called.
iPhone 12, iOS 14.3
Clone and run your Example (I set my publishableKey "prj_test_pk_ffXXXX...)
I think it is 3.1.8, that is what I see in RadarUtils class -> (NSString *)sdkVersion
I provided all location and notification permissions, methods didUpdateLocation and didUpdateClientLocation working ok, but didReceiveEvents never get called.
Also I see no Events records in Radars Web Dashboard.
Hi,
Looks like calls to manually report updated locations needs to be called on the main queue. I started seeing this warnings:
Main Thread Checker: UI API called on a background thread: -[UIApplication backgroundTimeRemaining]
PID: 6972, TID: 1533917, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4 Polarsteps 0x00000001010d7578 -[RadarStateManager updateState:withSource:] + 1052
5 Polarsteps 0x00000001010d7068 +[RadarStateManager updateState:withSource:] + 88
6 Polarsteps 0x00000001010dfaf8 +[Radar forceTrack:handler:] + 172
7 Polarsteps 0x00000001010df9ec +[Radar updateLocation:withCompletionHandler:] + 172
Is that something the SDK should handle on per need basis maybe?
Otherwise maybe update the documentation to reflect that?
Cheers,
H..
With the introduction of M1 chips, Apple is shifting from "fat" frameworks to XCFrameworks and will soon require all packages to be shipped this way. Is this something Radar is actively working to support soon?
Xcode 12+
Carthage, Cocoapods, SPM
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.