Skip to content

Instantly share code, notes, and snippets.

@chrissearle
Created August 25, 2023 13:55
Show Gist options
  • Save chrissearle/2b098dd53284f69ea6b8ab7425d14128 to your computer and use it in GitHub Desktop.
Save chrissearle/2b098dd53284f69ea6b8ab7425d14128 to your computer and use it in GitHub Desktop.
Flurry integration
let sb = FlurrySessionBuilder()
.build(logLevel: FlurryLogLevel.all)
.build(crashReportingEnabled: true)
.build(appVersion: Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String)
.build(iapReportingEnabled: true)
Flurry.startSession(apiKey: EnvConfig.flurryApiKey, sessionBuilder: sb)
static func refresh() async throws -> UpdateStatus {
Flurry.log(eventName: "RefreshSessions", timed: true)
return try await withCheckedThrowingContinuation { continuation in
refresh { result in
Flurry.endTimedEvent(eventName: "RefreshSessions", parameters: nil)
continuation.resume(with: result)
}
}
}
Flurry.log(errorId: "SessionRefreshFailed", message: "Unable to fetch sessions", error: error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment