使用xcode 9.3 beta实现flurry会导致在后台线程上调用UI API的警告。只能从主线程调用。iOS Flurry:从后台线程调用的UI API
任何想法该怎么做才能避免这种情况 - 它只是为了解决问题吗?在应用程序委托使用
代码:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let builder = FlurrySessionBuilder.init()
.withAppVersion("1.0")
.withLogLevel(FlurryLogLevelAll)
.withCrashReporting(true)
.withSessionContinueSeconds(10)
// Replace YOUR_API_KEY with the api key in the downloaded package
Flurry.startSession("YOUR_API_KEY", with: builder)
return true
}
添加屏幕截图,而不是链接。 – KKRocks
通过链接添加屏幕截图 – RSN
API的开发有望在iOS 11上线时使更新不会使用后台线程。 – RSN