Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Catch uncaught exceptions with sentry.io
Browse files Browse the repository at this point in the history
  • Loading branch information
justinabrahms committed Jun 20, 2023
1 parent 65c41d5 commit 0728c12
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xcode/Subconscious/Shared/SubconsciousApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@
//

import SwiftUI
import Sentry

@main
struct SubconsciousApp: App {
init() {
SentrySDK.start { options in
// per https://docs.sentry.io/product/sentry-basics/dsn-explainer/#dsn-utilization this is fine to be public, unless it's abused (e.g. someone sending us /extra/ errors.
options.dsn = "https://72ea1a54aeb04f60880d75fcffe705ed@o4505393671569408.ingest.sentry.io/4505393756438528"
}
}

var body: some Scene {
WindowGroup {
AppView()
}
}

}
17 changes: 17 additions & 0 deletions xcode/Subconscious/Subconscious.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
8804D2552A4242E300D45E83 /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 8804D2542A4242E300D45E83 /* Sentry */; };
B508956E29E7862A0048106B /* Tests_AddressBookService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B508956D29E7862A0048106B /* Tests_AddressBookService.swift */; };
B508957029E79BE70048106B /* UserProfileService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B508956F29E79BE70048106B /* UserProfileService.swift */; };
B508957129E79BE70048106B /* UserProfileService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B508956F29E79BE70048106B /* UserProfileService.swift */; };
Expand Down Expand Up @@ -752,6 +753,7 @@
B8E1BB79296DECE700B86E0E /* SwiftNoosphere in Frameworks */,
B82C3A7126F6B1C000833CC8 /* OrderedCollections in Frameworks */,
B822F18B27C9615600943C6B /* ObservableStore in Frameworks */,
8804D2552A4242E300D45E83 /* Sentry in Frameworks */,
B8579B6527C561E900D8B4BC /* SwiftSubsurface in Frameworks */,
B82C3A6F26F6B1C000833CC8 /* Collections in Frameworks */,
B57D63C029B574C3008BBB62 /* CodeScanner in Frameworks */,
Expand Down Expand Up @@ -1379,6 +1381,7 @@
B8CA8F19288F038C005F8802 /* Tracery */,
B8E1BB78296DECE700B86E0E /* SwiftNoosphere */,
B57D63BF29B574C3008BBB62 /* CodeScanner */,
8804D2542A4242E300D45E83 /* Sentry */,
);
productName = "Subconscious (iOS)";
productReference = B8EB29FB26F27797006E97C3 /* Subconscious.app */;
Expand Down Expand Up @@ -1483,6 +1486,7 @@
B8CA8F18288F038C005F8802 /* XCRemoteSwiftPackageReference "Tracery" */,
B8E1BB77296DECE700B86E0E /* XCRemoteSwiftPackageReference "noosphere" */,
B57D63BE29B574C3008BBB62 /* XCRemoteSwiftPackageReference "CodeScanner" */,
8804D2532A4242E300D45E83 /* XCRemoteSwiftPackageReference "sentry-cocoa" */,
);
productRefGroup = B8EB29FC26F27797006E97C3 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -2471,6 +2475,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
8804D2532A4242E300D45E83 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/getsentry/sentry-cocoa.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 8.0.0;
};
};
B57D63BE29B574C3008BBB62 /* XCRemoteSwiftPackageReference "CodeScanner" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/twostraws/CodeScanner";
Expand Down Expand Up @@ -2522,6 +2534,11 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
8804D2542A4242E300D45E83 /* Sentry */ = {
isa = XCSwiftPackageProductDependency;
package = 8804D2532A4242E300D45E83 /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
productName = Sentry;
};
B57D63BF29B574C3008BBB62 /* CodeScanner */ = {
isa = XCSwiftPackageProductDependency;
package = B57D63BE29B574C3008BBB62 /* XCRemoteSwiftPackageReference "CodeScanner" */;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
"version" : "0.3.0"
}
},
{
"identity" : "sentry-cocoa",
"kind" : "remoteSourceControl",
"location" : "https://github.com/getsentry/sentry-cocoa.git",
"state" : {
"revision" : "d277532e1c8af813981ba01f591b15bbdd735615",
"version" : "8.8.0"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
Expand Down

0 comments on commit 0728c12

Please sign in to comment.