Add the following line at the top of any Swift file where you want to use the SDK:
Initialize the SDK in AppDelegate.swift or SceneDelegate.swift, depending on your project setup.
import UIKit
import Mpc
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let client = MpcClient(
serverAddress: "YOUR_SERVER_ADDRESS",
accessToken: "YOUR_TOKEN",
mode: "YOUR_MODE",
authServerAddress: "AUTH_SERVER_ADDRESS",
mainServerAddress: "MAIN_SERVER_ADDRESS",
callback: CallBack{}
)
return true
}
}
class CallBack : MpcClientCallbackProtocol {}