Git Product home page Git Product logo

radar-sdk-ios's Introduction

Radar

CocoaPods Carthage

Radar is the leading geofencing and location tracking platform.

The Radar SDK abstracts away cross-platform differences between location services, allowing you to add geofencing, location tracking, trip tracking, geocoding, and search to your apps with just a few lines of code.

Documentation

See the Radar overview documentation here. See the Radar SDK documentation here.

You can also see a detailed SDK reference here.

Migrating

See migration guides in MIGRATION.md.

Examples

See a Swift example app in Example/.

To run the example app, clone this repository, add your publishable API key in AppDelegate.swift, and build the app.

SPM

If you are using Swift Package Manager to manage your project's dependency, use this SPM specific repository instead

Support

Have questions? We're here to help! Email us at [email protected].

radar-sdk-ios's People

Contributors

andlum avatar bschoeneweis avatar corypisano avatar david-goodfellow avatar dependabot[bot] avatar jkao avatar joeychik-radar avatar jrtibbetts avatar jsani-radar avatar justinvallely avatar kennyhuradar avatar kochis avatar lmeier avatar nickpatrick avatar russellcullen avatar shicheng-lu avatar tjulien avatar york-wei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

radar-sdk-ios's Issues

Radar.startTracking(trackingOptions: .efficient) not working

Summary

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.

Code to reproduce

let options = RadarTrackingOptions.efficient
options.sync = .all
Radar.startTracking(trackingOptions: options)

Steps to reproduce

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.

OS version

iPhone 12, iOS 14.3

SDK installation method

Clone and run your Example (I set my publishableKey "prj_test_pk_ffXXXX...)

SDK version

I think it is 3.1.8, that is what I see in RadarUtils class -> (NSString *)sdkVersion

Other information

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.

RadarPlace returns facebookPlaceId which facebook graph cannot find

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;

Radar SDK Crashes on iOS 8 and iOS 9

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)

Event and geofence fields are empty after call to API

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

Location updates Queue

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..

Breaking change was introduced with Minor version update

Summary

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.

Code to reproduce

Steps to reproduce

OS version

SDK installation method

SPM

SDK version

Other information

XCFramework Support

Summary

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?

OS version

Xcode 12+

SDK installation method

Carthage, Cocoapods, SPM

Support Static RadarSDK.xcframework

Summary

Support static xcframework instead of using dynamic xcframework. Using dynamic xcframework would reduce the app start up launch time.

Code to reproduce

N/A

Steps to reproduce

Using Terminal you can see if the xcframework is dynamic or static.

file Pods/RadarSDK/dist/RadarSDK.xcframework/ios-arm64_armv7/RadarSDK.framework/RadarSDK

If dynamic the output should be

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'

If static the output would be

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'

OS version

iOS 15

SDK installation method

Using CocoaPods 1.11.2 with Podfile:

use_frameworks! :linkage => :static

pod 'RadarSDK' , '= 3.2.4'

SDK version

3.2.4

Other information

Unable to build Radar XCFramework on Xcode 14 via Carthage

Summary

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.

Code to reproduce

Steps to reproduce

Executing Carthage via fastlane

        carthage(
            command: 'bootstrap',
            use_binaries: false,
            use_xcframeworks: true,
            platform: 'iOS',
            log_path: "#{Dir.pwd}/carthage.log"
        )

OS version

Mac OS Monterey 12.6

SDK installation method

Carthage 0.38.0

SDK version

Radar SDK 3.5.3

Other information

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.