AppDelegate.swift
1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// AppDelegate.swift
// metaCode
//
// Created by iOS on 2023/5/30.
//
import UIKit
import CNLiveRequestBastKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow.init(frame: UIScreen.main.bounds)
window?.backgroundColor = UIColor.white
window?.rootViewController = CNMetaCodeHomePageController.init()
window?.makeKeyAndVisible()
let kAppBundleID = Bundle.main.bundleIdentifier ?? ""
let uuid : String = UIDevice.current.identifierForVendor?.uuidString.replacingOccurrences(of: "-", with: "") ?? ""
let ver : String = Bundle.main.infoDictionary?["CFBundleVersion"] as! String
let p : Dictionary = ["platform_id":kAppBundleID,"uuid":uuid,"plat":"i","ver":ver,"appId":"802_li40qhp922","timestamp":String(NSNumber(floatLiteral: Date().timeIntervalSince1970).intValue),"clientPlat":"i","frmId":"ios"]
CNLiveNetworking.setupDefaultParam(p)
CNLiveNetworking.setupShowDataResult(false)
CNLiveNetworking.setupSignKey("ae3a7ad3e4b9beb7cfe2078db648ebb89aa249ca2e82ac")
CNLiveNetworking.setAllowRequestDefaultArgument(true)
CNLiveNetworking.setResponseSerializerType(.JSON)
return true
}
}