Fix extra team prefix in keychain group (#721)

Team ID already included in .xcconfig

Fixes #720
This commit is contained in:
Davide 2024-10-11 03:45:20 +02:00 committed by GitHub
parent 9449a02b77
commit 8f6192c2b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 19 additions and 11 deletions

View File

@ -41,7 +41,7 @@
"kind" : "remoteSourceControl",
"location" : "git@github.com:passepartoutvpn/passepartoutkit-source",
"state" : {
"revision" : "c859acb74cb50f7ad218265cd3d3eb0eb99ee1c5"
"revision" : "de9387965025a1f79e060e6bdc862933fe972598"
}
},
{

View File

@ -37,7 +37,8 @@
<true/>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)$(CFG_GROUP_ID)</string>
<string>$(CFG_KEYCHAIN_GROUP_ID)</string>
<string>$(AppIdentifierPrefix)$(CFG_KEYCHAIN_GROUP_ID)</string>
</array>
</dict>
</plist>

View File

@ -13,7 +13,7 @@
<key>iapBundlePrefix</key>
<string>$(CFG_IAP_BUNDLE_PREFIX)</string>
<key>keychainGroupId</key>
<string>$(CFG_TEAM_ID).$(CFG_GROUP_ID)</string>
<string>$(CFG_KEYCHAIN_GROUP_ID)</string>
<key>tunnelId</key>
<string>$(CFG_TUNNEL_ID)</string>
<key>legacyV2CloudKitId</key>

View File

@ -36,6 +36,7 @@ CFG_GROUP_ID[sdk=appletvsimulator*] = $(CFG_RAW_GROUP_ID)
CFG_GROUP_ID[sdk=iphoneos*] = $(CFG_RAW_GROUP_ID)
CFG_GROUP_ID[sdk=iphonesimulator*] = $(CFG_RAW_GROUP_ID)
CFG_GROUP_ID[sdk=macosx*] = $(CFG_TEAM_ID).$(CFG_RAW_GROUP_ID)
CFG_KEYCHAIN_GROUP_ID = $(CFG_TEAM_ID).$(CFG_RAW_GROUP_ID)
CFG_IAP_BUNDLE_PREFIX = com.algoritmico.ios.Passepartout
CFG_INTENTS_ID = $(CFG_APP_ID).Intents
CFG_RAW_GROUP_ID = group.com.algoritmico.Passepartout

View File

@ -8,10 +8,6 @@
<string>$(CFG_APP_ID)</string>
<key>groupId</key>
<string>$(CFG_GROUP_ID)</string>
<key>keychainGroupId</key>
<string>$(CFG_TEAM_ID).$(CFG_GROUP_ID)</string>
<key>teamId</key>
<string>$(CFG_TEAM_ID)</string>
<key>tunnelId</key>
<string>$(CFG_TUNNEL_ID)</string>
</dict>

View File

@ -28,7 +28,7 @@ let package = Package(
],
dependencies: [
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", from: "0.8.0"),
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "c859acb74cb50f7ad218265cd3d3eb0eb99ee1c5"),
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "de9387965025a1f79e060e6bdc862933fe972598"),
// .package(path: "../../../passepartoutkit-source"),
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", from: "0.8.0"),
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", revision: "031863a1cd683962a7dfe68e20b91fa820a1ecce"),

View File

@ -46,7 +46,12 @@ public final class NEProfileRepository: ProfileRepository {
.managersPublisher
.sink { [weak self] allManagers in
let profiles = allManagers.values.compactMap {
try? repository.profile(from: $0)
do {
return try repository.profile(from: $0)
} catch {
pp_log(.app, .error, "Unable to decode profile from NE manager '\($0.localizedDescription ?? "")': \(error)")
return nil
}
}
self?.profilesSubject.send(profiles)
}

View File

@ -24,11 +24,13 @@
//
import Foundation
import NetworkExtension
import PassepartoutKit
public enum AppUI {
public static func configure(with context: AppContext) {
assertMissingModuleImplementations()
cleanUpOrphanedKeychainEntries()
}
}
@ -44,4 +46,7 @@ private extension AppUI {
}
}
}
static func cleanUpOrphanedKeychainEntries() {
}
}

View File

@ -18,7 +18,7 @@
<true/>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)$(CFG_GROUP_ID)</string>
<string>$(CFG_KEYCHAIN_GROUP_ID)</string>
</array>
</dict>
</plist>

View File

@ -7,7 +7,7 @@
<key>groupId</key>
<string>$(CFG_GROUP_ID)</string>
<key>keychainGroupId</key>
<string>$(CFG_TEAM_ID).$(CFG_GROUP_ID)</string>
<string>$(CFG_KEYCHAIN_GROUP_ID)</string>
<key>tunnelId</key>
<string>$(CFG_TUNNEL_ID)</string>
</dict>