Migrating from 1.0.x to 1.1.x (iOS)
In version 1.1.1 we change the way of initializing DyScan and setting up the API key.
Removing API key setter
Depending on the way which you chose to use DyScan, you will need to remove following lines.
- View Controller as an Option
- View Controller as the Default
- View
let viewController = DyScanViewController()
//...
// Remove the line below
// viewController.apiKey = "{YOUR API KEY}"
let viewController = DyScanDefaultViewController()
//...
// Remove the line below
// viewController.apiKey = "{YOUR API KEY}"
dyScanView = DyScanView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height))
//...
// Remove the line below
// dyScanView?.apiKey = "{YOUR API KEY}"
Initializing DyScan
In your AppDelegate
add the following line to configure DyScan
.
class AppDelegate: UIResponder, UIApplicationDelegate {
//...
internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
//...
DyScan.configure(apiKey: "{YOUR API KEY}")
//...
return true
}
}