Fix keychain access on macOS. (#354)

This commit is contained in:
Doug
2022-12-06 17:39:15 +00:00
committed by GitHub
parent 7f91852291
commit b97e6f7a98
13 changed files with 31 additions and 7 deletions
@@ -20,7 +20,7 @@ import UserNotifications
class NotificationServiceExtension: UNNotificationServiceExtension {
private lazy var keychainController = KeychainController(service: .sessions,
accessGroup: InfoPlistReader.target.appGroupIdentifier)
accessGroup: InfoPlistReader.target.keychainAccessGroupIdentifier)
var handler: ((UNNotificationContent) -> Void)?
var modifiedContent: UNMutableNotificationContent?
+2
View File
@@ -31,5 +31,7 @@
<string>$(APP_GROUP_IDENTIFIER)</string>
<key>baseBundleIdentifier</key>
<string>$(BASE_BUNDLE_IDENTIFIER)</string>
<key>keychainAccessGroupIdentifier</key>
<string>$(KEYCHAIN_ACCESS_GROUP_IDENTIFIER)</string>
</dict>
</plist>
+4
View File
@@ -8,5 +8,9 @@
<array>
<string>$(APP_GROUP_IDENTIFIER)</string>
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</plist>
+1
View File
@@ -45,6 +45,7 @@ targets:
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
appGroupIdentifier: $(APP_GROUP_IDENTIFIER)
baseBundleIdentifier: $(BASE_BUNDLE_IDENTIFIER)
keychainAccessGroupIdentifier: $(KEYCHAIN_ACCESS_GROUP_IDENTIFIER)
NSExtension:
NSExtensionPointIdentifier: com.apple.usernotifications.service
NSExtensionPrincipalClass: $(PRODUCT_MODULE_NAME).NotificationServiceExtension