diff --git a/.arkana.yml b/.arkana.yml new file mode 100644 index 00000000..fa424a89 --- /dev/null +++ b/.arkana.yml @@ -0,0 +1,3 @@ +global_secrets: + - SENTRY_DSN +package_manager: cocoapods \ No newline at end of file diff --git a/Example/Podfile b/Example/Podfile index 7d018422..342e26e7 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -4,7 +4,7 @@ platform :ios, '13.0' target 'SmileID_Example' do pod 'SmileID', :path => '../' pod 'netfox' - pod 'Sentry' + pod 'Sentry', '~> 8.43.0' pod 'SwiftLint' pod 'ArkanaKeys', :path => './ArkanaKeys/ArkanaKeys/' pod 'ArkanaKeysInterfaces', :path => './ArkanaKeys/ArkanaKeysInterfaces/' diff --git a/Example/Podfile.lock b/Example/Podfile.lock index b8aa7d9a..12b1f4a5 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -9,12 +9,15 @@ PODS: - FingerprintJS/SystemControl (1.5.0) - lottie-ios (4.4.3) - netfox (1.21.0) - - Sentry (8.36.0): - - Sentry/Core (= 8.36.0) - - Sentry/Core (8.36.0) + - Sentry (8.43.0): + - Sentry/Core (= 8.43.0) + - Sentry/Core (8.43.0) - SmileID (10.3.4): + - ArkanaKeys + - ArkanaKeysInterfaces - FingerprintJS - lottie-ios (~> 4.4.2) + - Sentry (~> 8.43.0) - ZIPFoundation (~> 0.9) - SwiftLint (0.55.1) - ZIPFoundation (0.9.19) @@ -23,7 +26,7 @@ DEPENDENCIES: - ArkanaKeys (from `./ArkanaKeys/ArkanaKeys/`) - ArkanaKeysInterfaces (from `./ArkanaKeys/ArkanaKeysInterfaces/`) - netfox - - Sentry + - Sentry (~> 8.43.0) - SmileID (from `../`) - SwiftLint @@ -50,11 +53,11 @@ SPEC CHECKSUMS: FingerprintJS: 96410117a394cca04d0f1e2374944c8697f2cceb lottie-ios: fcb5e73e17ba4c983140b7d21095c834b3087418 netfox: 9d5cc727fe7576c4c7688a2504618a156b7d44b7 - Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57 - SmileID: 5a7c0437b9861b76d37a18e2f3d2f5a7b3056310 + Sentry: 532b281a53b1b45a523fd592f608956fb36e577c + SmileID: e1c8829d2d6d0789f36f588bffff204118a3148e SwiftLint: 3fe909719babe5537c552ee8181c0031392be933 ZIPFoundation: b8c29ea7ae353b309bc810586181fd073cb3312c -PODFILE CHECKSUM: ebb96bfc1b5a0c7f6061ff1e91ac138e67c1d9f4 +PODFILE CHECKSUM: 3d594b06532c72adf95b06a33b17603190f6e8bb COCOAPODS: 1.16.2 diff --git a/Example/SmileID.xcodeproj/project.pbxproj b/Example/SmileID.xcodeproj/project.pbxproj index 6d362945..b41a7291 100644 --- a/Example/SmileID.xcodeproj/project.pbxproj +++ b/Example/SmileID.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 0499F8082970560F0EB3B0FB /* Pods_SmileID_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB9672F4E61EFD2E0BE586D2 /* Pods_SmileID_Example.framework */; }; 1E59E33E2BA1E64C00D2BAD2 /* PartnerParamsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E59E33D2BA1E64C00D2BAD2 /* PartnerParamsTests.swift */; }; 1E60ED372A29C306002695FF /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E60ED322A29C306002695FF /* HomeViewController.swift */; }; 1E60ED382A29C306002695FF /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E60ED332A29C306002695FF /* Constants.swift */; }; @@ -39,17 +40,16 @@ 20B6D5EC2C21CE660023D51C /* DataStoreError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20B6D5EB2C21CE660023D51C /* DataStoreError.swift */; }; 20C360C82C454C130008DBDE /* RootViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20C360C72C454C130008DBDE /* RootViewModel.swift */; }; 20DFA0EC2C21917100AC2AE7 /* View+TextSelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20DFA0EB2C21917100AC2AE7 /* View+TextSelection.swift */; }; - 20F3D6F32C25F4D700B32751 /* BuildFile in Sources */ = {isa = PBXBuildFile; }; + 20F3D6F32C25F4D700B32751 /* (null) in Sources */ = {isa = PBXBuildFile; }; 20F3D6F62C25F5C100B32751 /* SmileID.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 20F3D6F42C25F5C100B32751 /* SmileID.xcdatamodeld */; }; 5829A8C02BC7429A001C1E7E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 5829A8BF2BC7429A001C1E7E /* PrivacyInfo.xcprivacy */; }; 585BE4882AC7748E0091DDD8 /* RestartableTimerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585BE4872AC7748E0091DDD8 /* RestartableTimerTest.swift */; }; 58C5F1D82B05925800A6080C /* BiometricKycWithIdInputScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58C5F1D72B05925800A6080C /* BiometricKycWithIdInputScreen.swift */; }; 58C7118C2A69DE920062BBFB /* EnhancedKycTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58C7118B2A69DE920062BBFB /* EnhancedKycTest.swift */; }; - 5A3D2A308CFE21ED82E1D892 /* Pods_SmileID_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4731100B92B3872E881CC531 /* Pods_SmileID_Example.framework */; }; 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 620F1E982B69194900185CD2 /* AlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 620F1E972B69194900185CD2 /* AlertView.swift */; }; - 620F1E9A2B691ABB00185CD2 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + 620F1E9A2B691ABB00185CD2 /* (null) in Resources */ = {isa = PBXBuildFile; }; 624777D02B0CDC9F00952842 /* EnhancedKycWithIdInputScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 624777CF2B0CDC9F00952842 /* EnhancedKycWithIdInputScreen.swift */; }; 62F6766F2B0D173600417419 /* EnhancedKycWithIdInputScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62F6766E2B0D173600417419 /* EnhancedKycWithIdInputScreenViewModel.swift */; }; 62F676712B0E00E800417419 /* EnhancedKycResultDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62F676702B0E00E800417419 /* EnhancedKycResultDelegate.swift */; }; @@ -65,7 +65,6 @@ 6AC98B6FFA753C5463F7216F /* SmileConfigEntryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC984E484EEF69069C705C7 /* SmileConfigEntryView.swift */; }; 6AC98C0E9305B4B3EB66ED35 /* Util.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC980584C522B17A099E098 /* Util.swift */; }; 6AC98F5682012E19C815AE70 /* DocumentSelectorViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC9893915EBA33F6984A6D9 /* DocumentSelectorViewModel.swift */; }; - 8AB24EAD1C53FDE9EF66195C /* Pods_SmileID_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34C7EDBA9A9B8CD932A06FE5 /* Pods_SmileID_Tests.framework */; }; 918321EA2A52E36A00D6FB7F /* URLSessionRestServiceClientTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 918321E02A52E36A00D6FB7F /* URLSessionRestServiceClientTests.swift */; }; 918321EB2A52E36A00D6FB7F /* XCTestExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 918321E12A52E36A00D6FB7F /* XCTestExtension.swift */; }; 918321EC2A52E36A00D6FB7F /* DependencyContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 918321E32A52E36A00D6FB7F /* DependencyContainerTests.swift */; }; @@ -74,6 +73,7 @@ 91CB21A52AC10C61005AEBF5 /* NavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91CB21A42AC10C61005AEBF5 /* NavigationBar.swift */; }; 91D9FBC42AB481FE00A8D36B /* PollingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91D9FBC32AB481FE00A8D36B /* PollingTests.swift */; }; 91D9FBD52AB8AB4700A8D36B /* CalculateSignatureTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91D9FBD42AB8AB4700A8D36B /* CalculateSignatureTests.swift */; }; + E7464710AE95CF2365762DF6 /* Pods_SmileID_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE26CDF1725DB73D242306C4 /* Pods_SmileID_Tests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -87,6 +87,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 0FA38531DFF4D2422763FB54 /* Pods-SmileID_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmileID_Tests.debug.xcconfig"; path = "Target Support Files/Pods-SmileID_Tests/Pods-SmileID_Tests.debug.xcconfig"; sourceTree = ""; }; 1E59E33D2BA1E64C00D2BAD2 /* PartnerParamsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnerParamsTests.swift; sourceTree = ""; }; 1E60ED322A29C306002695FF /* HomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; 1E60ED332A29C306002695FF /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; @@ -119,13 +120,12 @@ 20C360C72C454C130008DBDE /* RootViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewModel.swift; sourceTree = ""; }; 20DFA0EB2C21917100AC2AE7 /* View+TextSelection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+TextSelection.swift"; sourceTree = ""; }; 20F3D6F52C25F5C100B32751 /* SmileID.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = SmileID.xcdatamodel; sourceTree = ""; }; - 34C7EDBA9A9B8CD932A06FE5 /* Pods_SmileID_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SmileID_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4731100B92B3872E881CC531 /* Pods_SmileID_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SmileID_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4B5DCA2E987F1A330D27225B /* Pods-SmileID_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmileID_Tests.debug.xcconfig"; path = "Target Support Files/Pods-SmileID_Tests/Pods-SmileID_Tests.debug.xcconfig"; sourceTree = ""; }; + 2511EE7AD00A24A8575B4585 /* Pods-SmileID_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmileID_Example.release.xcconfig"; path = "Target Support Files/Pods-SmileID_Example/Pods-SmileID_Example.release.xcconfig"; sourceTree = ""; }; 5829A8BF2BC7429A001C1E7E /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 585BE4872AC7748E0091DDD8 /* RestartableTimerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestartableTimerTest.swift; sourceTree = ""; }; 58C5F1D72B05925800A6080C /* BiometricKycWithIdInputScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BiometricKycWithIdInputScreen.swift; sourceTree = ""; }; 58C7118B2A69DE920062BBFB /* EnhancedKycTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnhancedKycTest.swift; sourceTree = ""; }; + 5ABEC752F93C2B88E8DED799 /* Pods-SmileID_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmileID_Tests.release.xcconfig"; path = "Target Support Files/Pods-SmileID_Tests/Pods-SmileID_Tests.release.xcconfig"; sourceTree = ""; }; 607FACD01AFB9204008FA782 /* Smile ID.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Smile ID.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -158,11 +158,11 @@ 91D9FBC32AB481FE00A8D36B /* PollingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollingTests.swift; sourceTree = ""; }; 91D9FBD42AB8AB4700A8D36B /* CalculateSignatureTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalculateSignatureTests.swift; sourceTree = ""; }; 94E7560A47E255DD8215C183 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - 9755B6A19CF28DE212F24C83 /* SmileID.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SmileID.podspec; path = ../SmileID.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9755B6A19CF28DE212F24C83 /* SmileID.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SmileID.podspec; path = ../SmileID.podspec; sourceTree = ""; }; + C33E410576AADC1679867B4C /* Pods-SmileID_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmileID_Example.debug.xcconfig"; path = "Target Support Files/Pods-SmileID_Example/Pods-SmileID_Example.debug.xcconfig"; sourceTree = ""; }; C8CD2E3DB817D8C6334E9240 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; - D17A7A33393463B3A87F13BD /* Pods-SmileID_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmileID_Example.release.xcconfig"; path = "Target Support Files/Pods-SmileID_Example/Pods-SmileID_Example.release.xcconfig"; sourceTree = ""; }; - D51F550D2AF51B82A7344D98 /* Pods-SmileID_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmileID_Tests.release.xcconfig"; path = "Target Support Files/Pods-SmileID_Tests/Pods-SmileID_Tests.release.xcconfig"; sourceTree = ""; }; - E47B4A90ABD2DAA21990075A /* Pods-SmileID_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SmileID_Example.debug.xcconfig"; path = "Target Support Files/Pods-SmileID_Example/Pods-SmileID_Example.debug.xcconfig"; sourceTree = ""; }; + CB9672F4E61EFD2E0BE586D2 /* Pods_SmileID_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SmileID_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FE26CDF1725DB73D242306C4 /* Pods_SmileID_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SmileID_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -170,7 +170,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5A3D2A308CFE21ED82E1D892 /* Pods_SmileID_Example.framework in Frameworks */, + 0499F8082970560F0EB3B0FB /* Pods_SmileID_Example.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -178,7 +178,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8AB24EAD1C53FDE9EF66195C /* Pods_SmileID_Tests.framework in Frameworks */, + E7464710AE95CF2365762DF6 /* Pods_SmileID_Tests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -299,7 +299,7 @@ 607FACE81AFB9204008FA782 /* Tests */, 607FACD11AFB9204008FA782 /* Products */, 828BF541E068101B2E6ED55F /* Pods */, - 6E4A3D5687B8EA72B1DF35F3 /* Frameworks */, + DD8F5D8589D1377CD9068C72 /* Frameworks */, ); sourceTree = ""; }; @@ -403,22 +403,13 @@ path = CodeScanner; sourceTree = ""; }; - 6E4A3D5687B8EA72B1DF35F3 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4731100B92B3872E881CC531 /* Pods_SmileID_Example.framework */, - 34C7EDBA9A9B8CD932A06FE5 /* Pods_SmileID_Tests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 828BF541E068101B2E6ED55F /* Pods */ = { isa = PBXGroup; children = ( - E47B4A90ABD2DAA21990075A /* Pods-SmileID_Example.debug.xcconfig */, - D17A7A33393463B3A87F13BD /* Pods-SmileID_Example.release.xcconfig */, - 4B5DCA2E987F1A330D27225B /* Pods-SmileID_Tests.debug.xcconfig */, - D51F550D2AF51B82A7344D98 /* Pods-SmileID_Tests.release.xcconfig */, + C33E410576AADC1679867B4C /* Pods-SmileID_Example.debug.xcconfig */, + 2511EE7AD00A24A8575B4585 /* Pods-SmileID_Example.release.xcconfig */, + 0FA38531DFF4D2422763FB54 /* Pods-SmileID_Tests.debug.xcconfig */, + 5ABEC752F93C2B88E8DED799 /* Pods-SmileID_Tests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -455,6 +446,15 @@ path = ../../Tests/Mocks; sourceTree = ""; }; + DD8F5D8589D1377CD9068C72 /* Frameworks */ = { + isa = PBXGroup; + children = ( + CB9672F4E61EFD2E0BE586D2 /* Pods_SmileID_Example.framework */, + FE26CDF1725DB73D242306C4 /* Pods_SmileID_Tests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -462,13 +462,13 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SmileID_Example" */; buildPhases = ( - B8EF7576DB73381C03B2FE4B /* [CP] Check Pods Manifest.lock */, + 4F4F8C1977AD644055F173A0 /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, 917D79282AA8024400FA6624 /* SwiftLint */, 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, C0BE335FFECD4DF6892309F3 /* Upload Debug Symbols to Sentry */, - 94601622A6BCFA2ACF585332 /* [CP] Embed Pods Frameworks */, + 9075738EC2400F11FD5433CC /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -483,7 +483,7 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SmileID_Tests" */; buildPhases = ( - C6A9034300422F0932BEE6EA /* [CP] Check Pods Manifest.lock */, + 13D97EC2266BF9CC4437873B /* [CP] Check Pods Manifest.lock */, 607FACE11AFB9204008FA782 /* Sources */, 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, @@ -549,7 +549,7 @@ buildActionMask = 2147483647; files = ( 1EFAB3172A375265008E3C13 /* Images.xcassets in Resources */, - 620F1E9A2B691ABB00185CD2 /* BuildFile in Resources */, + 620F1E9A2B691ABB00185CD2 /* (null) in Resources */, 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 5829A8C02BC7429A001C1E7E /* PrivacyInfo.xcprivacy in Resources */, 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, @@ -566,7 +566,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 917D79282AA8024400FA6624 /* SwiftLint */ = { + 13D97EC2266BF9CC4437873B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -574,17 +574,43 @@ inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = SwiftLint; + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SmileID_Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ../Sources\n\"${PODS_ROOT}/SwiftLint/swiftlint\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 4F4F8C1977AD644055F173A0 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SmileID_Example-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - 94601622A6BCFA2ACF585332 /* [CP] Embed Pods Frameworks */ = { + 9075738EC2400F11FD5433CC /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -616,7 +642,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SmileID_Example/Pods-SmileID_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - B8EF7576DB73381C03B2FE4B /* [CP] Check Pods Manifest.lock */ = { + 917D79282AA8024400FA6624 /* SwiftLint */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -624,19 +650,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = SwiftLint; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SmileID_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ../Sources\n\"${PODS_ROOT}/SwiftLint/swiftlint\"\n"; }; C0BE335FFECD4DF6892309F3 /* Upload Debug Symbols to Sentry */ = { isa = PBXShellScriptBuildPhase; @@ -653,28 +675,6 @@ shellPath = /bin/sh; shellScript = "# This script is responsable to upload debug symbols and source context for Sentry.\nif which sentry-cli >/dev/null; then\nexport SENTRY_ORG=smile-identity\nexport SENTRY_PROJECT=ios\nERROR=$(sentry-cli debug-files upload --include-sources \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\nif [ ! $? -eq 0 ]; then\necho \"warning: sentry-cli - $ERROR\"\nfi\nelse\necho \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n"; }; - C6A9034300422F0932BEE6EA /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SmileID_Tests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -698,7 +698,7 @@ 1ED53F6D2A2F28590020BEFB /* SmileTextField.swift in Sources */, 91CB21A52AC10C61005AEBF5 /* NavigationBar.swift in Sources */, 1ED53F6B2A2F28590020BEFB /* ProductCell.swift in Sources */, - 20F3D6F32C25F4D700B32751 /* BuildFile in Sources */, + 20F3D6F32C25F4D700B32751 /* (null) in Sources */, 1E60ED382A29C306002695FF /* Constants.swift in Sources */, 624777D02B0CDC9F00952842 /* EnhancedKycWithIdInputScreen.swift in Sources */, 1ED53F712A2F28590020BEFB /* EnterUserIDView.swift in Sources */, @@ -885,7 +885,7 @@ }; 607FACF01AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E47B4A90ABD2DAA21990075A /* Pods-SmileID_Example.debug.xcconfig */; + baseConfigurationReference = C33E410576AADC1679867B4C /* Pods-SmileID_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -918,7 +918,7 @@ }; 607FACF11AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D17A7A33393463B3A87F13BD /* Pods-SmileID_Example.release.xcconfig */; + baseConfigurationReference = 2511EE7AD00A24A8575B4585 /* Pods-SmileID_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Distribution"; @@ -950,7 +950,7 @@ }; 607FACF31AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4B5DCA2E987F1A330D27225B /* Pods-SmileID_Tests.debug.xcconfig */; + baseConfigurationReference = 0FA38531DFF4D2422763FB54 /* Pods-SmileID_Tests.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; @@ -983,7 +983,7 @@ }; 607FACF41AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D51F550D2AF51B82A7344D98 /* Pods-SmileID_Tests.release.xcconfig */; + baseConfigurationReference = 5ABEC752F93C2B88E8DED799 /* Pods-SmileID_Tests.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Distribution"; diff --git a/Package.resolved b/Package.resolved index 713e1c05..3ef19084 100644 --- a/Package.resolved +++ b/Package.resolved @@ -18,6 +18,15 @@ "version" : "4.5.0" } }, + { + "identity" : "sentry-cocoa", + "kind" : "remoteSourceControl", + "location" : "https://github.com/getsentry/sentry-cocoa", + "state" : { + "revision" : "f45e9c62d7a4d9258ac3cf35a3acf9dbab4481d1", + "version" : "8.43.0" + } + }, { "identity" : "zipfoundation", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index 0768a9a2..0e8c1d3a 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,9 @@ let package = Package( dependencies: [ .package(url: "https://github.com/weichsel/ZIPFoundation.git", .upToNextMajor(from: "0.9.0")), .package(url: "https://github.com/airbnb/lottie-spm", from: "4.4.2"), - .package(url: "https://github.com/fingerprintjs/fingerprintjs-ios", from: "1.5.0") + .package(url: "https://github.com/fingerprintjs/fingerprintjs-ios", from: "1.5.0"), + .package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.43.0"), + .package(name: "ArkanaKeys", path: "./ArkanaKeys") ], targets: [ .target( @@ -23,7 +25,9 @@ let package = Package( dependencies: [ .product(name: "ZIPFoundation", package: "ZIPFoundation"), .product(name: "FingerprintJS", package: "fingerprintjs-ios"), - .product(name: "Lottie", package: "lottie-spm") + .product(name: "Lottie", package: "lottie-spm"), + .product(name: "Sentry", package: "sentry-cocoa"), + .product(name: "ArkanaKeys", package: "ArkanaKeys") ], path: "Sources/SmileID", resources: [.process("Resources")] diff --git a/SmileID.podspec b/SmileID.podspec index 7053f2fd..9e93ae2e 100644 --- a/SmileID.podspec +++ b/SmileID.podspec @@ -10,6 +10,9 @@ Pod::Spec.new do |s| s.dependency 'ZIPFoundation', '~> 0.9' s.dependency 'FingerprintJS' s.dependency 'lottie-ios', '~> 4.4.2' + s.dependency 'Sentry', '~> 8.43.0' + s.dependency 'ArkanaKeys' + s.dependency 'ArkanaKeysInterfaces' s.swift_version = '5.5' s.source_files = 'Sources/SmileID/Classes/**/*' s.resource_bundles = { diff --git a/Sources/SmileID/Classes/ErrorReporting.swift b/Sources/SmileID/Classes/ErrorReporting.swift new file mode 100644 index 00000000..cb5ec5d7 --- /dev/null +++ b/Sources/SmileID/Classes/ErrorReporting.swift @@ -0,0 +1,52 @@ +import ArkanaKeys +import Sentry + +protocol ErrorReportingService { + func captureError(_ error: any Error, userInfo: [String: Any]?) +} + +class SentryErrorReporter { + static let shared: SentryErrorReporter = SentryErrorReporter() + + private var sentryHub: SentryHub? + + private init() {} + + deinit { + disable() + } + + func enable() { + // setup sentry options + let options = Sentry.Options() + options.dsn = ArkanaKeys.Global().sENTRY_DSN + options.releaseName = SmileID.version + options.enableCrashHandler = true + options.debug = true + options.tracesSampleRate = 1.0 + options.profilesSampleRate = 1.0 + + // setup sentry scope + let scope = Sentry.Scope() + scope.setTag(value: SmileID.config.partnerId, key: "partner_id") + let user = Sentry.User() + user.userId = SmileID.config.partnerId + scope.setUser(user) + + // setup sentry hub + let sentryClient = SentryClient(options: options) + self.sentryHub = SentryHub(client: sentryClient, andScope: scope) + } + + func disable() { + sentryHub?.getClient()?.options.enableCrashHandler = false + sentryHub?.close() + sentryHub = nil + } +} + +extension SentryErrorReporter: ErrorReportingService { + func captureError(_ error: any Error, userInfo: [String: Any]? = nil) { + sentryHub?.capture(error: error) + } +} diff --git a/Sources/SmileID/Classes/SmileID.swift b/Sources/SmileID/Classes/SmileID.swift index 37b3d3a6..eb264cd5 100644 --- a/Sources/SmileID/Classes/SmileID.swift +++ b/Sources/SmileID/Classes/SmileID.swift @@ -1,5 +1,6 @@ import FingerprintJS import Foundation +import Sentry import SwiftUI import UIKit @@ -58,17 +59,21 @@ public class SmileID { /// - config: The smile config file. If no value is supplied, we check the app's main bundle /// for a `smile_config.json` file. /// - useSandbox: A boolean to enable the sandbox environment or not + /// - enableErrorReporting: A boolean to enable error reporting for *ONLY* Smile ID related crashes. + /// This is powered by Sentry. /// - requestTimeout: The timeout interval for all requests. /// An interval greater than `defaultRequestTimeout` is recommended. public class func initialize( config: Config = getConfig(), useSandbox: Bool = false, + enableErrorReporting: Bool = true, requestTimeout: TimeInterval = SmileID.defaultRequestTimeout ) { initialize( apiKey: nil, config: config, useSandbox: useSandbox, + enableErrorReporting: enableErrorReporting, requestTimeout: requestTimeout ) } @@ -80,23 +85,33 @@ public class SmileID { /// - config: The smile config file. If no value is supplied, we check the app's main bundle /// for a `smile_config.json` file. /// - useSandbox: A boolean to enable the sandbox environment or not + /// - enableErrorReporting: A boolean to enable error reporting for *ONLY* Smile ID related crashes. + /// This is powered by Sentry. /// - requestTimeout: The timeout interval for all requests. /// An interval greater than `defaultRequestTimeout` is recommended. public class func initialize( apiKey: String? = nil, config: Config = getConfig(), useSandbox: Bool = false, + enableErrorReporting: Bool = true, requestTimeout: TimeInterval = SmileID.defaultRequestTimeout ) { self.config = config self.useSandbox = useSandbox self.apiKey = apiKey self.requestTimeout = requestTimeout + + // Enable crash reporting as early as possible (the pre-req is that the config is loaded) + if enableErrorReporting { + SentryErrorReporter.shared.enable() + } + SmileIDResourcesHelper.registerFonts() + let fingerprinter = FingerprinterFactory.getInstance() Task { - /// The fingerprint isn't currently as stable as the Device Identifier, because the v - /// alues might change between OS updates or when the user changes settings + /// The fingerprint isn't currently as stable as the Device Identifier, because the + /// values might change between OS updates or when the user changes settings /// used to compute the previous value. /// https://github.com/fingerprintjs/fingerprintjs-ios if let fingerprint = await fingerprinter.getDeviceId() {