Created
August 25, 2023 13:55
-
-
Save chrissearle/2b098dd53284f69ea6b8ab7425d14128 to your computer and use it in GitHub Desktop.
Flurry integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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