通过App Center提供的Device和OS模块可以获取用户设备和操作系统信息。使用下面的代码示例可以获取当前设备和操作系统的信息:
import AppCenter import AppCenterAnalytics import AppCenterCrashes import AppCenterDistribute import AppCenterPush
// Start App Center SDK AppCenter.start(withAppSecret: "YourAppSecret", services:[ Analytics.self, Crashes.self, Distribute.self, Push.self ])
// Get device information let device = Device.current print(device.deviceType) print(device.deviceName) print(device.osName) print(device.osVersion)