Initializing the SDK
- First, import
MetricSDKinto your project within yourAppDelegateclass
...
import MetricSDK
...
- Within your
didFinishLaunchingWithOptionsfunction, you can initialise your SDK with the.initializefunction.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
...
Metric.initialize(clientKey: "<Your client key here>",
secretKey: "<Your secret key here>")
...
To learn how to generate the clientKey and secretKey, kindly refer to this section of the documentation (Generate Id and Secret pair).