diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc0b9ef7356..29d40f6e4c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,10 +29,10 @@ jobs: # With this we catch potential issues already in the PR. ios-swift-release: name: Release Build of iOS Swift - runs-on: macos-14 + runs-on: macos15 steps: - uses: actions/checkout@v4 - - run: ./scripts/ci-select-xcode.sh 16.2 + - run: ./scripts/ci-select-xcode.sh 16.3 - uses: ruby/setup-ruby@v1 with: bundler-cache: true @@ -50,47 +50,22 @@ jobs: build-sample: name: Sample ${{ matrix.scheme }} - runs-on: ${{ matrix.runs-on }} + runs-on: macos-15 strategy: fail-fast: false matrix: # other sample projects are built in ui-tests include: - scheme: macOS-Swift - xcode: 15.4 - runs-on: macos-14 - scheme: iOS13-Swift - xcode: 15.4 - runs-on: macos-14 - scheme: watchOS-Swift WatchKit App - xcode: 15.4 - runs-on: macos-14 - # Only compiles on Xcode 16+ - scheme: macOS-SwiftUI - xcode: 16.2 - runs-on: macos-15 - - scheme: SessionReplay-CameraTest - xcode: 16.2 - runs-on: macos-15 - - # We have to compile on Xcode 16.3 because compiling on Xcode 16.2 fails with - # Data+SentryTracing.swift:21:62: error: 'ReadingOptions' aliases 'Foundation.ReadingOptions' - # and cannot be used here because C++ types from imported module 'Foundation' do not support - # library evolution; this is an error in the Swift 6 language mode - scheme: visionOS-Swift - xcode: 16.3 - runs-on: macos-15 steps: - uses: actions/checkout@v4 - - run: ./scripts/ci-select-xcode.sh ${{ matrix.xcode }} - - - name: List Xcode Build Schemes - run: >- - xcodebuild - -workspace Sentry.xcworkspace - -list + - run: ./scripts/ci-select-xcode.sh 16.3 # Note: Due to complexity in implementing the CODE_SIGNING_ALLOWED flag in the sentry-xcodebuild.sh script, # we did not yet migrate this step to use the script yet. @@ -107,7 +82,7 @@ jobs: uses: actions/upload-artifact@v4 if: ${{ failure() || cancelled() }} with: - name: raw-build-output-os-${{matrix.runs-on}}-xcode-${{matrix.xcode}}-scheme-${{matrix.scheme}} + name: raw-build-output-scheme-${{matrix.scheme}} path: | raw-build-output.log diff --git a/.gitignore b/.gitignore index 59cae7ee86a..310c926890a 100644 --- a/.gitignore +++ b/.gitignore @@ -224,3 +224,4 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* +*xcshareddata diff --git a/Samples/iOS-Swift/iOS-Swift/Tools/DSNStorage.swift b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/DSNStorage.swift similarity index 82% rename from Samples/iOS-Swift/iOS-Swift/Tools/DSNStorage.swift rename to Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/DSNStorage.swift index 0680b4831fe..6ed4ff98825 100644 --- a/Samples/iOS-Swift/iOS-Swift/Tools/DSNStorage.swift +++ b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/DSNStorage.swift @@ -4,10 +4,9 @@ import Sentry /** * Stores the DSN to a file in the cache directory. */ -class DSNStorage { - - static let shared = DSNStorage() - +public class DSNStorage { + public static let shared = DSNStorage() + private let dsnFile: URL private init() { @@ -17,12 +16,12 @@ class DSNStorage { dsnFile = cachesDirectory.appendingPathComponent("dsn") } - func saveDSN(dsn: String) throws { + public func saveDSN(dsn: String) throws { try deleteDSN() try dsn.write(to: dsnFile, atomically: true, encoding: .utf8) } - func getDSN() throws -> String? { + public func getDSN() throws -> String? { let fileManager = FileManager.default guard fileManager.fileExists(atPath: dsnFile.path) else { @@ -32,7 +31,7 @@ class DSNStorage { return try String(contentsOfFile: dsnFile.path) } - func deleteDSN() throws { + public func deleteDSN() throws { let fileManager = FileManager.default if fileManager.fileExists(atPath: dsnFile.path) { try fileManager.removeItem(at: dsnFile) diff --git a/Samples/iOS-Swift/iOS-Swift/Extensions/SpanExtension.swift b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/Extensions/SpanExtension.swift similarity index 96% rename from Samples/iOS-Swift/iOS-Swift/Extensions/SpanExtension.swift rename to Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/Extensions/SpanExtension.swift index 34a71b57106..4e8bc2cc457 100644 --- a/Samples/iOS-Swift/iOS-Swift/Extensions/SpanExtension.swift +++ b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/Extensions/SpanExtension.swift @@ -1,7 +1,7 @@ import Foundation import Sentry -extension Span { +public extension Span { //If span is a transaction it has a list of children func children() -> [Span]? { diff --git a/Samples/iOS-Swift/iOS-Swift/Extensions/UIViewExtension.swift b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/Extensions/UIViewExtension.swift similarity index 97% rename from Samples/iOS-Swift/iOS-Swift/Extensions/UIViewExtension.swift rename to Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/Extensions/UIViewExtension.swift index 9124dd3cca5..f3b2eebc536 100644 --- a/Samples/iOS-Swift/iOS-Swift/Extensions/UIViewExtension.swift +++ b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/Extensions/UIViewExtension.swift @@ -1,7 +1,7 @@ import Foundation import UIKit -extension UIView { +public extension UIView { /// A shortcut to disable `translatesAutoresizingMaskIntoConstraints` /// - Returns: self func forAutoLayout() -> Self { diff --git a/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/GitInjections.swift b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/GitInjections.swift new file mode 100644 index 00000000000..9c1d681c99b --- /dev/null +++ b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/GitInjections.swift @@ -0,0 +1,23 @@ +import Foundation +import Sentry + +extension Bundle { + var gitCommitHash: String? { + infoDictionary?["GIT_COMMIT_HASH"] as? String + } + var gitBranchName: String? { + infoDictionary?["GIT_BRANCH"] as? String + } + var gitStatusClean: Bool { + (infoDictionary?["GIT_STATUS_CLEAN"] as? String) == "1" + } +} + +public func injectGitInformation(scope: Scope) { + if let commitHash = Bundle.main.gitCommitHash { + scope.setTag(value: "\(commitHash)\(Bundle.main.gitStatusClean ? "" : "-dirty")", key: "git-commit-hash") + } + if let branchName = Bundle.main.gitBranchName { + scope.setTag(value: branchName, key: "git-branch-name") + } +} diff --git a/Samples/iOS-Swift/iOS-Swift/SentrySDKOverrides.swift b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/SentrySDKOverrides.swift similarity index 97% rename from Samples/iOS-Swift/iOS-Swift/SentrySDKOverrides.swift rename to Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/SentrySDKOverrides.swift index 66869e5c535..6707edcd257 100644 --- a/Samples/iOS-Swift/iOS-Swift/SentrySDKOverrides.swift +++ b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/SentrySDKOverrides.swift @@ -1,6 +1,6 @@ import Foundation -protocol SentrySDKOverride: RawRepresentable, CaseIterable { +public protocol SentrySDKOverride: RawRepresentable, CaseIterable { var boolValue: Bool { get set } var floatValue: Float? { get set } var stringValue: String? { get set } @@ -30,7 +30,7 @@ public enum SentrySDKOverrides { } } - enum Special: String, SentrySDKOverride { + public enum Special: String, SentrySDKOverride { case wipeDataOnLaunch = "--io.sentry.wipe-data" case disableEverything = "--io.sentry.disable-everything" @@ -44,7 +44,7 @@ public enum SentrySDKOverrides { } } - enum Feedback: String, SentrySDKOverride { + public enum Feedback: String, SentrySDKOverride { case allDefaults = "--io.sentry.feedback.all-defaults" case disableAutoInject = "--io.sentry.feedback.no-auto-inject-widget" case noWidgetText = "--io.sentry.feedback.no-widget-text" @@ -67,7 +67,7 @@ public enum SentrySDKOverrides { } } - enum Performance: String, SentrySDKOverride { + public enum Performance: String, SentrySDKOverride { case disableTimeToFullDisplayTracing = "--disable-time-to-full-display-tracing" case disablePerformanceV2 = "--disable-performance-v2" case disableAppHangTrackingV2 = "--disable-app-hang-tracking-v2" @@ -92,7 +92,7 @@ public enum SentrySDKOverrides { } } - enum Other: String, SentrySDKOverride { + public enum Other: String, SentrySDKOverride { case disableAttachScreenshot = "--disable-attach-screenshot" case disableAttachViewHierarchy = "--disable-attach-view-hierarchy" case disableSessionReplay = "--disable-session-replay" @@ -118,7 +118,7 @@ public enum SentrySDKOverrides { } } - var stringValue: String? { + public var stringValue: String? { get { switch self { case .userName, .userEmail: return getStringValueOverride(for: rawValue) diff --git a/Samples/iOS-Swift/iOS-Swift/SentrySDKWrapper.swift b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/SentrySDKWrapper.swift similarity index 95% rename from Samples/iOS-Swift/iOS-Swift/SentrySDKWrapper.swift rename to Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/SentrySDKWrapper.swift index 6ef85ba0c30..2817281a9db 100644 --- a/Samples/iOS-Swift/iOS-Swift/SentrySDKWrapper.swift +++ b/Samples/SentrySampleShared-Swift/SentrySampleShared-Swift/SentrySDKWrapper.swift @@ -3,19 +3,31 @@ import Sentry import UIKit -struct SentrySDKWrapper { - static let shared = SentrySDKWrapper() - - func startSentry() { +public struct SentrySDKWrapper { + public static let shared = SentrySDKWrapper() + + public func startSentry() { SentrySDK.start(configureOptions: configureSentryOptions(options:)) } func configureSentryOptions(options: Options) { options.dsn = dsn - options.beforeSend = { $0 } - options.beforeSendSpan = { $0 } - options.beforeCaptureScreenshot = { _ in true } - options.beforeCaptureViewHierarchy = { _ in true } + options.beforeSend = { + print("Sentry: beforeSend called") + return $0 + } + options.beforeSendSpan = { + print("Sentry: beforeSendSpan called") + return $0 + } + options.beforeCaptureScreenshot = { _ in + print("Sentry: beforeCaptureScreenshot called") + return true + } + options.beforeCaptureViewHierarchy = { _ in + print("Sentry: beforeCaptureViewHierarchy called") + return true + } options.debug = true if #available(iOS 16.0, *), !SentrySDKOverrides.Other.disableSessionReplay.boolValue { @@ -118,9 +130,9 @@ struct SentrySDKWrapper { } scope.setTag(value: "swift", key: "language") - - scope.injectGitInformation() - + + injectGitInformation(scope: scope) + let user = User(userId: "1") user.email = self.env["--io.sentry.user.email"] ?? "tony@example.com" user.username = username @@ -339,8 +351,8 @@ extension SentrySDKWrapper { // MARK: Convenience access to SDK configuration via launch arg / environment variable extension SentrySDKWrapper { - static let defaultDSN = "https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557" - + public static let defaultDSN = "https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557" + var args: [String] { let args = ProcessInfo.processInfo.arguments print("[iOS-Swift] [debug] launch arguments: \(args)") diff --git a/Samples/SentrySampleShared-Swift/SentrySampleShared.xcodeproj/project.pbxproj b/Samples/SentrySampleShared-Swift/SentrySampleShared.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..8c7f41e8662 --- /dev/null +++ b/Samples/SentrySampleShared-Swift/SentrySampleShared.xcodeproj/project.pbxproj @@ -0,0 +1,481 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 70; + objects = { + +/* Begin PBXBuildFile section */ + 842D54B02DA713F900D3528B /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 842D54AF2DA713F900D3528B /* Sentry.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 842D547C2DA712C200D3528B /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 842D547E2DA712C200D3528B /* libSentrySampleShared-Swift.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libSentrySampleShared-Swift.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 842D54AF2DA713F900D3528B /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 84588F612DB08C5F00827993 /* Sentry.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Sentry.xcodeproj; path = ../../Sentry.xcodeproj; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 842D54802DA712C200D3528B /* SentrySampleShared-Swift */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = "SentrySampleShared-Swift"; sourceTree = ""; }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 842D547B2DA712C200D3528B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 842D54B02DA713F900D3528B /* Sentry.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 842D54752DA712C200D3528B = { + isa = PBXGroup; + children = ( + 84588F612DB08C5F00827993 /* Sentry.xcodeproj */, + 842D54802DA712C200D3528B /* SentrySampleShared-Swift */, + 842D54AE2DA713F900D3528B /* Frameworks */, + 842D547F2DA712C200D3528B /* Products */, + ); + sourceTree = ""; + }; + 842D547F2DA712C200D3528B /* Products */ = { + isa = PBXGroup; + children = ( + 842D547E2DA712C200D3528B /* libSentrySampleShared-Swift.a */, + ); + name = Products; + sourceTree = ""; + }; + 842D54AE2DA713F900D3528B /* Frameworks */ = { + isa = PBXGroup; + children = ( + 842D54AF2DA713F900D3528B /* Sentry.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 842D547D2DA712C200D3528B /* SentrySampleShared-Swift */ = { + isa = PBXNativeTarget; + buildConfigurationList = 842D54852DA712C200D3528B /* Build configuration list for PBXNativeTarget "SentrySampleShared-Swift" */; + buildPhases = ( + 842D547A2DA712C200D3528B /* Sources */, + 842D547B2DA712C200D3528B /* Frameworks */, + 842D547C2DA712C200D3528B /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 842D54802DA712C200D3528B /* SentrySampleShared-Swift */, + ); + name = "SentrySampleShared-Swift"; + packageProductDependencies = ( + ); + productName = "SentrySampleShared-Swift"; + productReference = 842D547E2DA712C200D3528B /* libSentrySampleShared-Swift.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 842D54762DA712C200D3528B /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1620; + LastUpgradeCheck = 1620; + TargetAttributes = { + 842D547D2DA712C200D3528B = { + CreatedOnToolsVersion = 16.2; + LastSwiftMigration = 1620; + }; + }; + }; + buildConfigurationList = 842D54792DA712C200D3528B /* Build configuration list for PBXProject "SentrySampleShared" */; + compatibilityVersion = "Xcode 15.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 842D54752DA712C200D3528B; + minimizedProjectReferenceProxies = 1; + productRefGroup = 842D547F2DA712C200D3528B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 842D547D2DA712C200D3528B /* SentrySampleShared-Swift */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 842D547A2DA712C200D3528B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 842D54832DA712C200D3528B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 842D54842DA712C200D3528B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 842D54862DA712C200D3528B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + "$(ARCHS_STANDARD)", + arm64e, + ); + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 97JCY7859U; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 842D54872DA712C200D3528B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + "$(ARCHS_STANDARD)", + arm64e, + ); + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 97JCY7859U; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 84588F7E2DB08D2200827993 /* Test */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Test; + }; + 84588F7F2DB08D2200827993 /* Test */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + "$(ARCHS_STANDARD)", + arm64e, + ); + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 97JCY7859U; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Test; + }; + 84588F802DB08D2700827993 /* TestCI */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = TestCI; + }; + 84588F812DB08D2700827993 /* TestCI */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + "$(ARCHS_STANDARD)", + arm64e, + ); + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 97JCY7859U; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = TestCI; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 842D54792DA712C200D3528B /* Build configuration list for PBXProject "SentrySampleShared" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 842D54832DA712C200D3528B /* Debug */, + 842D54842DA712C200D3528B /* Release */, + 84588F802DB08D2700827993 /* TestCI */, + 84588F7E2DB08D2200827993 /* Test */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 842D54852DA712C200D3528B /* Build configuration list for PBXNativeTarget "SentrySampleShared-Swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 842D54862DA712C200D3528B /* Debug */, + 842D54872DA712C200D3528B /* Release */, + 84588F812DB08D2700827993 /* TestCI */, + 84588F7F2DB08D2200827993 /* Test */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 842D54762DA712C200D3528B /* Project object */; +} diff --git a/Samples/SentrySampleShared-Swift/SentrySampleShared.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Samples/SentrySampleShared-Swift/SentrySampleShared.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..919434a6254 --- /dev/null +++ b/Samples/SentrySampleShared-Swift/SentrySampleShared.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Samples/SessionReplay-CameraTest/SessionReplay-CameraTest.xcodeproj/project.pbxproj b/Samples/SessionReplay-CameraTest/SessionReplay-CameraTest.xcodeproj/project.pbxproj index 14d9912f5a9..d3026cbdc7e 100644 --- a/Samples/SessionReplay-CameraTest/SessionReplay-CameraTest.xcodeproj/project.pbxproj +++ b/Samples/SessionReplay-CameraTest/SessionReplay-CameraTest.xcodeproj/project.pbxproj @@ -7,10 +7,28 @@ objects = { /* Begin PBXBuildFile section */ + 84588E842DB07A9700827993 /* libSentrySampleShared-Swift.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84588E832DB07A9300827993 /* libSentrySampleShared-Swift.a */; }; D49AA4BF2D9FD48400F51498 /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D49AA4BE2D9FD48400F51498 /* Sentry.framework */; }; D49AA4C02D9FD48400F51498 /* Sentry.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D49AA4BE2D9FD48400F51498 /* Sentry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 84588E7F2DB07A9300827993 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 84588E7C2DB07A9300827993 /* SentrySampleShared.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 842D547D2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; + 84588E822DB07A9300827993 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 84588E7C2DB07A9300827993 /* SentrySampleShared.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 842D547E2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ D49AA4C12D9FD48400F51498 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -26,6 +44,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 84588E7C2DB07A9300827993 /* SentrySampleShared.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SentrySampleShared.xcodeproj; path = "/Users/andrewmcknight/Code/organization/getsentry/repos/public/sentry-cocoa/Samples/SentrySampleShared-Swift/SentrySampleShared.xcodeproj"; sourceTree = ""; }; D49AA4752D9FD43100F51498 /* SessionReplay-CameraTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SessionReplay-CameraTest.app"; sourceTree = BUILT_PRODUCTS_DIR; }; D49AA4BE2D9FD48400F51498 /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -62,6 +81,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 84588E842DB07A9700827993 /* libSentrySampleShared-Swift.a in Frameworks */, D49AA4BF2D9FD48400F51498 /* Sentry.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -69,6 +89,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 84588E7D2DB07A9300827993 /* Products */ = { + isa = PBXGroup; + children = ( + 84588E832DB07A9300827993 /* libSentrySampleShared-Swift.a */, + ); + name = Products; + sourceTree = ""; + }; D49AA46C2D9FD43100F51498 = { isa = PBXGroup; children = ( @@ -76,6 +104,7 @@ D49AA4772D9FD43100F51498 /* Sources */, D49AA4BD2D9FD48400F51498 /* Frameworks */, D49AA4762D9FD43100F51498 /* Products */, + 84588E7C2DB07A9300827993 /* SentrySampleShared.xcodeproj */, ); sourceTree = ""; }; @@ -110,6 +139,7 @@ buildRules = ( ); dependencies = ( + 84588E802DB07A9300827993 /* PBXTargetDependency */, ); fileSystemSynchronizedGroups = ( D49AA4772D9FD43100F51498 /* Sources */, @@ -149,6 +179,12 @@ preferredProjectObjectVersion = 77; productRefGroup = D49AA4762D9FD43100F51498 /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 84588E7D2DB07A9300827993 /* Products */; + ProjectRef = 84588E7C2DB07A9300827993 /* SentrySampleShared.xcodeproj */; + }, + ); projectRoot = ""; targets = ( D49AA4742D9FD43100F51498 /* SessionReplay-CameraTest */, @@ -156,6 +192,16 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 84588E832DB07A9300827993 /* libSentrySampleShared-Swift.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libSentrySampleShared-Swift.a"; + remoteRef = 84588E822DB07A9300827993 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ D49AA4732D9FD43100F51498 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -176,6 +222,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 84588E802DB07A9300827993 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SentrySampleShared-Swift"; + targetProxy = 84588E7F2DB07A9300827993 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ D49AA4892D9FD43200F51498 /* Debug */ = { isa = XCBuildConfiguration; diff --git a/Samples/SessionReplay-CameraTest/Sources/AppDelegate.swift b/Samples/SessionReplay-CameraTest/Sources/AppDelegate.swift index ea0ef3665d4..8a199076316 100644 --- a/Samples/SessionReplay-CameraTest/Sources/AppDelegate.swift +++ b/Samples/SessionReplay-CameraTest/Sources/AppDelegate.swift @@ -1,45 +1,14 @@ import Sentry +import SentrySampleShared_Swift import UIKit @main class AppDelegate: UIResponder, UIApplicationDelegate { - - static var isSessionReplayEnabled = true - static var isExperimentalViewRendererEnabled = true - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - AppDelegate.reloadSentrySDK() - + SentrySDKWrapper.shared.startSentry() return true } - static func reloadSentrySDK() { - if SentrySDK.isEnabled { - print("SentrySDK already started, closing it") - SentrySDK.close() - } - - SentrySDK.start { options in - options.dsn = "https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557" - options.debug = true - - options.tracesSampleRate = 1.0 - options.profilesSampleRate = 1.0 - options.sessionReplay.sessionSampleRate = Self.isSessionReplayEnabled ? 1.0 : 0.0 - - options.initialScope = { scope in - scope.injectGitInformation() - scope.setTag(value: "session-replay-camera-test", key: "sample-project") - return scope - } - - // Experimental features - options.sessionReplay.enableExperimentalViewRenderer = Self.isExperimentalViewRendererEnabled - // Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly - options.sessionReplay.enableFastViewRendering = false - } - } - // MARK: UISceneSession Lifecycle func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { diff --git a/Samples/SessionReplay-CameraTest/Sources/Base.lproj/Main.storyboard b/Samples/SessionReplay-CameraTest/Sources/Base.lproj/Main.storyboard index abb73e9d672..67822f2223f 100644 --- a/Samples/SessionReplay-CameraTest/Sources/Base.lproj/Main.storyboard +++ b/Samples/SessionReplay-CameraTest/Sources/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -18,78 +18,21 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -98,11 +41,8 @@ - - - - + diff --git a/Samples/SessionReplay-CameraTest/Sources/ViewController.swift b/Samples/SessionReplay-CameraTest/Sources/ViewController.swift index 6109923c122..f42d9cd0875 100644 --- a/Samples/SessionReplay-CameraTest/Sources/ViewController.swift +++ b/Samples/SessionReplay-CameraTest/Sources/ViewController.swift @@ -5,11 +5,6 @@ import UIKit class ViewController: UIViewController { @IBOutlet weak var backgroundLabel: UILabel! - @IBOutlet weak var controlsContainerView: UIView! - - @IBOutlet weak var enableSessionReplaySwitch: UISwitch! - @IBOutlet weak var useExperimentalViewRendererSwitch: UISwitch! - private weak var previewView: PreviewView! private weak var errorLabel: UILabel! @@ -29,7 +24,7 @@ class ViewController: UIViewController { private func setupPreviewView() { let previewView = PreviewView() self.previewView = previewView - view.insertSubview(previewView, belowSubview: controlsContainerView) + view.addSubview(previewView) previewView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ @@ -86,15 +81,4 @@ class ViewController: UIViewController { captureSession.startRunning() } } - - @IBAction func didChangeToggleValue(_ sender: UISwitch) { - if sender === enableSessionReplaySwitch { - AppDelegate.isSessionReplayEnabled = sender.isOn - print("Enable session replay flag changed to: \(AppDelegate.isSessionReplayEnabled)") - } else if sender === useExperimentalViewRendererSwitch { - AppDelegate.isExperimentalViewRendererEnabled = sender.isOn - print("Use experimental view renderer flag changed to: \(AppDelegate.isExperimentalViewRendererEnabled)") - } - AppDelegate.reloadSentrySDK() - } } diff --git a/Samples/Shared/GitInjections.swift b/Samples/Shared/GitInjections.swift deleted file mode 100644 index ab36e5892ed..00000000000 --- a/Samples/Shared/GitInjections.swift +++ /dev/null @@ -1,25 +0,0 @@ -import Foundation -import Sentry - -extension Bundle { - var gitCommitHash: String? { - infoDictionary?["GIT_COMMIT_HASH"] as? String - } - var gitBranchName: String? { - infoDictionary?["GIT_BRANCH"] as? String - } - var gitStatusClean: Bool { - (infoDictionary?["GIT_STATUS_CLEAN"] as? String) == "1" - } -} - -extension Scope { - @objc public func injectGitInformation() { - if let commitHash = Bundle.main.gitCommitHash { - setTag(value: "\(commitHash)\(Bundle.main.gitStatusClean ? "" : "-dirty")", key: "git-commit-hash") - } - if let branchName = Bundle.main.gitBranchName { - setTag(value: branchName, key: "git-branch-name") - } - } -} diff --git a/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj b/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj index d53ec1d7c95..1ac9b371b14 100644 --- a/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj +++ b/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj @@ -24,16 +24,20 @@ 7B79000429028C7300A7F467 /* MetricKitManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B79000329028C7300A7F467 /* MetricKitManager.swift */; }; 7BFC8B0626D4D24B000D3504 /* LoremIpsum.txt in Resources */ = {isa = PBXBuildFile; fileRef = 7BFC8B0526D4D24B000D3504 /* LoremIpsum.txt */; }; 840DDB2A2D9EFD49000C17F7 /* BenchmarkingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840DDB292D9EFD49000C17F7 /* BenchmarkingViewController.swift */; }; - 840DDB2C2D9F02CB000C17F7 /* SentrySDKOverrides.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840DDB2B2D9F02CB000C17F7 /* SentrySDKOverrides.swift */; }; - 840DDB2D2D9F02CB000C17F7 /* SentrySDKOverrides.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840DDB2B2D9F02CB000C17F7 /* SentrySDKOverrides.swift */; }; 841C8A202DA7266E00DCA74F /* FeaturesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841C8A1F2DA7266E00DCA74F /* FeaturesViewController.swift */; }; 841C8A212DA7266E00DCA74F /* FeaturesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841C8A1F2DA7266E00DCA74F /* FeaturesViewController.swift */; }; 841C8A232DA7273400DCA74F /* LaunchArgumentTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841C8A222DA7273400DCA74F /* LaunchArgumentTableViewCell.swift */; }; 841C8A242DA7273400DCA74F /* LaunchArgumentTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841C8A222DA7273400DCA74F /* LaunchArgumentTableViewCell.swift */; }; 841C8A262DA7273E00DCA74F /* EnvironmentVariableTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841C8A252DA7273E00DCA74F /* EnvironmentVariableTableViewCell.swift */; }; 841C8A272DA7273E00DCA74F /* EnvironmentVariableTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841C8A252DA7273E00DCA74F /* EnvironmentVariableTableViewCell.swift */; }; + 841C8A5F2DA740D100DCA74F /* libSentrySampleShared-Swift.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 842D549F2DA712ED00D3528B /* libSentrySampleShared-Swift.a */; }; + 842D54AA2DA7135F00D3528B /* libSentrySampleShared-Swift.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 842D549F2DA712ED00D3528B /* libSentrySampleShared-Swift.a */; }; + 842D54AD2DA7138700D3528B /* libSentrySampleShared-Swift.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 842D549F2DA712ED00D3528B /* libSentrySampleShared-Swift.a */; }; + 842D54B12DA7169800D3528B /* libSentrySampleShared-Swift.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 842D549F2DA712ED00D3528B /* libSentrySampleShared-Swift.a */; }; 844DA821282584C300E6B62E /* CoreDataViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F57BC427BBD787000D09D4 /* CoreDataViewController.swift */; }; 844DA822282584F700E6B62E /* SentryData.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = D845F35927BAD4CC00A4D7A2 /* SentryData.xcdatamodeld */; }; + 845892202DB1849A00827993 /* UIViewControllerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8458921F2DB1849A00827993 /* UIViewControllerExtension.swift */; }; + 845892212DB1849A00827993 /* UIViewControllerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8458921F2DB1849A00827993 /* UIViewControllerExtension.swift */; }; 847670302BAA4AFA001A4E31 /* NSObject+SentryAppSetup.m in Sources */ = {isa = PBXBuildFile; fileRef = 8476702F2BAA4AFA001A4E31 /* NSObject+SentryAppSetup.m */; }; 848A256D286E3351008A8858 /* fatal-error-binary-images-message2.json in Resources */ = {isa = PBXBuildFile; fileRef = D83A30DF279F1F5C00372D0A /* fatal-error-binary-images-message2.json */; }; 849C4A692D66CA1600FA632D /* screenshot.png in Resources */ = {isa = PBXBuildFile; fileRef = 849C4A682D66CA1600FA632D /* screenshot.png */; }; @@ -48,14 +52,9 @@ 84BA71F12C8BC55A0045B828 /* Toasts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA71F02C8BC55A0045B828 /* Toasts.swift */; }; 84BA71F22C8F73FD0045B828 /* DSNDisplayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA71E32C8BBBEC0045B828 /* DSNDisplayViewController.swift */; }; 84BA71F32C8F74080045B828 /* Toasts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA71F02C8BC55A0045B828 /* Toasts.swift */; }; - 84BA72A72C93698E0045B828 /* GitInjections.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA72A52C93698E0045B828 /* GitInjections.swift */; }; - 84BA72A82C93698E0045B828 /* GitInjections.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA72A52C93698E0045B828 /* GitInjections.swift */; }; - 84BA72DE2C9391920045B828 /* GitInjections.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA72A52C93698E0045B828 /* GitInjections.swift */; }; 84BE546F287503F100ACC735 /* SentrySDKPerformanceBenchmarkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 84BE546E287503F100ACC735 /* SentrySDKPerformanceBenchmarkTests.m */; }; 84BE547E287645B900ACC735 /* SentryProcessInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 84BE54792876451D00ACC735 /* SentryProcessInfo.m */; }; 84DBC6252CE6D321000C4904 /* UserFeedbackUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84DBC61F2CE6D31C000C4904 /* UserFeedbackUITests.swift */; }; - 84EEE6632D28B35700010A9D /* SentrySDKWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84EEE6612D28B35700010A9D /* SentrySDKWrapper.swift */; }; - 84EEE6642D2CABF500010A9D /* SentrySDKWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84EEE6612D28B35700010A9D /* SentrySDKWrapper.swift */; }; 84FB812A284001B800F3A94A /* SentryBenchmarking.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84FB8129284001B800F3A94A /* SentryBenchmarking.mm */; }; 84FB812B284001B800F3A94A /* SentryBenchmarking.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84FB8129284001B800F3A94A /* SentryBenchmarking.mm */; }; 8E8C57AF25EF16E6001CEEFA /* TraceTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E8C57AE25EF16E6001CEEFA /* TraceTestViewController.swift */; }; @@ -84,13 +83,9 @@ D840D52F273A07F600CDF142 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D840D52D273A07F600CDF142 /* LaunchScreen.storyboard */; }; D840D534273A07F600CDF142 /* iOS-SwiftClip.app in Embed App Clips */ = {isa = PBXBuildFile; fileRef = D840D520273A07F400CDF142 /* iOS-SwiftClip.app */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; D840D53C273A08F100CDF142 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D840D53B273A08F100CDF142 /* Assets.xcassets */; }; - D8444E4C275E38090042F4DE /* UIViewControllerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8444E4B275E38090042F4DE /* UIViewControllerExtension.swift */; }; D8444E51275F79240042F4DE /* AssertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D05E274E6A8B00B56F8C /* AssertView.swift */; }; D8444E53275F792A0042F4DE /* UIAssert.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D7BB492750067900044146 /* UIAssert.swift */; }; D8444E54275F794D0042F4DE /* SpanObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D7BB4D27501B9400044146 /* SpanObserver.swift */; }; - D8444E55275F79570042F4DE /* SpanExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D061274EBD4800B56F8C /* SpanExtension.swift */; }; - D8444E56275F79590042F4DE /* UIViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D7BB4B2750095800044146 /* UIViewExtension.swift */; }; - D8444E57275F795D0042F4DE /* UIViewControllerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8444E4B275E38090042F4DE /* UIViewControllerExtension.swift */; }; D845F35B27BAD4CC00A4D7A2 /* SentryData.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = D845F35927BAD4CC00A4D7A2 /* SentryData.xcdatamodeld */; }; D85DAA4C274C244F004DF43C /* LaunchUITest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85DAA4B274C244F004DF43C /* LaunchUITest.swift */; }; D86B9C972CDD11430039211C /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D86B9C962CDD11430039211C /* Sentry.framework */; }; @@ -119,20 +114,16 @@ D8C33E2629FBB8D90071B75A /* UIEventBreadcrumbTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8C33E2529FBB8D90071B75A /* UIEventBreadcrumbTests.swift */; }; D8C484852CCF902F00503B14 /* SampleAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 62C97DB92CC69B0200DDA204 /* SampleAssets.xcassets */; }; D8D7BB4A2750067900044146 /* UIAssert.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D7BB492750067900044146 /* UIAssert.swift */; }; - D8D7BB4C2750095800044146 /* UIViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D7BB4B2750095800044146 /* UIViewExtension.swift */; }; D8D7BB4E27501B9400044146 /* SpanObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D7BB4D27501B9400044146 /* SpanObserver.swift */; }; D8DA29042C7F2199008BC825 /* SRRedactSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DA29032C7F2199008BC825 /* SRRedactSampleViewController.swift */; }; D8DBDA76274D591F00007380 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DBDA75274D591F00007380 /* TableViewController.swift */; }; D8DBDA78274D5FC400007380 /* SplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DBDA77274D5FC400007380 /* SplitViewController.swift */; }; D8F01DEA2A1376B5008F4996 /* InfoForBreadcrumbController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F01DE92A1376B5008F4996 /* InfoForBreadcrumbController.swift */; }; - D8F3D052274E572F00B56F8C /* DSNStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D04F274E572F00B56F8C /* DSNStorage.swift */; }; - D8F3D053274E572F00B56F8C /* DSNStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D04F274E572F00B56F8C /* DSNStorage.swift */; }; D8F3D054274E572F00B56F8C /* RandomErrors.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D051274E572F00B56F8C /* RandomErrors.swift */; }; D8F3D055274E572F00B56F8C /* RandomErrors.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D051274E572F00B56F8C /* RandomErrors.swift */; }; D8F3D057274E574200B56F8C /* LoremIpsumViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D056274E574200B56F8C /* LoremIpsumViewController.swift */; }; D8F3D058274E57D600B56F8C /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DBDA75274D591F00007380 /* TableViewController.swift */; }; D8F3D05F274E6A8B00B56F8C /* AssertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D05E274E6A8B00B56F8C /* AssertView.swift */; }; - D8F3D062274EBD4800B56F8C /* SpanExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D061274EBD4800B56F8C /* SpanExtension.swift */; }; D8F57BC527BBD787000D09D4 /* CoreDataViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F57BC427BBD787000D09D4 /* CoreDataViewController.swift */; }; D8F71A4F2CDD03B900334022 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F71A4E2CDD03B900334022 /* AppDelegate.swift */; }; D8F71A512CDD03B900334022 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F71A502CDD03B900334022 /* SceneDelegate.swift */; }; @@ -153,6 +144,41 @@ remoteGlobalIDString = 637AFDA5243B02760034958B; remoteInfo = "iOS-Swift"; }; + 841C8A602DA740D400DCA74F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 842D54882DA712E700D3528B /* SentrySampleShared.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 842D547D2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; + 842D549E2DA712ED00D3528B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 842D54882DA712E700D3528B /* SentrySampleShared.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 842D547E2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; + 842D54A82DA7135A00D3528B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 842D54882DA712E700D3528B /* SentrySampleShared.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 842D547D2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; + 842D54AB2DA7138400D3528B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 842D54882DA712E700D3528B /* SentrySampleShared.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 842D547D2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; + 842D54B22DA7169B00D3528B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 842D54882DA712E700D3528B /* SentrySampleShared.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 842D547D2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; 848A2564286E3351008A8858 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 637AFD9E243B02760034958B /* Project object */; @@ -284,10 +310,11 @@ 7B79000329028C7300A7F467 /* MetricKitManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MetricKitManager.swift; sourceTree = ""; }; 7BFC8B0526D4D24B000D3504 /* LoremIpsum.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = LoremIpsum.txt; sourceTree = ""; }; 840DDB292D9EFD49000C17F7 /* BenchmarkingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BenchmarkingViewController.swift; sourceTree = ""; }; - 840DDB2B2D9F02CB000C17F7 /* SentrySDKOverrides.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKOverrides.swift; sourceTree = ""; }; 841C8A1F2DA7266E00DCA74F /* FeaturesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeaturesViewController.swift; sourceTree = ""; }; 841C8A222DA7273400DCA74F /* LaunchArgumentTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchArgumentTableViewCell.swift; sourceTree = ""; }; 841C8A252DA7273E00DCA74F /* EnvironmentVariableTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnvironmentVariableTableViewCell.swift; sourceTree = ""; }; + 842D54882DA712E700D3528B /* SentrySampleShared.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SentrySampleShared.xcodeproj; path = "../SentrySampleShared-Swift/SentrySampleShared.xcodeproj"; sourceTree = SOURCE_ROOT; }; + 8458921F2DB1849A00827993 /* UIViewControllerExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewControllerExtension.swift; sourceTree = ""; }; 8476702E2BAA4AFA001A4E31 /* NSObject+SentryAppSetup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSObject+SentryAppSetup.h"; sourceTree = ""; }; 8476702F2BAA4AFA001A4E31 /* NSObject+SentryAppSetup.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SentryAppSetup.m"; sourceTree = ""; }; 848A2573286E3351008A8858 /* PerformanceBenchmarks.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PerformanceBenchmarks.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -303,12 +330,10 @@ 84B527BC28DD25E400475E8D /* SentryDevice.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SentryDevice.mm; path = ../../../Sources/Sentry/SentryDevice.mm; sourceTree = ""; }; 84BA71E32C8BBBEC0045B828 /* DSNDisplayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DSNDisplayViewController.swift; sourceTree = ""; }; 84BA71F02C8BC55A0045B828 /* Toasts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Toasts.swift; sourceTree = ""; }; - 84BA72A52C93698E0045B828 /* GitInjections.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GitInjections.swift; sourceTree = ""; }; 84BE546E287503F100ACC735 /* SentrySDKPerformanceBenchmarkTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySDKPerformanceBenchmarkTests.m; sourceTree = ""; }; 84BE54782876451D00ACC735 /* SentryProcessInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryProcessInfo.h; sourceTree = ""; }; 84BE54792876451D00ACC735 /* SentryProcessInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryProcessInfo.m; sourceTree = ""; }; 84DBC61F2CE6D31C000C4904 /* UserFeedbackUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserFeedbackUITests.swift; sourceTree = ""; }; - 84EEE6612D28B35700010A9D /* SentrySDKWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKWrapper.swift; sourceTree = ""; }; 84FB8125284001B800F3A94A /* SentryBenchmarking.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryBenchmarking.h; sourceTree = ""; }; 84FB8129284001B800F3A94A /* SentryBenchmarking.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryBenchmarking.mm; sourceTree = ""; }; 84FB812C2840021B00F3A94A /* iOS-Swift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iOS-Swift-Bridging-Header.h"; sourceTree = ""; }; @@ -333,7 +358,6 @@ D840D530273A07F600CDF142 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D840D531273A07F600CDF142 /* iOS_SwiftClip.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = iOS_SwiftClip.entitlements; sourceTree = ""; }; D840D53B273A08F100CDF142 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - D8444E4B275E38090042F4DE /* UIViewControllerExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewControllerExtension.swift; sourceTree = ""; }; D845F35A27BAD4CC00A4D7A2 /* Person.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Person.xcdatamodel; sourceTree = ""; }; D85DAA49274C244F004DF43C /* iOS13-SwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "iOS13-SwiftTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; D85DAA4B274C244F004DF43C /* LaunchUITest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchUITest.swift; sourceTree = ""; }; @@ -354,18 +378,15 @@ D8C33E1E29FBB1F70071B75A /* UIEventBreadcrumbsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIEventBreadcrumbsController.swift; sourceTree = ""; }; D8C33E2529FBB8D90071B75A /* UIEventBreadcrumbTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIEventBreadcrumbTests.swift; sourceTree = ""; }; D8D7BB492750067900044146 /* UIAssert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIAssert.swift; sourceTree = ""; }; - D8D7BB4B2750095800044146 /* UIViewExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewExtension.swift; sourceTree = ""; }; D8D7BB4D27501B9400044146 /* SpanObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpanObserver.swift; sourceTree = ""; }; D8DA29032C7F2199008BC825 /* SRRedactSampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRRedactSampleViewController.swift; sourceTree = ""; }; D8DBDA75274D591F00007380 /* TableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; }; D8DBDA77274D5FC400007380 /* SplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitViewController.swift; sourceTree = ""; }; D8F01DE92A1376B5008F4996 /* InfoForBreadcrumbController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoForBreadcrumbController.swift; sourceTree = ""; }; D8F01DF02A1377D0008F4996 /* SentryExposure.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryExposure.h; sourceTree = ""; }; - D8F3D04F274E572F00B56F8C /* DSNStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DSNStorage.swift; sourceTree = ""; }; D8F3D051274E572F00B56F8C /* RandomErrors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RandomErrors.swift; sourceTree = ""; }; D8F3D056274E574200B56F8C /* LoremIpsumViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoremIpsumViewController.swift; sourceTree = ""; }; D8F3D05E274E6A8B00B56F8C /* AssertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssertView.swift; sourceTree = ""; }; - D8F3D061274EBD4800B56F8C /* SpanExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpanExtension.swift; sourceTree = ""; }; D8F57BC427BBD787000D09D4 /* CoreDataViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreDataViewController.swift; sourceTree = ""; }; D8F71A4C2CDD03B900334022 /* iOS-Swift6.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS-Swift6.app"; sourceTree = BUILT_PRODUCTS_DIR; }; D8F71A4E2CDD03B900334022 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -385,6 +406,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 842D54AA2DA7135F00D3528B /* libSentrySampleShared-Swift.a in Frameworks */, D86B9C972CDD11430039211C /* Sentry.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -407,6 +429,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 842D54B12DA7169800D3528B /* libSentrySampleShared-Swift.a in Frameworks */, D86B9C9A2CDD114E0039211C /* Sentry.framework in Frameworks */, D86B9CA32CDD136A0039211C /* SentrySwiftUI.framework in Frameworks */, ); @@ -416,6 +439,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 842D54AD2DA7138700D3528B /* libSentrySampleShared-Swift.a in Frameworks */, D86B9C9D2CDD115A0039211C /* Sentry.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -431,6 +455,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 841C8A5F2DA740D100DCA74F /* libSentrySampleShared-Swift.a in Frameworks */, D8F71A822CDD04C200334022 /* (null) in Frameworks */, D86B9CA02CDD11670039211C /* Sentry.framework in Frameworks */, ); @@ -461,6 +486,7 @@ 637AFD9D243B02760034958B = { isa = PBXGroup; children = ( + 842D54882DA712E700D3528B /* SentrySampleShared.xcodeproj */, 62C97DB92CC69B0200DDA204 /* SampleAssets.xcassets */, 84BA72A62C93698E0045B828 /* Shared */, 848A2576286E3490008A8858 /* PerformanceBenchmarks */, @@ -496,14 +522,11 @@ 637AFDA8243B02760034958B /* iOS-Swift */ = { isa = PBXGroup; children = ( - D8F3D060274EBD3000B56F8C /* Extensions */, D8F3D05C274E6A5700B56F8C /* View */, D8DBDA74274D4E1600007380 /* Tools */, D8DBDA73274D4DF900007380 /* ViewControllers */, 63F93AA9245AC91600A500DB /* iOS-Swift.entitlements */, 637AFDA9243B02760034958B /* AppDelegate.swift */, - 84EEE6612D28B35700010A9D /* SentrySDKWrapper.swift */, - 840DDB2B2D9F02CB000C17F7 /* SentrySDKOverrides.swift */, 637AFDAD243B02760034958B /* TransactionsViewController.swift */, 84AB90782A50031B0054C99A /* Profiling */, D80D021229EE93630084393D /* ErrorsViewController.swift */, @@ -518,6 +541,7 @@ 841C8A1F2DA7266E00DCA74F /* FeaturesViewController.swift */, 841C8A222DA7273400DCA74F /* LaunchArgumentTableViewCell.swift */, 841C8A252DA7273E00DCA74F /* EnvironmentVariableTableViewCell.swift */, + 8458921F2DB1849A00827993 /* UIViewControllerExtension.swift */, ); path = "iOS-Swift"; sourceTree = ""; @@ -541,6 +565,14 @@ path = "iOS-Swift-UITests"; sourceTree = ""; }; + 842D549B2DA712ED00D3528B /* Products */ = { + isa = PBXGroup; + children = ( + 842D549F2DA712ED00D3528B /* libSentrySampleShared-Swift.a */, + ); + name = Products; + sourceTree = ""; + }; 848A2576286E3490008A8858 /* PerformanceBenchmarks */ = { isa = PBXGroup; children = ( @@ -568,7 +600,6 @@ 84BA72A62C93698E0045B828 /* Shared */ = { isa = PBXGroup; children = ( - 84BA72A52C93698E0045B828 /* GitInjections.swift */, 849C4A682D66CA1600FA632D /* screenshot.png */, ); name = Shared; @@ -643,7 +674,6 @@ D8832B122AF4F7FE00C522B0 /* TopViewControllerInspector.swift */, 84FB8125284001B800F3A94A /* SentryBenchmarking.h */, 84FB8129284001B800F3A94A /* SentryBenchmarking.mm */, - D8F3D04F274E572F00B56F8C /* DSNStorage.swift */, D8F3D051274E572F00B56F8C /* RandomErrors.swift */, D8D7BB492750067900044146 /* UIAssert.swift */, D8D7BB4D27501B9400044146 /* SpanObserver.swift */, @@ -666,16 +696,6 @@ path = View; sourceTree = ""; }; - D8F3D060274EBD3000B56F8C /* Extensions */ = { - isa = PBXGroup; - children = ( - D8F3D061274EBD4800B56F8C /* SpanExtension.swift */, - D8D7BB4B2750095800044146 /* UIViewExtension.swift */, - D8444E4B275E38090042F4DE /* UIViewControllerExtension.swift */, - ); - path = Extensions; - sourceTree = ""; - }; D8F71A4D2CDD03B900334022 /* iOS-Swift6 */ = { isa = PBXGroup; children = ( @@ -716,6 +736,7 @@ buildRules = ( ); dependencies = ( + 842D54A92DA7135A00D3528B /* PBXTargetDependency */, D840D533273A07F600CDF142 /* PBXTargetDependency */, ); name = "iOS-Swift"; @@ -779,6 +800,7 @@ buildRules = ( ); dependencies = ( + 842D54B32DA7169B00D3528B /* PBXTargetDependency */, ); name = "iOS13-Swift"; packageProductDependencies = ( @@ -801,6 +823,7 @@ buildRules = ( ); dependencies = ( + 842D54AC2DA7138400D3528B /* PBXTargetDependency */, ); name = "iOS-SwiftClip"; productName = "iOS-SwiftClip"; @@ -837,6 +860,7 @@ buildRules = ( ); dependencies = ( + 841C8A612DA740D400DCA74F /* PBXTargetDependency */, ); name = "iOS-Swift6"; productName = "iOS-Swift6"; @@ -914,6 +938,12 @@ ); productRefGroup = 637AFDA7243B02760034958B /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 842D549B2DA712ED00D3528B /* Products */; + ProjectRef = 842D54882DA712E700D3528B /* SentrySampleShared.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 637AFDA5243B02760034958B /* iOS-Swift */, @@ -928,6 +958,16 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 842D549F2DA712ED00D3528B /* libSentrySampleShared-Swift.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libSentrySampleShared-Swift.a"; + remoteRef = 842D549E2DA712ED00D3528B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 637AFDA4243B02760034958B /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -1129,23 +1169,20 @@ D8F3D05F274E6A8B00B56F8C /* AssertView.swift in Sources */, D890CD3F26CEE31B001246CF /* NibViewController.swift in Sources */, D845F35B27BAD4CC00A4D7A2 /* SentryData.xcdatamodeld in Sources */, - D8444E4C275E38090042F4DE /* UIViewControllerExtension.swift in Sources */, 637AFDAE243B02760034958B /* TransactionsViewController.swift in Sources */, D8832B132AF4F7FE00C522B0 /* TopViewControllerInspector.swift in Sources */, D8DA29042C7F2199008BC825 /* SRRedactSampleViewController.swift in Sources */, 0AABE2EA28855FF80057ED69 /* PermissionsViewController.swift in Sources */, 84BA71E42C8BBBEC0045B828 /* DSNDisplayViewController.swift in Sources */, 7B5525B32938B5B5006A2932 /* DiskWriteException.swift in Sources */, - 84BA72A72C93698E0045B828 /* GitInjections.swift in Sources */, - D8F3D062274EBD4800B56F8C /* SpanExtension.swift in Sources */, 637AFDAA243B02760034958B /* AppDelegate.swift in Sources */, D8F57BC527BBD787000D09D4 /* CoreDataViewController.swift in Sources */, D8D7BB4E27501B9400044146 /* SpanObserver.swift in Sources */, D8F01DEA2A1376B5008F4996 /* InfoForBreadcrumbController.swift in Sources */, D8832B1E2AF52D0500C522B0 /* PageViewController.swift in Sources */, - 840DDB2C2D9F02CB000C17F7 /* SentrySDKOverrides.swift in Sources */, D8DBDA76274D591F00007380 /* TableViewController.swift in Sources */, D8C33E1F29FBB1F70071B75A /* UIEventBreadcrumbsController.swift in Sources */, + 845892212DB1849A00827993 /* UIViewControllerExtension.swift in Sources */, 8E8C57AF25EF16E6001CEEFA /* TraceTestViewController.swift in Sources */, 841C8A202DA7266E00DCA74F /* FeaturesViewController.swift in Sources */, 84AB90712A5001000054C99A /* ProfilingViewController.swift in Sources */, @@ -1153,18 +1190,15 @@ 84FB812A284001B800F3A94A /* SentryBenchmarking.mm in Sources */, 84ACC4432A73CD0700932A18 /* ProfilingCPUWork.swift in Sources */, 847670302BAA4AFA001A4E31 /* NSObject+SentryAppSetup.m in Sources */, - D8F3D052274E572F00B56F8C /* DSNStorage.swift in Sources */, D8F3D054274E572F00B56F8C /* RandomErrors.swift in Sources */, 841C8A232DA7273400DCA74F /* LaunchArgumentTableViewCell.swift in Sources */, D80D021329EE93630084393D /* ErrorsViewController.swift in Sources */, - D8D7BB4C2750095800044146 /* UIViewExtension.swift in Sources */, 7B79000429028C7300A7F467 /* MetricKitManager.swift in Sources */, D8D7BB4A2750067900044146 /* UIAssert.swift in Sources */, D8F3D057274E574200B56F8C /* LoremIpsumViewController.swift in Sources */, 84BA71F12C8BC55A0045B828 /* Toasts.swift in Sources */, 629EC8AD2B0B537400858855 /* TriggerAppHang.swift in Sources */, D8AE48C92C57DC2F0092A2A6 /* WebViewController.swift in Sources */, - 84EEE6632D28B35700010A9D /* SentrySDKWrapper.swift in Sources */, 841C8A272DA7273E00DCA74F /* EnvironmentVariableTableViewCell.swift in Sources */, D8DBDA78274D5FC400007380 /* SplitViewController.swift in Sources */, 84ACC43C2A73CB5900932A18 /* ProfilingNetworkScanner.swift in Sources */, @@ -1208,25 +1242,19 @@ 841C8A242DA7273400DCA74F /* LaunchArgumentTableViewCell.swift in Sources */, D8AE48CF2C57E0BD0092A2A6 /* WebViewController.swift in Sources */, 84BA71F22C8F73FD0045B828 /* DSNDisplayViewController.swift in Sources */, - D8444E56275F79590042F4DE /* UIViewExtension.swift in Sources */, D8269A57274C0FA100BD5BD5 /* NibViewController.swift in Sources */, D8269A4E274C09A400BD5BD5 /* SwiftUIViewController.swift in Sources */, D8269A4F274C09A400BD5BD5 /* SwiftUIView.swift in Sources */, - D8444E57275F795D0042F4DE /* UIViewControllerExtension.swift in Sources */, - 84BA72A82C93698E0045B828 /* GitInjections.swift in Sources */, - 840DDB2D2D9F02CB000C17F7 /* SentrySDKOverrides.swift in Sources */, 924857562C89A86300774AC3 /* MainViewController.swift in Sources */, D8F3D058274E57D600B56F8C /* TableViewController.swift in Sources */, 7B5525B62938B644006A2932 /* DiskWriteException.swift in Sources */, - 84EEE6642D2CABF500010A9D /* SentrySDKWrapper.swift in Sources */, D8269A58274C0FC700BD5BD5 /* TransactionsViewController.swift in Sources */, 844DA821282584C300E6B62E /* CoreDataViewController.swift in Sources */, - D8444E55275F79570042F4DE /* SpanExtension.swift in Sources */, D8832B1F2AF535B200C522B0 /* PageViewController.swift in Sources */, D8444E51275F79240042F4DE /* AssertView.swift in Sources */, 844DA822282584F700E6B62E /* SentryData.xcdatamodeld in Sources */, - D8F3D053274E572F00B56F8C /* DSNStorage.swift in Sources */, 84FB812B284001B800F3A94A /* SentryBenchmarking.mm in Sources */, + 845892202DB1849A00827993 /* UIViewControllerExtension.swift in Sources */, D8F3D055274E572F00B56F8C /* RandomErrors.swift in Sources */, 0AAAB8572887F7C60011845C /* PermissionsViewController.swift in Sources */, D8269A3C274C095E00BD5BD5 /* AppDelegate.swift in Sources */, @@ -1246,7 +1274,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 84BA72DE2C9391920045B828 /* GitInjections.swift in Sources */, D840D527273A07F400CDF142 /* ViewController.swift in Sources */, D840D523273A07F400CDF142 /* AppDelegate.swift in Sources */, D840D525273A07F400CDF142 /* SceneDelegate.swift in Sources */, @@ -1287,6 +1314,26 @@ target = 637AFDA5243B02760034958B /* iOS-Swift */; targetProxy = 7B64386D26A6C544000D0F65 /* PBXContainerItemProxy */; }; + 841C8A612DA740D400DCA74F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SentrySampleShared-Swift"; + targetProxy = 841C8A602DA740D400DCA74F /* PBXContainerItemProxy */; + }; + 842D54A92DA7135A00D3528B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SentrySampleShared-Swift"; + targetProxy = 842D54A82DA7135A00D3528B /* PBXContainerItemProxy */; + }; + 842D54AC2DA7138400D3528B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SentrySampleShared-Swift"; + targetProxy = 842D54AB2DA7138400D3528B /* PBXContainerItemProxy */; + }; + 842D54B32DA7169B00D3528B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SentrySampleShared-Swift"; + targetProxy = 842D54B22DA7169B00D3528B /* PBXContainerItemProxy */; + }; 848A2563286E3351008A8858 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 637AFDA5243B02760034958B /* iOS-Swift */; diff --git a/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift b/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift index 2a68fb41113..54ba787270f 100644 --- a/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift +++ b/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift @@ -1,3 +1,4 @@ +import SentrySampleShared_Swift import UIKit @UIApplicationMain diff --git a/Samples/iOS-Swift/iOS-Swift/EnvironmentVariableTableViewCell.swift b/Samples/iOS-Swift/iOS-Swift/EnvironmentVariableTableViewCell.swift index f33f689d36c..18f6fd2cf93 100644 --- a/Samples/iOS-Swift/iOS-Swift/EnvironmentVariableTableViewCell.swift +++ b/Samples/iOS-Swift/iOS-Swift/EnvironmentVariableTableViewCell.swift @@ -1,3 +1,4 @@ +import SentrySampleShared_Swift import UIKit class EnvironmentVariableTableViewCell: UITableViewCell, UITextFieldDelegate { diff --git a/Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift b/Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift index e84f9265128..f7691ec4111 100644 --- a/Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift +++ b/Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift @@ -1,5 +1,6 @@ import Foundation import Sentry +import SentrySampleShared_Swift import UIKit class ExtraViewController: UIViewController { diff --git a/Samples/iOS-Swift/iOS-Swift/FeaturesViewController.swift b/Samples/iOS-Swift/iOS-Swift/FeaturesViewController.swift index 5ff6a92da9f..5227a16226c 100644 --- a/Samples/iOS-Swift/iOS-Swift/FeaturesViewController.swift +++ b/Samples/iOS-Swift/iOS-Swift/FeaturesViewController.swift @@ -1,3 +1,4 @@ +import SentrySampleShared_Swift import UIKit class FeaturesViewController: UITableViewController { diff --git a/Samples/iOS-Swift/iOS-Swift/LaunchArgumentTableViewCell.swift b/Samples/iOS-Swift/iOS-Swift/LaunchArgumentTableViewCell.swift index f29a3d07b17..c5f8ff3ffdd 100644 --- a/Samples/iOS-Swift/iOS-Swift/LaunchArgumentTableViewCell.swift +++ b/Samples/iOS-Swift/iOS-Swift/LaunchArgumentTableViewCell.swift @@ -1,3 +1,4 @@ +import SentrySampleShared_Swift import UIKit class LaunchArgumentTableViewCell: UITableViewCell { diff --git a/Samples/iOS-Swift/iOS-Swift/Profiling/ProfilingViewController.swift b/Samples/iOS-Swift/iOS-Swift/Profiling/ProfilingViewController.swift index 549bbbf88c2..e4c80fdbe70 100644 --- a/Samples/iOS-Swift/iOS-Swift/Profiling/ProfilingViewController.swift +++ b/Samples/iOS-Swift/iOS-Swift/Profiling/ProfilingViewController.swift @@ -1,4 +1,5 @@ import Sentry +import SentrySampleShared_Swift import UIKit class ProfilingViewController: UIViewController, UITextFieldDelegate { diff --git a/Samples/iOS-Swift/iOS-Swift/Tools/DSNDisplayViewController.swift b/Samples/iOS-Swift/iOS-Swift/Tools/DSNDisplayViewController.swift index adeec5511e5..7f9cba8a165 100644 --- a/Samples/iOS-Swift/iOS-Swift/Tools/DSNDisplayViewController.swift +++ b/Samples/iOS-Swift/iOS-Swift/Tools/DSNDisplayViewController.swift @@ -1,3 +1,4 @@ +import SentrySampleShared_Swift import UIKit let fontSize: CGFloat = 12 diff --git a/Samples/iOS-Swift/iOS-Swift/Extensions/UIViewControllerExtension.swift b/Samples/iOS-Swift/iOS-Swift/UIViewControllerExtension.swift similarity index 100% rename from Samples/iOS-Swift/iOS-Swift/Extensions/UIViewControllerExtension.swift rename to Samples/iOS-Swift/iOS-Swift/UIViewControllerExtension.swift diff --git a/Samples/iOS-Swift/iOS-Swift6/AppDelegate.swift b/Samples/iOS-Swift/iOS-Swift6/AppDelegate.swift index 7c3e3a4e33c..3457decf054 100644 --- a/Samples/iOS-Swift/iOS-Swift6/AppDelegate.swift +++ b/Samples/iOS-Swift/iOS-Swift6/AppDelegate.swift @@ -1,45 +1,11 @@ import Sentry +import SentrySampleShared_Swift import UIKit @main class AppDelegate: UIResponder, UIApplicationDelegate { - - func startSentry() { - SentrySDK.start(configureOptions: { options in - options.dsn = "https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557" - options.beforeSend = { event in - print("Sentry: beforeSend called") - return event - } - options.beforeSendSpan = { span in - print("Sentry: beforeSendSpan called") - return span - } - options.beforeCaptureScreenshot = { _ in - print("Sentry: beforeCaptureScreenshot called") - return true - } - options.beforeCaptureViewHierarchy = { _ in - print("Sentry: beforeCaptureViewHierarchy called") - return true - } - options.attachScreenshot = true - options.attachViewHierarchy = true - options.debug = true - options.sampleRate = 1 - options.tracesSampleRate = 1 - - // Experimental features - options.experimental.enableFileManagerSwizzling = true - options.sessionReplay.enableExperimentalViewRenderer = true - // Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly - options.sessionReplay.enableFastViewRendering = false - }) - - } - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - startSentry() + SentrySDKWrapper.shared.startSentry() return true } @@ -47,8 +13,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } - - func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { - } - } diff --git a/Samples/iOS-Swift/iOS-SwiftClip/AppDelegate.swift b/Samples/iOS-Swift/iOS-SwiftClip/AppDelegate.swift index 472ffdce40e..c11d098d17e 100644 --- a/Samples/iOS-Swift/iOS-SwiftClip/AppDelegate.swift +++ b/Samples/iOS-Swift/iOS-SwiftClip/AppDelegate.swift @@ -1,32 +1,12 @@ import Sentry +import SentrySampleShared_Swift import UIKit @main class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - - SentrySDK.start { options in - options.dsn = "https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557" - options.beforeSend = { event in - return event - } - options.debug = true - // Sampling 100% - In Production you probably want to adjust this - options.tracesSampleRate = 1.0 - options.sessionTrackingIntervalMillis = 5_000 - options.initialScope = { scope in - scope.injectGitInformation() - return scope - } - - // Experimental features - options.experimental.enableFileManagerSwizzling = true - options.sessionReplay.enableExperimentalViewRenderer = true - // Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly - options.sessionReplay.enableFastViewRendering = false - } - + SentrySDKWrapper.shared.startSentry() return true } @@ -37,11 +17,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } - - func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { - // Called when the user discards a scene session. - // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. - // Use this method to release any resources that were specific to the discarded scenes, as they will not return. - } - } diff --git a/Samples/iOS-Swift/iOS13-Swift/AppDelegate.swift b/Samples/iOS-Swift/iOS13-Swift/AppDelegate.swift index e863beb72cb..1a54ecfd14d 100644 --- a/Samples/iOS-Swift/iOS13-Swift/AppDelegate.swift +++ b/Samples/iOS-Swift/iOS13-Swift/AppDelegate.swift @@ -1,52 +1,11 @@ import Sentry +import SentrySampleShared_Swift import UIKit @main class AppDelegate: UIResponder, UIApplicationDelegate { - - static let defaultDSN = "https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557" - - func startSentry() { - // For testing purposes, we want to be able to change the DSN and store it to disk. In a real app, you shouldn't need this behavior. - var storedDsn: String? - do { - storedDsn = try DSNStorage.shared.getDSN() - try DSNStorage.shared.saveDSN(dsn: storedDsn ?? Self.defaultDSN) - } catch { - print("[iOS-Swift] Failed to read/write DSN: \(error)") - } - - let dsn = storedDsn ?? Self.defaultDSN - - SentrySDK.start { options in - options.dsn = dsn - options.debug = true - if #available(iOS 15.0, *) { - options.enableMetricKit = true - } - // Sampling 100% - In Production you probably want to adjust this - options.tracesSampleRate = 1.0 - options.sessionTrackingIntervalMillis = 5_000 - options.profilesSampleRate = 1.0 - options.attachScreenshot = true - options.attachViewHierarchy = true - options.environment = "test-app" - options.enableTimeToFullDisplayTracing = true - options.initialScope = { scope in - scope.injectGitInformation() - return scope - } - - // Experimental features - options.experimental.enableFileManagerSwizzling = true - options.sessionReplay.enableExperimentalViewRenderer = true - // Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly - options.sessionReplay.enableFastViewRendering = false - } - } - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - startSentry() + SentrySDKWrapper.shared.startSentry() return true } diff --git a/Samples/iOS-SwiftUI/iOS-SwiftUI.xcodeproj/project.pbxproj b/Samples/iOS-SwiftUI/iOS-SwiftUI.xcodeproj/project.pbxproj index fd4c9d5e589..90b7e397d67 100644 --- a/Samples/iOS-SwiftUI/iOS-SwiftUI.xcodeproj/project.pbxproj +++ b/Samples/iOS-SwiftUI/iOS-SwiftUI.xcodeproj/project.pbxproj @@ -15,7 +15,7 @@ 7BB6224F26A56C4E00D0E75E /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BB6224E26A56C4E00D0E75E /* ContentView.swift */; }; 7BB6225426A56C5000D0E75E /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7BB6225326A56C5000D0E75E /* Preview Assets.xcassets */; }; 7BB6225E26A56CB600D0E75E /* Sentry.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7BB6225C26A56CB600D0E75E /* Sentry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 84BA72B52C9369C80045B828 /* GitInjections.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA72B32C9369C80045B828 /* GitInjections.swift */; }; + 841C8A562DA7407E00DCA74F /* libSentrySampleShared-Swift.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 841C8A552DA7407E00DCA74F /* libSentrySampleShared-Swift.a */; }; 84D4FEB528ECD53500EDAAFE /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D4FEB228ECD52E00EDAAFE /* Sentry.framework */; }; D8199DCD29376FD90074249E /* SentrySwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8BBD38B2901AE400011F850 /* SentrySwiftUI.framework */; }; D8199DCE29376FD90074249E /* SentrySwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D8BBD38B2901AE400011F850 /* SentrySwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -47,6 +47,20 @@ remoteGlobalIDString = 7BB6224826A56C4E00D0E75E; remoteInfo = "iOS-SwiftUI"; }; + 841C8A5A2DA7408600DCA74F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 841C8A572DA7408600DCA74F /* SentrySampleShared.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 842D547D2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; + 841C8A5D2DA7408600DCA74F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 841C8A572DA7408600DCA74F /* SentrySampleShared.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 842D547E2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; 8425DE222B52241000113FEF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 84D4FEA828ECD52700EDAAFE /* Sentry.xcodeproj */; @@ -96,6 +110,13 @@ remoteGlobalIDString = D84DAD4D2B17428D003CF120; remoteInfo = SentryTestUtilsDynamic; }; + 842D55062DA7184E00D3528B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 84D4FEAA28ECD52E00EDAAFE /* Sentry.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D833D7342D1321C100961E7A; + remoteInfo = SentrySwiftUITests; + }; 84D4FEB128ECD52E00EDAAFE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 84D4FEAA28ECD52E00EDAAFE /* Sentry.xcodeproj */; @@ -166,8 +187,9 @@ 7BB6225526A56C5000D0E75E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7BB6225C26A56CB600D0E75E /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7BB6226026A56E1E00D0E75E /* iOS-SwiftUI.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "iOS-SwiftUI.entitlements"; sourceTree = ""; }; + 841C8A552DA7407E00DCA74F /* libSentrySampleShared-Swift.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libSentrySampleShared-Swift.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 841C8A572DA7408600DCA74F /* SentrySampleShared.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SentrySampleShared.xcodeproj; path = "/Users/andrewmcknight/Code/organization/getsentry/repos/public/sentry-cocoa/Samples/SentrySampleShared-Swift/SentrySampleShared.xcodeproj"; sourceTree = ""; }; 8425DE1A2B52241000113FEF /* SentryProfilingConditionals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryProfilingConditionals.h; path = ../../../../Sources/Sentry/Public/SentryProfilingConditionals.h; sourceTree = ""; }; - 84BA72B32C9369C80045B828 /* GitInjections.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GitInjections.swift; sourceTree = ""; }; 84D4FEA628ECD51800EDAAFE /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 84D4FEA828ECD52700EDAAFE /* Sentry.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Sentry.xcodeproj; path = ../../Sentry.xcodeproj; sourceTree = ""; }; 84D4FEAA28ECD52E00EDAAFE /* Sentry.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Sentry.xcodeproj; path = "/Users/andrewmcknight/Code/organization/getsentry/repos/public/sentry-cocoa/Sentry.xcodeproj"; sourceTree = ""; }; @@ -194,6 +216,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 841C8A562DA7407E00DCA74F /* libSentrySampleShared-Swift.a in Frameworks */, 84D4FEB528ECD53500EDAAFE /* Sentry.framework in Frameworks */, D8199DCD29376FD90074249E /* SentrySwiftUI.framework in Frameworks */, ); @@ -211,7 +234,7 @@ 8425DE232B52241000113FEF /* SentryProfilerTests.xctest */, 8425DE252B52241000113FEF /* libSentryTestUtils.a */, 8425DE272B52241000113FEF /* SentryTestUtilsDynamic.framework */, - D833D61B2D13216300961E7A /* libSentrySwiftUITests.a */, + D833D61B2D13216300961E7A /* SentrySwiftUITests.xctest */, ); name = Products; sourceTree = ""; @@ -228,12 +251,12 @@ 7BB6224026A56C4E00D0E75E = { isa = PBXGroup; children = ( - 84BA72B42C9369C80045B828 /* Shared */, 7BB6224B26A56C4E00D0E75E /* iOS-SwiftUI */, 7B64385826A6C0A6000D0F65 /* iOS-SwiftUI-UITests */, 7BB6224A26A56C4E00D0E75E /* Products */, 7BB6225B26A56CB600D0E75E /* Frameworks */, 84D4FEAA28ECD52E00EDAAFE /* Sentry.xcodeproj */, + 841C8A572DA7408600DCA74F /* SentrySampleShared.xcodeproj */, ); sourceTree = ""; }; @@ -276,6 +299,7 @@ 7BB6225B26A56CB600D0E75E /* Frameworks */ = { isa = PBXGroup; children = ( + 841C8A552DA7407E00DCA74F /* libSentrySampleShared-Swift.a */, 84D4FEA628ECD51800EDAAFE /* Sentry.framework */, 84D4FEA828ECD52700EDAAFE /* Sentry.xcodeproj */, 7BB6225C26A56CB600D0E75E /* Sentry.framework */, @@ -283,13 +307,12 @@ name = Frameworks; sourceTree = ""; }; - 84BA72B42C9369C80045B828 /* Shared */ = { + 841C8A582DA7408600DCA74F /* Products */ = { isa = PBXGroup; children = ( - 84BA72B32C9369C80045B828 /* GitInjections.swift */, + 841C8A5E2DA7408600DCA74F /* libSentrySampleShared-Swift.a */, ); - name = Shared; - path = ../Shared; + name = Products; sourceTree = ""; }; 84D4FEAB28ECD52E00EDAAFE /* Products */ = { @@ -301,6 +324,7 @@ 8425DE342B52241000113FEF /* SentryProfilerTests.xctest */, 8425DE362B52241000113FEF /* libSentryTestUtils.a */, 8425DE382B52241000113FEF /* SentryTestUtilsDynamic.framework */, + 842D55072DA7184E00D3528B /* SentrySwiftUITests.xctest */, ); name = Products; sourceTree = ""; @@ -354,6 +378,7 @@ buildRules = ( ); dependencies = ( + 841C8A5B2DA7408600DCA74F /* PBXTargetDependency */, ); name = "iOS-SwiftUI"; productName = "iOS-SwiftUI"; @@ -398,6 +423,10 @@ ProductGroup = 84D4FEAB28ECD52E00EDAAFE /* Products */; ProjectRef = 84D4FEAA28ECD52E00EDAAFE /* Sentry.xcodeproj */; }, + { + ProductGroup = 841C8A582DA7408600DCA74F /* Products */; + ProjectRef = 841C8A572DA7408600DCA74F /* SentrySampleShared.xcodeproj */; + }, ); projectRoot = ""; targets = ( @@ -422,6 +451,13 @@ remoteRef = 0A94157F28F6B893006A5DD1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 841C8A5E2DA7408600DCA74F /* libSentrySampleShared-Swift.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libSentrySampleShared-Swift.a"; + remoteRef = 841C8A5D2DA7408600DCA74F /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 8425DE232B52241000113FEF /* SentryProfilerTests.xctest */ = { isa = PBXReferenceProxy; fileType = wrapper.cfbundle; @@ -471,6 +507,13 @@ remoteRef = 8425DE372B52241000113FEF /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 842D55072DA7184E00D3528B /* SentrySwiftUITests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = SentrySwiftUITests.xctest; + remoteRef = 842D55062DA7184E00D3528B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 84D4FEB228ECD52E00EDAAFE /* Sentry.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; @@ -485,7 +528,7 @@ remoteRef = 84D4FEB328ECD52E00EDAAFE /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - D833D61B2D13216300961E7A /* libSentrySwiftUITests.a */ = { + D833D61B2D13216300961E7A /* SentrySwiftUITests.xctest */ = { isa = PBXReferenceProxy; fileType = wrapper.cfbundle; path = SentrySwiftUITests.xctest; @@ -577,7 +620,6 @@ 7BB6224F26A56C4E00D0E75E /* ContentView.swift in Sources */, 7B5DA9D92859DC850069AD02 /* LoremIpsumView.swift in Sources */, D832FAF02982A908007A9A5F /* FormScreen.swift in Sources */, - 84BA72B52C9369C80045B828 /* GitInjections.swift in Sources */, 7BB6224D26A56C4E00D0E75E /* SwiftUIApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -590,6 +632,11 @@ target = 7BB6224826A56C4E00D0E75E /* iOS-SwiftUI */; targetProxy = 7B64385C26A6C0A6000D0F65 /* PBXContainerItemProxy */; }; + 841C8A5B2DA7408600DCA74F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SentrySampleShared-Swift"; + targetProxy = 841C8A5A2DA7408600DCA74F /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ diff --git a/Samples/iOS-SwiftUI/iOS-SwiftUI/SwiftUIApp.swift b/Samples/iOS-SwiftUI/iOS-SwiftUI/SwiftUIApp.swift index 2795e225717..dc45bdda927 100644 --- a/Samples/iOS-SwiftUI/iOS-SwiftUI/SwiftUIApp.swift +++ b/Samples/iOS-SwiftUI/iOS-SwiftUI/SwiftUIApp.swift @@ -1,27 +1,12 @@ import Foundation import Sentry +import SentrySampleShared_Swift import SwiftUI @main struct SwiftUIApp: App { init() { - SentrySDK.start { options in - options.dsn = "https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557" - options.debug = true - options.tracesSampleRate = 1.0 - options.profilesSampleRate = 1.0 - options.sessionReplay.sessionSampleRate = 1.0 - options.initialScope = { scope in - scope.injectGitInformation() - return scope - } - - // Experimental features - options.experimental.enableFileManagerSwizzling = true - options.sessionReplay.enableExperimentalViewRenderer = true - // Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly - options.sessionReplay.enableFastViewRendering = false - } + SentrySDKWrapper.shared.startSentry() } var body: some Scene { diff --git a/Samples/iOS15-SwiftUI/iOS15-SwiftUI.xcodeproj/project.pbxproj b/Samples/iOS15-SwiftUI/iOS15-SwiftUI.xcodeproj/project.pbxproj index ace047825ed..9b97944520b 100644 --- a/Samples/iOS15-SwiftUI/iOS15-SwiftUI.xcodeproj/project.pbxproj +++ b/Samples/iOS15-SwiftUI/iOS15-SwiftUI.xcodeproj/project.pbxproj @@ -13,8 +13,19 @@ 7B5166532758C6F400C0A720 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B5166522758C6F400C0A720 /* Preview Assets.xcassets */; }; 7B5166772758C72600C0A720 /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B5166762758C72600C0A720 /* Sentry.framework */; }; 7B5166782758C72600C0A720 /* Sentry.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7B5166762758C72600C0A720 /* Sentry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 842D55182DA718FB00D3528B /* libSentrySampleShared-Swift.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 842D55172DA718FB00D3528B /* libSentrySampleShared-Swift.a */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 841C8A192DA7253800DCA74F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 842D55142DA718F200D3528B /* SentrySampleShared.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 842D547E2DA712C200D3528B; + remoteInfo = "SentrySampleShared-Swift"; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 7B5166792758C72600C0A720 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -36,6 +47,8 @@ 7B51664D2758C6F000C0A720 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7B5166522758C6F400C0A720 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 7B5166762758C72600C0A720 /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 842D55142DA718F200D3528B /* SentrySampleShared.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SentrySampleShared.xcodeproj; path = "../SentrySampleShared-Swift/SentrySampleShared.xcodeproj"; sourceTree = SOURCE_ROOT; }; + 842D55172DA718FB00D3528B /* libSentrySampleShared-Swift.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libSentrySampleShared-Swift.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -43,6 +56,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 842D55182DA718FB00D3528B /* libSentrySampleShared-Swift.a in Frameworks */, 7B5166772758C72600C0A720 /* Sentry.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -53,6 +67,7 @@ 7B51663F2758C6F000C0A720 = { isa = PBXGroup; children = ( + 842D55142DA718F200D3528B /* SentrySampleShared.xcodeproj */, 7B51664A2758C6F000C0A720 /* iOS15-SwiftUI */, 7B5166492758C6F000C0A720 /* Products */, 7B5166752758C72600C0A720 /* Frameworks */, @@ -89,11 +104,20 @@ 7B5166752758C72600C0A720 /* Frameworks */ = { isa = PBXGroup; children = ( + 842D55172DA718FB00D3528B /* libSentrySampleShared-Swift.a */, 7B5166762758C72600C0A720 /* Sentry.framework */, ); name = Frameworks; sourceTree = ""; }; + 841C8A092DA7253800DCA74F /* Products */ = { + isa = PBXGroup; + children = ( + 841C8A1A2DA7253800DCA74F /* libSentrySampleShared-Swift.a */, + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -141,6 +165,12 @@ mainGroup = 7B51663F2758C6F000C0A720; productRefGroup = 7B5166492758C6F000C0A720 /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 841C8A092DA7253800DCA74F /* Products */; + ProjectRef = 842D55142DA718F200D3528B /* SentrySampleShared.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 7B5166472758C6F000C0A720 /* iOS15-SwiftUI */, @@ -148,6 +178,16 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 841C8A1A2DA7253800DCA74F /* libSentrySampleShared-Swift.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libSentrySampleShared-Swift.a"; + remoteRef = 841C8A192DA7253800DCA74F /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 7B5166462758C6F000C0A720 /* Resources */ = { isa = PBXResourcesBuildPhase; diff --git a/Samples/iOS15-SwiftUI/iOS15-SwiftUI/App.swift b/Samples/iOS15-SwiftUI/iOS15-SwiftUI/App.swift index ea341cdcf25..d457b9079b0 100644 --- a/Samples/iOS15-SwiftUI/iOS15-SwiftUI/App.swift +++ b/Samples/iOS15-SwiftUI/iOS15-SwiftUI/App.swift @@ -1,21 +1,11 @@ import Sentry +import SentrySampleShared_Swift import SwiftUI @main struct SwiftUIApp: App { init() { - SentrySDK.start { options in - options.dsn = "https://6cc9bae94def43cab8444a99e0031c28@o447951.ingest.sentry.io/5428557" - options.debug = true - options.tracesSampleRate = 1.0 - options.profilesSampleRate = 1.0 - - // Experimental features - options.experimental.enableFileManagerSwizzling = true - options.sessionReplay.enableExperimentalViewRenderer = true - // Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly - options.sessionReplay.enableFastViewRendering = false - } + SentrySDKWrapper.shared.startSentry() } var body: some Scene { diff --git a/scripts/ci-select-xcode.sh b/scripts/ci-select-xcode.sh index 1021fd01340..ad6b81715d1 100755 --- a/scripts/ci-select-xcode.sh +++ b/scripts/ci-select-xcode.sh @@ -7,8 +7,7 @@ set -euo pipefail -# 14.3 is the default -XCODE_VERSION="${1:-14.3}" +XCODE_VERSION="${1}" # We prefer this over calling `sudo xcode-select` because it will fail if the Xcode version # is not installed. Also xcodes is preinstalled on the GH runners.