Skip to content

Commit

Permalink
feat(sentry): add dsym uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
sifferhans committed Aug 20, 2024
1 parent 4ce1805 commit 3407b67
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 28 deletions.
4 changes: 2 additions & 2 deletions Authentication/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/auth0/Auth0.swift", from: "2.5.0"),
.package(url: "https://github.com/firebase/firebase-ios-sdk", from: "10.26.0")
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.34.0")
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
Expand All @@ -26,7 +26,7 @@ let package = Package(
name: "Authentication",
dependencies: [
.product(name: "Auth0", package: "auth0.swift"),
.product(name: "FirebaseCrashlytics", package: "firebase-ios-sdk")
.product(name: "Sentry", package: "sentry-cocoa")
]
),
.testTarget(
Expand Down
6 changes: 3 additions & 3 deletions Authentication/Sources/Authentication/Userinfo.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import Auth0
import FirebaseCrashlytics
import Sentry
import Foundation

public func getAgeGroup(_ age: Int?) -> String {
Expand Down Expand Up @@ -91,8 +91,8 @@ public extension Provider {
"original_error": error.localizedDescription,
]
let customError = NSError(domain: "tv.brunstad.app", code: 9999, userInfo: customErrorInfo)
// Report the custom error to Crashlytics
Crashlytics.crashlytics().record(error: customError)
// Report the custom error to Sentry
SentrySDK.capture(error: customError)
}
return nil
}
Expand Down
34 changes: 17 additions & 17 deletions BCC Media tvOS/BCC Media tvOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@
7E31D57B2BE13D6B00A3A7C5 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 7E31D57A2BE13D6B00A3A7C5 /* PrivacyInfo.xcprivacy */; };
816CD9F82C2C38C600D536B4 /* Animation+CustomTimingFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816CD9F72C2C38C600D536B4 /* Animation+CustomTimingFunctions.swift */; };
817A8CEA2C05BCDE00E48E23 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 817A8CE92C05BCDE00E48E23 /* GoogleService-Info.plist */; };
817A8CEC2C05BD6200E48E23 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 817A8CEB2C05BD6200E48E23 /* FirebaseCrashlytics */; };
81F594BC2BC6EDC500A3BFC0 /* MainUITest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F594BB2BC6EDC500A3BFC0 /* MainUITest.swift */; };
81F828772BC7E6C500F1D35C /* InvisibleAVPlayerStatusIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F828762BC7E6C500F1D35C /* InvisibleAVPlayerStatusIndicator.swift */; };
C141D2DD2C73412200C95EF8 /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = C141D2DC2C73412200C95EF8 /* Sentry */; };
C156BE062C74822A0005BCDA /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = C156BE052C74822A0005BCDA /* FirebaseFirestore */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -177,8 +177,8 @@
C141D2DD2C73412200C95EF8 /* Sentry in Frameworks */,
090559BF2B57FB600019FB9A /* Auth0 in Frameworks */,
090559AC2B57F9810019FB9A /* API in Frameworks */,
817A8CEC2C05BD6200E48E23 /* FirebaseCrashlytics in Frameworks */,
09055A782B594E7F0019FB9A /* FeatureFlags in Frameworks */,
C156BE062C74822A0005BCDA /* FirebaseFirestore in Frameworks */,
09055A602B5807920019FB9A /* NpawPlugin in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -396,8 +396,8 @@
090559AB2B57F9810019FB9A /* API */,
09055A6A2B59247A0019FB9A /* FeatureFlags */,
09DDD6C62B6BB05000E56631 /* Rudder */,
817A8CEB2C05BD6200E48E23 /* FirebaseCrashlytics */,
C141D2DC2C73412200C95EF8 /* Sentry */,
C156BE052C74822A0005BCDA /* FirebaseFirestore */,
);
productName = "BCC Media tvOS";
productReference = 090559992B57F22F0019FB9A /* BCC Media tvOS.app */;
Expand Down Expand Up @@ -470,11 +470,11 @@
mainGroup = 090559902B57F22F0019FB9A;
packageReferences = (
090559B02B57FB560019FB9A /* XCRemoteSwiftPackageReference "apollo-ios" */,
090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0.swift" */,
090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0" */,
09055A5E2B5807920019FB9A /* XCRemoteSwiftPackageReference "plugin-ios" */,
09055A702B594E6B0019FB9A /* XCLocalSwiftPackageReference "API" */,
09055A732B594E740019FB9A /* XCLocalSwiftPackageReference "Authentication" */,
09055A762B594E7F0019FB9A /* XCLocalSwiftPackageReference "FeatureFlags" */,
09055A702B594E6B0019FB9A /* XCLocalSwiftPackageReference "../API" */,
09055A732B594E740019FB9A /* XCLocalSwiftPackageReference "../Authentication" */,
09055A762B594E7F0019FB9A /* XCLocalSwiftPackageReference "../FeatureFlags" */,
09DDD6C52B6BB05000E56631 /* XCRemoteSwiftPackageReference "rudder-sdk-ios" */,
817A8CE72C05BCA300E48E23 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
81480B342C3C0CCE0023D5B2 /* XCRemoteSwiftPackageReference "plugin-ios" */,
Expand Down Expand Up @@ -888,15 +888,15 @@
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
09055A702B594E6B0019FB9A /* XCLocalSwiftPackageReference "API" */ = {
09055A702B594E6B0019FB9A /* XCLocalSwiftPackageReference "../API" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../API;
};
09055A732B594E740019FB9A /* XCLocalSwiftPackageReference "Authentication" */ = {
09055A732B594E740019FB9A /* XCLocalSwiftPackageReference "../Authentication" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../Authentication;
};
09055A762B594E7F0019FB9A /* XCLocalSwiftPackageReference "FeatureFlags" */ = {
09055A762B594E7F0019FB9A /* XCLocalSwiftPackageReference "../FeatureFlags" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../FeatureFlags;
};
Expand All @@ -911,7 +911,7 @@
minimumVersion = 1.8.0;
};
};
090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0.swift" */ = {
090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/auth0/Auth0.swift";
requirement = {
Expand Down Expand Up @@ -973,7 +973,7 @@
};
090559BE2B57FB600019FB9A /* Auth0 */ = {
isa = XCSwiftPackageProductDependency;
package = 090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0.swift" */;
package = 090559BD2B57FB600019FB9A /* XCRemoteSwiftPackageReference "Auth0" */;
productName = Auth0;
};
09055A5F2B5807920019FB9A /* NpawPlugin */ = {
Expand All @@ -999,16 +999,16 @@
package = 09DDD6C52B6BB05000E56631 /* XCRemoteSwiftPackageReference "rudder-sdk-ios" */;
productName = Rudder;
};
817A8CEB2C05BD6200E48E23 /* FirebaseCrashlytics */ = {
isa = XCSwiftPackageProductDependency;
package = 817A8CE72C05BCA300E48E23 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseCrashlytics;
};
C141D2DC2C73412200C95EF8 /* Sentry */ = {
isa = XCSwiftPackageProductDependency;
package = C163D4E42C733C4000B238C2 /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
productName = Sentry;
};
C156BE052C74822A0005BCDA /* FirebaseFirestore */ = {
isa = XCSwiftPackageProductDependency;
package = 817A8CE72C05BCA300E48E23 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseFirestore;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 090559912B57F22F0019FB9A /* Project object */;
Expand Down
3 changes: 2 additions & 1 deletion BCC Media tvOS/BCC_Media_tvOSApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class AppDelegate: NSObject, UIApplicationDelegate {
FirebaseApp.configure()

SentrySDK.start{ options in
options.dsn = "https://[email protected]/4504299662278656"
options.dsn = "https://905cd79d515c1c75c7bfc0dc5e2d83b4@o4507803294892032.ingest.de.sentry.io/4507803304394832"
options.tracesSampleRate = 0.5
}

return true
Expand Down
54 changes: 54 additions & 0 deletions BCC Media.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@
"version" : "2.8.0"
}
},
{
"identity" : "crash-reporter-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/rudderlabs/crash-reporter-ios",
"state" : {
"revision" : "ee563535b64d9d5feacd0fa243663b2658033a19",
"version" : "1.0.1"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -117,6 +126,15 @@
"version" : "1.22.5"
}
},
{
"identity" : "metrics-reporter-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/rudderlabs/metrics-reporter-ios",
"state" : {
"revision" : "c5fe7cc861a83ec75978a516c02398c2a2cb1f20",
"version" : "1.2.1"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
Expand All @@ -126,6 +144,15 @@
"version" : "2.30910.0"
}
},
{
"identity" : "plugin-ios",
"kind" : "remoteSourceControl",
"location" : "https://repo.plugin.npaw.com/release/plugin-ios.git",
"state" : {
"revision" : "2d4fe6eed38932645b63bceb23dad8c0cec88150",
"version" : "7.2.35"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
Expand All @@ -135,6 +162,33 @@
"version" : "2.4.0"
}
},
{
"identity" : "rudder-ios-kit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/rudderlabs/rudder-ios-kit",
"state" : {
"revision" : "8a557a80cc1b0e0bc948c2b17fe0fd3809bcfd61",
"version" : "1.4.0"
}
},
{
"identity" : "rudder-sdk-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/rudderlabs/rudder-sdk-ios",
"state" : {
"revision" : "27153f90086f3eb903ed7cea960d2074d1131ab1",
"version" : "1.28.0"
}
},
{
"identity" : "sentry-cocoa",
"kind" : "remoteSourceControl",
"location" : "https://github.com/getsentry/sentry-cocoa.git",
"state" : {
"revision" : "d2ced2d961b34573ebd2ea0567a2f1408e90f0ae",
"version" : "8.34.0"
}
},
{
"identity" : "simplekeychain",
"kind" : "remoteSourceControl",
Expand Down
16 changes: 11 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ GEM
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.109.0)
Expand Down Expand Up @@ -64,7 +65,7 @@ GEM
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.3.0)
fastimage (2.3.1)
fastlane (2.219.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
Expand Down Expand Up @@ -106,6 +107,8 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-sentry (1.24.0)
os (~> 1.1, >= 1.1.4)
fastlane-plugin-versioning (0.5.2)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
Expand All @@ -130,11 +133,11 @@ GEM
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.47.0)
google-cloud-storage (1.37.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.31.0)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
Expand All @@ -145,7 +148,7 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
http-cookie (1.0.7)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
Expand Down Expand Up @@ -189,6 +192,7 @@ GEM
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.2.0)
unicode-display_width (2.5.0)
word_wrap (1.0.0)
xcodeproj (1.23.0)
Expand All @@ -205,9 +209,11 @@ GEM

PLATFORMS
arm64-darwin-22
arm64-darwin-23

DEPENDENCIES
fastlane
fastlane-plugin-sentry
fastlane-plugin-versioning

BUNDLED WITH
Expand Down
6 changes: 6 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ platform :ios do
postfix: "+"+current_build_number,
)
push_git_tags
sentry_debug_files_upload(
auth_token: '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',
org_slug: 'bcc-media-sti',
project_slug: 'bcc-media-platform',
include_sources: true
)
end

end
1 change: 1 addition & 0 deletions fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-versioning'
gem 'fastlane-plugin-sentry'

0 comments on commit 3407b67

Please sign in to comment.