Skip to content

Commit

Permalink
Merge pull request #2 from PierreBerger/replace-bugsnag-sentry
Browse files Browse the repository at this point in the history
replace bugsnag with sentry
  • Loading branch information
PierreBerger authored Dec 5, 2021
2 parents b62cba5 + 8855128 commit 968d326
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Carthage
build
xcuserdata
project.xcworkspace
Development.xcconfig
34 changes: 20 additions & 14 deletions LivecamWallpaper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
8F3A566626CABC0100287AB5 /* updater.sh in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8F648C5526C7DF310027BA10 /* updater.sh */; };
8F5390B3263F47CB00EA6B2E /* updater.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F5390B2263F47CB00EA6B2E /* updater.swift */; };
8F5390B52641EB8D00EA6B2E /* Update.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F5390B42641EB8D00EA6B2E /* Update.swift */; };
8F5CEDA3263B5296009481E4 /* Bugsnag in Frameworks */ = {isa = PBXBuildFile; productRef = 8F5CEDA2263B5296009481E4 /* Bugsnag */; };
8F9AFE04261FA93C0086DCCA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9AFE03261FA93C0086DCCA /* AppDelegate.swift */; };
8F9AFE09261FA93C0086DCCA /* LivecamWallpaper.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 8F9AFE07261FA93C0086DCCA /* LivecamWallpaper.xcdatamodeld */; };
8F9AFE0B261FA93F0086DCCA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8F9AFE0A261FA93F0086DCCA /* Assets.xcassets */; };
Expand All @@ -23,6 +22,7 @@
8F9AFE802623768D0086DCCA /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9AFE7F2623768D0086DCCA /* Preferences.swift */; };
8F9AFE942627809F0086DCCA /* skapingResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9AFE932627809F0086DCCA /* skapingResponse.swift */; };
8F9AFE9F26279B200086DCCA /* Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F9AFE9E26279B200086DCCA /* Defaults.swift */; };
8FCC0127275D3382003C47F2 /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 8FCC0126275D3382003C47F2 /* Sentry */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -67,15 +67,16 @@
8F9AFE8826263A150086DCCA /* LivecamWallpaperRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LivecamWallpaperRelease.entitlements; sourceTree = "<group>"; };
8F9AFE932627809F0086DCCA /* skapingResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = skapingResponse.swift; sourceTree = "<group>"; };
8F9AFE9E26279B200086DCCA /* Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Defaults.swift; sourceTree = "<group>"; };
8FCC0128275D58C1003C47F2 /* Development.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Development.xcconfig; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
8F9AFDFD261FA93C0086DCCA /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8F5CEDA3263B5296009481E4 /* Bugsnag in Frameworks */,
8F39DD882627A77800F0C010 /* Defaults in Frameworks */,
8FCC0127275D3382003C47F2 /* Sentry in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -110,6 +111,7 @@
8F9AFDF7261FA93B0086DCCA = {
isa = PBXGroup;
children = (
8FCC0128275D58C1003C47F2 /* Development.xcconfig */,
8F9AFE02261FA93C0086DCCA /* LivecamWallpaper */,
8F9AFE01261FA93C0086DCCA /* Products */,
);
Expand Down Expand Up @@ -191,7 +193,7 @@
name = LivecamWallpaper;
packageProductDependencies = (
8F39DD872627A77800F0C010 /* Defaults */,
8F5CEDA2263B5296009481E4 /* Bugsnag */,
8FCC0126275D3382003C47F2 /* Sentry */,
);
productName = LivecamWallpaper;
productReference = 8F9AFE00261FA93C0086DCCA /* LivecamWallpaper.app */;
Expand Down Expand Up @@ -222,7 +224,7 @@
mainGroup = 8F9AFDF7261FA93B0086DCCA;
packageReferences = (
8F39DD862627A77800F0C010 /* XCRemoteSwiftPackageReference "Defaults" */,
8F5CEDA1263B5296009481E4 /* XCRemoteSwiftPackageReference "bugsnag-cocoa" */,
8FCC0125275D3382003C47F2 /* XCRemoteSwiftPackageReference "sentry-cocoa" */,
);
productRefGroup = 8F9AFE01261FA93C0086DCCA /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -300,6 +302,7 @@
/* Begin XCBuildConfiguration section */
8F9AFE2A261FA9400086DCCA /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8FCC0128275D58C1003C47F2 /* Development.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -361,6 +364,7 @@
};
8F9AFE2B261FA9400086DCCA /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8FCC0128275D58C1003C47F2 /* Development.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -415,14 +419,15 @@
};
8F9AFE2D261FA9400086DCCA /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8FCC0128275D58C1003C47F2 /* Development.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = LivecamWallpaper/LivecamWallpaper.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_ASSET_PATHS = "\"LivecamWallpaper/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -433,7 +438,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 0.2.1;
MARKETING_VERSION = 0.2.2;
PRODUCT_BUNDLE_IDENTIFIER = fr.pierreberger.LivecamWallpaper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -444,14 +449,15 @@
};
8F9AFE2E261FA9400086DCCA /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8FCC0128275D58C1003C47F2 /* Development.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = LivecamWallpaper/LivecamWallpaperRelease.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_ASSET_PATHS = "\"LivecamWallpaper/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -462,7 +468,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 0.2.1;
MARKETING_VERSION = 0.2.2;
PRODUCT_BUNDLE_IDENTIFIER = fr.pierreberger.LivecamWallpaper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -503,12 +509,12 @@
minimumVersion = 4.2.1;
};
};
8F5CEDA1263B5296009481E4 /* XCRemoteSwiftPackageReference "bugsnag-cocoa" */ = {
8FCC0125275D3382003C47F2 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/bugsnag/bugsnag-cocoa";
repositoryURL = "https://github.com/getsentry/sentry-cocoa.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 6.9.1;
minimumVersion = 7.5.4;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand All @@ -519,10 +525,10 @@
package = 8F39DD862627A77800F0C010 /* XCRemoteSwiftPackageReference "Defaults" */;
productName = Defaults;
};
8F5CEDA2263B5296009481E4 /* Bugsnag */ = {
8FCC0126275D3382003C47F2 /* Sentry */ = {
isa = XCSwiftPackageProductDependency;
package = 8F5CEDA1263B5296009481E4 /* XCRemoteSwiftPackageReference "bugsnag-cocoa" */;
productName = Bugsnag;
package = 8FCC0125275D3382003C47F2 /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
productName = Sentry;
};
/* End XCSwiftPackageProductDependency section */

Expand Down
8 changes: 6 additions & 2 deletions LivecamWallpaper/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Bugsnag
import Sentry
import Cocoa
import Defaults
import SwiftUI
Expand All @@ -16,7 +16,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {
var refreshTimer: Timer?

func applicationDidFinishLaunching(_: Notification) {
Bugsnag.start()
SentrySDK.start { options in
options.tracesSampleRate = 1.0
options.dsn = Bundle.main.object(forInfoDictionaryKey: "SentryDSN") as? String
}

parseArguments()
setup()
if MyApp.isFirstLaunch {
Expand Down
9 changes: 4 additions & 5 deletions LivecamWallpaper/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string></string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
Expand Down Expand Up @@ -32,10 +34,7 @@
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>bugsnag</key>
<dict>
<key>apiKey</key>
<string>2f548a3332285cfbc81f38401ef285f3</string>
</dict>
<key>SentryDSN</key>
<string>$(SENTRY_DSN)</string>
</dict>
</plist>
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ You can download the latest version [here](https://github.com/pierreberger/Livec

## Libraries

- <img align="center" src="assets/bugsnag.png" width="100">&nbsp;&nbsp;LivecamWallpaper is using [Bugsnag](https://www.bugsnag.com/) for error monitoring.

- [Sentry](https://sentry.io)
- [Defaults](https://github.com/sindresorhus/Defaults)

## Thanks
Expand Down

0 comments on commit 968d326

Please sign in to comment.