BTAssessmentSDK offers indoor location tracking and analytics reporting to 3rd party apps using BLE technology and Machine Learning.
- Indoor location (in/out)
- Indoor area detection
- Outdoor location
- Analytics
- iOS 13.0+
- Xcode 12
You can use CocoaPods to install BTAssessmentSDK. See steps below:
- Add BTAssessmentSDK dependency to your Podfile - using git link and tag(version). See sample code hereby:
# Minimum supported iOS platform for BTAssessmentSDK
platform :ios, '10.0'
target '[Your app]' do
# Needed for the project to use frameworks
user_frameworks!
# BTAssessmentSDK framework
pod 'BTAssessmentSDK', :git => 'https://github.com/bespot/assessment-sdk-ios', :tag => '1.0.3'
# Other Cocoapods libraries/frameworks you may use...
end
- Run
pod update
for the Cocoapods to download the BTAssessmentSDK dependency. - Run
pod install
Do the framework import:
import BTAssessmentSDK
in your application's AppDelegate application(_:didFinishLaunchingWithOptions:)
method add this line to init/configure the BTAssessmentSDK singleton object:
BTAssessmentSDK.shared.configure(applicationId: "your_app_id", applicationSecret: "your_app_secret")
In your view controller's viewDidLoad()
method add this:
BTAssessmentSDK.shared.inOutDelegate = self
Extend your view controller to implement delegate method:
extension YourViewController: BTInOutDelegate {
func didUpdateResult(status: BTStatus) {
// TODO: Use In-Out status
}
func didFailUpdate(error: BTError) {
// TODO: Inspect possible errors
}
}
In your view controller's viewDidLoad()
method add this:
BTAssessmentSDK.shared.configurationDelegate = self
Extend your view controller to implement delegate method:
extension YourViewController: BTConfigurationDelegate {
func didConfigure(success: Bool) {
// TODO: Use success status
}
func didFailConfigure(error: BTConfigurationError) {
// TODO: Inspect possible errors
}
}
In order for the solution (mock) to start provide your with location updates (inside or outside) regarding you location in relation to the store, you have to use this:
BTAssessmentSDK.shared.subscribe()
To unsubscribe from updates just use this:
BTAssessmentSDK.shared.unsubscribe()