Created
April 22, 2022 17:18
-
-
Save ryanhoskin/618b106b57c76dac03d2e2e0fa5e63d5 to your computer and use it in GitHub Desktop.
A basic integration to Instabug
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
import SwiftUI | |
import Instabug | |
@main | |
struct Test_6App: App { | |
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
} | |
} | |
} | |
class AppDelegate: NSObject, UIApplicationDelegate { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { | |
Instabug.start(withToken: "YOUR-TOKEN-HERE", invocationEvents: .floatingButton) | |
Instabug.reproStepsMode = .enable | |
//Instabug.tintColor = .red | |
//Instabug.setValue("TEST STRING 2", forStringWithKey: kIBGCommentFieldPlaceholderForBugReportStringName) | |
Instabug.show() | |
let error = NSError(domain: "domain", code: 500, userInfo: nil) | |
CrashReporting.reportError(error) | |
return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment