From 5a59867d4834160a45c7cc8f8465c2d8b1276666 Mon Sep 17 00:00:00 2001 From: Christophe Vila Date: Sat, 19 Sep 2026 22:03:34 +0200 Subject: [PATCH] fix: align AutoFill keychain-access-group with main app, lowercase bundle IDs Root-caused the "MyPass doesn't appear in Settings > AutoFill Passwords" issue: entitlements embed correctly on a real device build but are silently stripped to empty on every Simulator build in this environment (confirmed identically via CLI xcodebuild and Xcode's own GUI build/run, before and after multiple rounds of removing/re-adding capabilities in Signing & Capabilities). This is a Simulator/SDK-level limitation in this environment, not a project misconfiguration -- verified by comparing against a real iphoneos device build, which embeds the full App Group / Keychain Sharing / AutoFill Credential Provider entitlements correctly. While diagnosing, found and fixed a real, separate bug: AutoFill's Keychain Sharing group had been set (via Xcode's capability re-add flow, which defaults to the target's own bundle ID) to org.antiloop222.mypass.autofill, while the main app uses org.antiloop222.mypass -- a mismatch that would have prevented the extension from ever reading the shared master password from Keychain, even on a real device where entitlements embed correctly. Now aligned to org.antiloop222.mypass on both targets, matching what KeychainStore's hardcoded accessGroup expects in both AutoFill/ CredentialProviderViewController.swift and MyPass/ViewModels/ UnlockViewModel.swift. Also includes the user's own Signing & Capabilities re-add (repopulated App Group selections) and a bundle-identifier lowercase normalization (org.antiloop222.MyPass -> org.antiloop222.mypass, matching the already-lowercase App Group/Keychain group strings) made via Xcode's GUI. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01WYqycDFsynHH9VnnK7LNSf --- AutoFill/AutoFill.entitlements | 24 +++++------ MyPass.xcodeproj/project.pbxproj | 40 +++++++++++-------- .../xcschemes/xcschememanagement.plist | 4 +- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/AutoFill/AutoFill.entitlements b/AutoFill/AutoFill.entitlements index 3622ef2..7e0ef10 100644 --- a/AutoFill/AutoFill.entitlements +++ b/AutoFill/AutoFill.entitlements @@ -1,16 +1,16 @@ - - com.apple.developer.authentication-services.autofill-credential-provider - - com.apple.security.application-groups - - group.org.antiloop222.mypass - - keychain-access-groups - - $(AppIdentifierPrefix)org.antiloop222.mypass - - + + com.apple.developer.authentication-services.autofill-credential-provider + + com.apple.security.application-groups + + group.org.antiloop222.mypass + + keychain-access-groups + + $(AppIdentifierPrefix)org.antiloop222.mypass + + diff --git a/MyPass.xcodeproj/project.pbxproj b/MyPass.xcodeproj/project.pbxproj index 832263b..c49a334 100644 --- a/MyPass.xcodeproj/project.pbxproj +++ b/MyPass.xcodeproj/project.pbxproj @@ -280,7 +280,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 2660; - LastUpgradeCheck = 2650; + LastUpgradeCheck = 2660; TargetAttributes = { 205678922FBF9CBB00251C6B = { CreatedOnToolsVersion = 26.5; @@ -441,6 +441,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -463,6 +464,7 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; @@ -502,6 +504,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -517,6 +520,7 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_COMPILATION_MODE = wholemodule; }; name = Release; @@ -527,13 +531,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = MyPass/MyPass.entitlements; - ENTITLEMENTS_REQUIRED = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = F2KB6W8N4R; ENABLE_APP_SANDBOX = YES; ENABLE_PREVIEWS = YES; ENABLE_USER_SELECTED_FILES = readonly; + ENTITLEMENTS_REQUIRED = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSFaceIDUsageDescription = "Unlock your vault with Face ID."; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; @@ -551,9 +556,7 @@ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 26.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.MyPass; - "PRODUCT_BUNDLE_IDENTIFIER[sdk=iphoneos*]" = org.antiloop222.MyPass; - "PRODUCT_BUNDLE_IDENTIFIER[sdk=macosx*]" = org.antiloop222.MyPass; + PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.mypass; "PRODUCT_BUNDLE_IDENTIFIER[sdk=xros*]" = org.antiloop222.MyPass; PRODUCT_NAME = "$(TARGET_NAME)"; REGISTER_APP_GROUPS = YES; @@ -577,13 +580,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = MyPass/MyPass.entitlements; - ENTITLEMENTS_REQUIRED = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = F2KB6W8N4R; ENABLE_APP_SANDBOX = YES; ENABLE_PREVIEWS = YES; ENABLE_USER_SELECTED_FILES = readonly; + ENTITLEMENTS_REQUIRED = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSFaceIDUsageDescription = "Unlock your vault with Face ID."; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; @@ -601,9 +605,7 @@ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 26.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.MyPass; - "PRODUCT_BUNDLE_IDENTIFIER[sdk=iphoneos*]" = org.antiloop222.MyPass; - "PRODUCT_BUNDLE_IDENTIFIER[sdk=macosx*]" = org.antiloop222.MyPass; + PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.mypass; "PRODUCT_BUNDLE_IDENTIFIER[sdk=xros*]" = org.antiloop222.MyPass; PRODUCT_NAME = "$(TARGET_NAME)"; REGISTER_APP_GROUPS = YES; @@ -627,11 +629,12 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 26.5; MACOSX_DEPLOYMENT_TARGET = 26.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.MyPassTests; + PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.mypasstests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; STRING_CATALOG_GENERATE_SYMBOLS = NO; @@ -653,11 +656,12 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 26.5; MACOSX_DEPLOYMENT_TARGET = 26.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.MyPassTests; + PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.mypasstests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; STRING_CATALOG_GENERATE_SYMBOLS = NO; @@ -678,11 +682,12 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 26.5; MACOSX_DEPLOYMENT_TARGET = 26.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.MyPassUITests; + PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.mypassuitests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; STRING_CATALOG_GENERATE_SYMBOLS = NO; @@ -703,11 +708,12 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 26.5; MACOSX_DEPLOYMENT_TARGET = 26.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.MyPassUITests; + PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.mypassuitests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; STRING_CATALOG_GENERATE_SYMBOLS = NO; @@ -727,10 +733,10 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = AutoFill/AutoFill.entitlements; - ENTITLEMENTS_REQUIRED = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = F2KB6W8N4R; + ENTITLEMENTS_REQUIRED = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = AutoFill/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoFill; @@ -743,7 +749,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.MyPass.AutoFill; + PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.mypass.autofill; PRODUCT_NAME = "$(TARGET_NAME)"; REGISTER_APP_GROUPS = YES; SDKROOT = iphoneos; @@ -764,10 +770,10 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = AutoFill/AutoFill.entitlements; - ENTITLEMENTS_REQUIRED = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = F2KB6W8N4R; + ENTITLEMENTS_REQUIRED = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = AutoFill/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoFill; @@ -780,7 +786,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.MyPass.AutoFill; + PRODUCT_BUNDLE_IDENTIFIER = org.antiloop222.mypass.autofill; PRODUCT_NAME = "$(TARGET_NAME)"; REGISTER_APP_GROUPS = YES; SDKROOT = iphoneos; diff --git a/MyPass.xcodeproj/xcuserdata/kriss.xcuserdatad/xcschemes/xcschememanagement.plist b/MyPass.xcodeproj/xcuserdata/kriss.xcuserdatad/xcschemes/xcschememanagement.plist index 8d605ac..ef7196f 100644 --- a/MyPass.xcodeproj/xcuserdata/kriss.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/MyPass.xcodeproj/xcuserdata/kriss.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,12 +7,12 @@ AutoFill.xcscheme_^#shared#^_ orderHint - 4 + 3 MyPass.xcscheme_^#shared#^_ orderHint - 3 + 4