Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2026-01-19 12:40:11 -06:00
parent dda6663928
commit d799efa182
2 changed files with 19 additions and 5 deletions

View File

@ -544,6 +544,10 @@ Add keys to `Info.plist` that bridge xcconfig values to Swift:
#### Step 5: Create Swift Interface #### Step 5: Create Swift Interface
**Why this is needed:** Swift code cannot read xcconfig files directly. The xcconfig values flow through Info.plist, and this Swift file provides a clean API to access them at runtime. Without this file, you'd have to call `Bundle.main.object(forInfoDictionaryKey:)` everywhere you need an identifier.
**When to use:** Any Swift code that needs App Group identifiers, CloudKit containers, custom domains, or other configuration values must use `AppIdentifiers.*` instead of hardcoding strings.
Create `Configuration/AppIdentifiers.swift`: Create `Configuration/AppIdentifiers.swift`:
```swift ```swift
@ -746,3 +750,4 @@ Then clean build (⇧⌘K) and rebuild. Everything updates automatically—inclu
- Verify that documentation reflects any new functionality. - Verify that documentation reflects any new functionality.
- Check for duplicate code before submitting. - Check for duplicate code before submitting.
- Ensure all new files follow the one-type-per-file rule. - Ensure all new files follow the one-type-per-file rule.

View File

@ -31,9 +31,8 @@
EA5ADA2F2EF9CC2C0040CB90 /* Blackjack.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Blackjack.app; sourceTree = BUILT_PRODUCTS_DIR; }; EA5ADA2F2EF9CC2C0040CB90 /* Blackjack.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Blackjack.app; sourceTree = BUILT_PRODUCTS_DIR; };
EA5ADA3C2EF9CC2D0040CB90 /* BlackjackTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BlackjackTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; EA5ADA3C2EF9CC2D0040CB90 /* BlackjackTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BlackjackTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
EA5ADA462EF9CC2D0040CB90 /* BlackjackUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BlackjackUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; EA5ADA462EF9CC2D0040CB90 /* BlackjackUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BlackjackUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
EACONFIG001000000000000 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Blackjack/Configuration/Base.xcconfig; sourceTree = SOURCE_ROOT; }; EACONFIG002000000000000 /* Blackjack/Configuration/Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Blackjack/Configuration/Debug.xcconfig; sourceTree = SOURCE_ROOT; };
EACONFIG002000000000000 /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Blackjack/Configuration/Debug.xcconfig; sourceTree = SOURCE_ROOT; }; EACONFIG003000000000000 /* Blackjack/Configuration/Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Blackjack/Configuration/Release.xcconfig; sourceTree = SOURCE_ROOT; };
EACONFIG003000000000000 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Blackjack/Configuration/Release.xcconfig; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFileSystemSynchronizedRootGroup section */
@ -80,6 +79,15 @@
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
EA39BD632F1EB1D70073D1E1 /* Recovered References */ = {
isa = PBXGroup;
children = (
EACONFIG002000000000000 /* Blackjack/Configuration/Debug.xcconfig */,
EACONFIG003000000000000 /* Blackjack/Configuration/Release.xcconfig */,
);
name = "Recovered References";
sourceTree = "<group>";
};
EA5ADA262EF9CC2C0040CB90 = { EA5ADA262EF9CC2C0040CB90 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -87,6 +95,7 @@
EA5ADA3F2EF9CC2D0040CB90 /* BlackjackTests */, EA5ADA3F2EF9CC2D0040CB90 /* BlackjackTests */,
EA5ADA492EF9CC2D0040CB90 /* BlackjackUITests */, EA5ADA492EF9CC2D0040CB90 /* BlackjackUITests */,
EA5ADA302EF9CC2C0040CB90 /* Products */, EA5ADA302EF9CC2C0040CB90 /* Products */,
EA39BD632F1EB1D70073D1E1 /* Recovered References */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -285,7 +294,7 @@
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
EA5ADA4E2EF9CC2D0040CB90 /* Debug */ = { EA5ADA4E2EF9CC2D0040CB90 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = EACONFIG002000000000000 /* Debug.xcconfig */; baseConfigurationReference = EACONFIG002000000000000 /* Blackjack/Configuration/Debug.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
@ -349,7 +358,7 @@
}; };
EA5ADA4F2EF9CC2D0040CB90 /* Release */ = { EA5ADA4F2EF9CC2D0040CB90 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = EACONFIG003000000000000 /* Release.xcconfig */; baseConfigurationReference = EACONFIG003000000000000 /* Blackjack/Configuration/Release.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;