Note: All the above keys are vital for the SDK to function as expected. Missing out on any keys might result in the SDK behaving differently.
12. Open AppDelegate – Add these statements in the AppDelegate file to import this library.
Fig 9 – AppDelegate
13. Open AppDelegate and find this method application(_ application: UIApplication,didFinishLaunchingWithOptions)
14. In this method add following code
Fig 10 – Customer Configuration
Note – Replace <CLIENT_ID> and <CLIENT_SECRET> with the value received from Duke.ai. These are unique credentials for your pool of clients. Obtain your unique client credentials by completing thisform.
15. Navigate to your ViewContoller from where you want to access the DukeSDK features.
Invoke DukeSDK on an event. For example – a button click.
import DukeSDKframework on your view controller by adding the statement
import DukeSDK at the top of your viewController
Fig 11 – Add button
16. Create one button and action in your application. For more details on how to create a button –
Note – If you’re working on a simulator, make sure to enable location for the simulator by selecting Apple as the location provider. You can do this by updating the simulator settings : Features → Location → Apple.