Skip to content

Commit

Permalink
Merge pull request #48 from WideSpectrumComputing/master
Browse files Browse the repository at this point in the history
upgraded a demo app with usage of a crash reporter
  • Loading branch information
akornich authored Feb 24, 2021
2 parents f32c08c + 77c5cf6 commit 1e5c5de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"repositoryURL": "https://github.com/microsoft/plcrashreporter.git",
"state": {
"branch": "master",
"revision": "280cf16a19d85b707b6cc9fc235dde7457f6f7cc",
"revision": "2afa27e23452171b971f67730821b7befa96842b",
"version": null
}
},
Expand All @@ -24,7 +24,7 @@
"repositoryURL": "https://github.com/rollbar/rollbar-apple",
"state": {
"branch": "master",
"revision": "400af0840dcbd69454c3275e710445c5874084b5",
"revision": "f32c08cf61692a2fbe7de5e0aedf49a1d1534683",
"version": null
}
}
Expand Down
7 changes: 6 additions & 1 deletion Demos/macosAppSwiftSPM/macosAppSwiftSPM/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import Cocoa
import RollbarNotifier
import RollbarPLCrashReporter
//import SwiftTryCatch2

@NSApplicationMain
Expand Down Expand Up @@ -41,12 +42,16 @@ class AppDelegate: NSObject, NSApplicationDelegate {
// configure Rollbar:
let config = RollbarConfig.init();

// define optional crash report collector:
let crashCollector = RollbarPLCrashCollector();

//config.crashLevel = @"critical";
config.destination.accessToken = "2ffc7997ed864dda94f63e7b7daae0f3";
config.destination.environment = "samples";
config.customData = [ "someKey": "someValue", ];
// init Rollbar shared instance:
Rollbar.initWithConfiguration(config);
Rollbar.initWithConfiguration(config, crashCollector: crashCollector);
//Rollbar.initWithConfiguration(config);
Rollbar.infoMessage("Rollbar is up and running! Enjoy your remote error and log monitoring...");
}

Expand Down

0 comments on commit 1e5c5de

Please sign in to comment.