From 7ed1b6f1b2906201478d59c8be8bc5ef9a0c37e8 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Fri, 24 May 2024 14:35:54 -0400 Subject: [PATCH] chore(client/cordova/apple/ios): add privacy info to comply with Apple's API changes (#2009) * initial commit - just need to select the reasons * missed one * add known required reason * update sentry but it probably breaks it * package resolved * Upgrade Sentry to latest version `8.26.0`. * Upgrade CocoaLumberjack to latest version `3.8.5`. * Remove API types used by dependencies. * Remove stray `Package.resolved` file. --------- Co-authored-by: Sander Bruens --- .../apple/OutlineAppleLib/Package.swift | 4 +-- .../OutlineSentryLogger.swift | 4 +-- .../xcshareddata/swiftpm/Package.resolved | 8 ++--- .../xcshareddata/swiftpm/Package.resolved | 8 ++--- .../ios/Outline.xcodeproj/project.pbxproj | 8 +++-- .../xcshareddata/swiftpm/Package.resolved | 32 ------------------- .../apple/xcode/ios/PrivacyInfo.xcprivacy | 17 ++++++++++ .../macos/Outline.xcodeproj/project.pbxproj | 6 ++-- 8 files changed, 38 insertions(+), 49 deletions(-) delete mode 100644 client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 client/src/cordova/apple/xcode/ios/PrivacyInfo.xcprivacy diff --git a/client/src/cordova/apple/OutlineAppleLib/Package.swift b/client/src/cordova/apple/OutlineAppleLib/Package.swift index 2643cd1112..510e653cf1 100644 --- a/client/src/cordova/apple/OutlineAppleLib/Package.swift +++ b/client/src/cordova/apple/OutlineAppleLib/Package.swift @@ -28,8 +28,8 @@ let package = Package( ), ], dependencies: [ - .package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack.git", from: "3.7.4"), - .package(url: "https://github.com/getsentry/sentry-cocoa", from: "7.31.3"), + .package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack.git", from: "3.8.5"), + .package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.26.0"), ], targets: [ .target( diff --git a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineSentryLogger/OutlineSentryLogger.swift b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineSentryLogger/OutlineSentryLogger.swift index ffa64dc895..b854239b16 100644 --- a/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineSentryLogger/OutlineSentryLogger.swift +++ b/client/src/cordova/apple/OutlineAppleLib/Sources/OutlineSentryLogger/OutlineSentryLogger.swift @@ -43,7 +43,7 @@ public class OutlineSentryLogger: DDAbstractLogger { let breadcrumb = Breadcrumb(level: ddLogLevelToSentryLevel(logMessage.level), category:"App") breadcrumb.message = logMessage.message breadcrumb.timestamp = logMessage.timestamp - SentrySDK.addBreadcrumb(crumb: breadcrumb) + SentrySDK.addBreadcrumb(breadcrumb) } private func ddLogLevelToSentryLevel(_ level: DDLogLevel) -> SentryLevel { @@ -88,7 +88,7 @@ public class OutlineSentryLogger: DDAbstractLogger { let breadcrumb = Breadcrumb(level: .info, category: "VpnExtension") breadcrumb.timestamp = dateFormatter.date(from: timestamp) breadcrumb.message = message - SentrySDK.addBreadcrumb(crumb: breadcrumb) + SentrySDK.addBreadcrumb(breadcrumb) numBreadcrumbsAdded += 1 } } diff --git a/client/src/cordova/apple/ios.xcworkspace/xcshareddata/swiftpm/Package.resolved b/client/src/cordova/apple/ios.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0bd028c28b..eab2177183 100644 --- a/client/src/cordova/apple/ios.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/client/src/cordova/apple/ios.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/CocoaLumberjack/CocoaLumberjack", "state" : { - "revision" : "0188d31089b5881a269e01777be74c7316924346", - "version" : "3.8.0" + "revision" : "4b8714a7fb84d42393314ce897127b3939885ec3", + "version" : "3.8.5" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/getsentry/sentry-cocoa", "state" : { - "revision" : "cf43eac1aa12017868c257ad3854ad87a5de0758", - "version" : "7.31.5" + "revision" : "7fc7ca43967e2980d8691a8e017c118a84133aac", + "version" : "8.26.0" } }, { diff --git a/client/src/cordova/apple/macos.xcworkspace/xcshareddata/swiftpm/Package.resolved b/client/src/cordova/apple/macos.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0bd028c28b..eab2177183 100644 --- a/client/src/cordova/apple/macos.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/client/src/cordova/apple/macos.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/CocoaLumberjack/CocoaLumberjack", "state" : { - "revision" : "0188d31089b5881a269e01777be74c7316924346", - "version" : "3.8.0" + "revision" : "4b8714a7fb84d42393314ce897127b3939885ec3", + "version" : "3.8.5" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/getsentry/sentry-cocoa", "state" : { - "revision" : "cf43eac1aa12017868c257ad3854ad87a5de0758", - "version" : "7.31.5" + "revision" : "7fc7ca43967e2980d8691a8e017c118a84133aac", + "version" : "8.26.0" } }, { diff --git a/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj b/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj index cdea364310..0f883b3016 100755 --- a/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj +++ b/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.pbxproj @@ -20,6 +20,7 @@ 52CE53E7295B6A310064D03D /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 52CE53E6295B6A310064D03D /* Sentry */; }; 52E783062A5880CF00355E64 /* PacketTunnelProvider in Frameworks */ = {isa = PBXBuildFile; productRef = 52E783052A5880CF00355E64 /* PacketTunnelProvider */; }; 5F7F90AE0E924FD7B065C415 /* CDVStatusBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 0394302BA6114B2AB648D4FF /* CDVStatusBar.m */; }; + 65A9AC9C2BEC091700C5899F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 65A9AC9B2BEC091700C5899F /* PrivacyInfo.xcprivacy */; }; 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; A246B7E52B07AADD00ECACD5 /* AppKitIntegration.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A246B7DD2B07AACF00ECACD5 /* AppKitIntegration.framework */; platformFilter = maccatalyst; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A25FB7DC2B0D4420009B6B5F /* AppKitIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = A272490D2B0D20530018A598 /* AppKitIntegration.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -171,6 +172,7 @@ 3B0347431F212E6500C8EF1F /* Outline.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Outline.entitlements; path = Outline/Outline.entitlements; sourceTree = ""; }; 3B0347481F212F0100C8EF1F /* VpnExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = VpnExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 3B03475B1F212F2D00C8EF1F /* VpnExtension.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; name = VpnExtension.entitlements; path = Outline/VpnExtension.entitlements; sourceTree = SOURCE_ROOT; }; + 65A9AC9B2BEC091700C5899F /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CDVLaunchScreen.storyboard; path = Outline/CDVLaunchScreen.storyboard; sourceTree = SOURCE_ROOT; }; 8D1107310486CEB800E47090 /* Outline-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Outline-Info.plist"; path = "Outline/Outline-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = SOURCE_ROOT; }; 91E45572BB494E9299D2DD41 /* CDVClipboard.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = CDVClipboard.m; path = "cordova-plugin-clipboard/CDVClipboard.m"; sourceTree = ""; }; @@ -326,6 +328,7 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + 65A9AC9B2BEC091700C5899F /* PrivacyInfo.xcprivacy */, F6D33648296CF46200AFD613 /* Packages */, 3B0347431F212E6500C8EF1F /* Outline.entitlements */, EB87FDF41871DAF40020F90C /* config.xml */, @@ -731,6 +734,7 @@ files = ( 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */, 0207DA581B56EA530066E2B4 /* Assets.xcassets in Resources */, + 65A9AC9C2BEC091700C5899F /* PrivacyInfo.xcprivacy in Resources */, 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1500,7 +1504,7 @@ repositoryURL = "https://github.com/CocoaLumberjack/CocoaLumberjack"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 3.7.4; + minimumVersion = 3.8.5; }; }; 52CE53E5295B6A310064D03D /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = { @@ -1508,7 +1512,7 @@ repositoryURL = "https://github.com/getsentry/sentry-cocoa"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 7.31.3; + minimumVersion = 8.26.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 23be32741b..0000000000 --- a/client/src/cordova/apple/xcode/ios/Outline.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,32 +0,0 @@ -{ - "pins" : [ - { - "identity" : "cocoalumberjack", - "kind" : "remoteSourceControl", - "location" : "https://github.com/CocoaLumberjack/CocoaLumberjack", - "state" : { - "revision" : "4b8714a7fb84d42393314ce897127b3939885ec3", - "version" : "3.8.5" - } - }, - { - "identity" : "sentry-cocoa", - "kind" : "remoteSourceControl", - "location" : "https://github.com/getsentry/sentry-cocoa", - "state" : { - "revision" : "cf43eac1aa12017868c257ad3854ad87a5de0758", - "version" : "7.31.5" - } - }, - { - "identity" : "swift-log", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-log", - "state" : { - "revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5", - "version" : "1.5.4" - } - } - ], - "version" : 2 -} diff --git a/client/src/cordova/apple/xcode/ios/PrivacyInfo.xcprivacy b/client/src/cordova/apple/xcode/ios/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..dd6881b47e --- /dev/null +++ b/client/src/cordova/apple/xcode/ios/PrivacyInfo.xcprivacy @@ -0,0 +1,17 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + 1C8F.1 + + + + + diff --git a/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj b/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj index 985e1bee13..2c40cb6a75 100644 --- a/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj +++ b/client/src/cordova/apple/xcode/macos/Outline.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -984,7 +984,7 @@ repositoryURL = "https://github.com/getsentry/sentry-cocoa"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 7.31.3; + minimumVersion = 8.26.0; }; }; 52CBB847295BC79300D0073F /* XCRemoteSwiftPackageReference "CocoaLumberjack" */ = { @@ -992,7 +992,7 @@ repositoryURL = "https://github.com/CocoaLumberjack/CocoaLumberjack"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 3.7.4; + minimumVersion = 3.8.5; }; }; /* End XCRemoteSwiftPackageReference section */