Collect Application Launch Parameters
1、Open Xcode, then select File -> New -> File (or ⌘N).
2、In the dialog box that appears, select Swift File and click Next.
3、Name the Swift file "main".
4、In the AppDelegate.swift file, comment out @UIApplicationMain as shown in the following image.
5、Add the following code to the "main.swift" file.
import Foundation
import UIKit
NBSAppAgent.start(withAppID: "your_appKey") // The Basis TingYun SDK startup function.
UIApplicationMain(
CommandLine.argc,
UnsafeMutableRawPointer(CommandLine.unsafeArgv)
.bindMemory(
to: UnsafeMutablePointer<Int8>.self,
capacity: Int(CommandLine.argc)),
nil,
NSStringFromClass(AppDelegate.self)
)