Add Ironchip Location Based Authentication SDK
To import this swift package dependency, in Xcode go to the root of your application for example ExampleApp.xcodeproj, at the top in PROJECT select ExampleApp item and go to the thrird tab, Package dependencies, select + button.
A pop up will open and in search or enter url copy the repositorie url and press add package button.
In this case: https://github.com/Ironchip-Security/LBFraud-SDK-iOS.git
A new window appears, in dependency rule, you can select an exact version, a range of versions, a branch… in this case to test it you can choose the exact version 1.1.6 and finally add the package to use it, or a range like 1.0. 0 < 2.0.0, we recommend to ease package upgrades that you use a range of versions
To be able to use Ironchip LBFraud as a SwiftPackage you will need to add to the target of your app a capability so go to Singing and Capabilities and add access Wifi Information.
Then in the Target of the app in info tab you have to add the key values of location permission.
- Privacy - Location Always and When In Use Usage Description, and insert the description as string
- Privacy - Location When In Use Usage Description, and insert the description as string
- Privacy - Location Always Usage Description, and insert the description as string
- LSApplicationQueriesSchemes, and insert the description (this permission is to be able to know if the device is jailbroken)
First of all you have to request Location Permission in your app:
import CoreLocation let locationManager = CLLocationManager() locationManager.requestWhenInUseAuthorization()