Skip to content

Commit 30e3063

Browse files
authored
fix #128 -- use a DISAMBIGUATOR to have a unique bundleId (#131)
1 parent 7dc2d8f commit 30e3063

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

Configuration/Build.xcconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// The `DISAMBIGUATOR` configuration is to make it easier to build
2+
// and run a sample code project. Once you set your project's development team,
3+
// you'll have a unique bundle identifier. This is because the bundle identifier
4+
// is derived based on the 'DISAMBIGUATOR' value. Do not use this
5+
// approach in your own projects—it's only useful for example projects because
6+
// they are frequently downloaded and don't have a development team set.
7+
DISAMBIGUATOR=${DEVELOPMENT_TEAM}

mlx-swift-examples.xcodeproj/project.pbxproj

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@
376376
C3A8B3F22B92A2A90002EFB8 /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
377377
C3C3240B2B6CA689007D2D9A /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
378378
C3C3240C2B6CA792007D2D9A /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
379+
C3C36A6B2CA714600099FFA4 /* Build.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Build.xcconfig; sourceTree = "<group>"; };
379380
C3D573052C40701E00857A35 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
380381
C3D573062C40702D00857A35 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
381382
C3E786AA2B8D1AEC0004D037 /* Evaluate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Evaluate.swift; sourceTree = "<group>"; };
@@ -674,6 +675,7 @@
674675
children = (
675676
C325DE3F2B648CDB00628871 /* README.md */,
676677
F8D7023A2BB4E223003D7CF5 /* Package.swift */,
678+
C3C36A6C2CA714600099FFA4 /* Configuration */,
677679
C3056BA62BCD973400A31D04 /* Data */,
678680
C39273822B606A9200368D5D /* Libraries */,
679681
C3A8B3AD2B9294E30002EFB8 /* Applications */,
@@ -795,6 +797,14 @@
795797
path = "Preview Content";
796798
sourceTree = "<group>";
797799
};
800+
C3C36A6C2CA714600099FFA4 /* Configuration */ = {
801+
isa = PBXGroup;
802+
children = (
803+
C3C36A6B2CA714600099FFA4 /* Build.xcconfig */,
804+
);
805+
path = Configuration;
806+
sourceTree = "<group>";
807+
};
798808
/* End PBXGroup section */
799809

800810
/* Begin PBXHeadersBuildPhase section */
@@ -1498,7 +1508,7 @@
14981508
MARKETING_VERSION = 1.0;
14991509
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
15001510
MTL_FAST_MATH = YES;
1501-
PRODUCT_BUNDLE_IDENTIFIER = mlx.LoRATrainingExample;
1511+
PRODUCT_BUNDLE_IDENTIFIER = "mlx.LoRATrainingExample${DISAMBIGUATOR}";
15021512
PRODUCT_NAME = "$(TARGET_NAME)";
15031513
SDKROOT = auto;
15041514
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
@@ -1586,7 +1596,7 @@
15861596
MARKETING_VERSION = 1.0;
15871597
MTL_ENABLE_DEBUG_INFO = NO;
15881598
MTL_FAST_MATH = YES;
1589-
PRODUCT_BUNDLE_IDENTIFIER = mlx.LoRATrainingExample;
1599+
PRODUCT_BUNDLE_IDENTIFIER = "mlx.LoRATrainingExample${DISAMBIGUATOR}";
15901600
PRODUCT_NAME = "$(TARGET_NAME)";
15911601
SDKROOT = auto;
15921602
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
@@ -2419,7 +2429,7 @@
24192429
MARKETING_VERSION = 1.0;
24202430
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
24212431
MTL_FAST_MATH = YES;
2422-
PRODUCT_BUNDLE_IDENTIFIER = mlx.StableDiffusionExample;
2432+
PRODUCT_BUNDLE_IDENTIFIER = "mlx.StableDiffusionExample${DISAMBIGUATOR}";
24232433
PRODUCT_NAME = "$(TARGET_NAME)";
24242434
SDKROOT = auto;
24252435
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
@@ -2507,7 +2517,7 @@
25072517
MARKETING_VERSION = 1.0;
25082518
MTL_ENABLE_DEBUG_INFO = NO;
25092519
MTL_FAST_MATH = YES;
2510-
PRODUCT_BUNDLE_IDENTIFIER = mlx.StableDiffusionExample;
2520+
PRODUCT_BUNDLE_IDENTIFIER = "mlx.StableDiffusionExample${DISAMBIGUATOR}";
25112521
PRODUCT_NAME = "$(TARGET_NAME)";
25122522
SDKROOT = auto;
25132523
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
@@ -2705,6 +2715,7 @@
27052715
};
27062716
C392736C2B60697700368D5D /* Debug */ = {
27072717
isa = XCBuildConfiguration;
2718+
baseConfigurationReference = C3C36A6B2CA714600099FFA4 /* Build.xcconfig */;
27082719
buildSettings = {
27092720
ARCHS = "$(ARCHS_STANDARD)";
27102721
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
@@ -2743,6 +2754,7 @@
27432754
};
27442755
C392736D2B60697700368D5D /* Release */ = {
27452756
isa = XCBuildConfiguration;
2757+
baseConfigurationReference = C3C36A6B2CA714600099FFA4 /* Build.xcconfig */;
27462758
buildSettings = {
27472759
ARCHS = "$(ARCHS_STANDARD)";
27482760
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
@@ -3113,7 +3125,7 @@
31133125
MARKETING_VERSION = 1.0;
31143126
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
31153127
MTL_FAST_MATH = YES;
3116-
PRODUCT_BUNDLE_IDENTIFIER = mlx.MNISTTrainer;
3128+
PRODUCT_BUNDLE_IDENTIFIER = "mlx.MNISTTrainer${DISAMBIGUATOR}";
31173129
PRODUCT_NAME = "$(TARGET_NAME)";
31183130
SDKROOT = auto;
31193131
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
@@ -3200,7 +3212,7 @@
32003212
MARKETING_VERSION = 1.0;
32013213
MTL_ENABLE_DEBUG_INFO = NO;
32023214
MTL_FAST_MATH = YES;
3203-
PRODUCT_BUNDLE_IDENTIFIER = mlx.MNISTTrainer;
3215+
PRODUCT_BUNDLE_IDENTIFIER = "mlx.MNISTTrainer${DISAMBIGUATOR}";
32043216
PRODUCT_NAME = "$(TARGET_NAME)";
32053217
SDKROOT = auto;
32063218
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
@@ -3292,7 +3304,7 @@
32923304
MARKETING_VERSION = 1.0;
32933305
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
32943306
MTL_FAST_MATH = YES;
3295-
PRODUCT_BUNDLE_IDENTIFIER = mlx.LLMEval;
3307+
PRODUCT_BUNDLE_IDENTIFIER = "mlx.LLMEval${DISAMBIGUATOR}";
32963308
PRODUCT_NAME = "$(TARGET_NAME)";
32973309
SDKROOT = auto;
32983310
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
@@ -3379,7 +3391,7 @@
33793391
MARKETING_VERSION = 1.0;
33803392
MTL_ENABLE_DEBUG_INFO = NO;
33813393
MTL_FAST_MATH = YES;
3382-
PRODUCT_BUNDLE_IDENTIFIER = mlx.LLMEval;
3394+
PRODUCT_BUNDLE_IDENTIFIER = "mlx.LLMEval${DISAMBIGUATOR}";
33833395
PRODUCT_NAME = "$(TARGET_NAME)";
33843396
SDKROOT = auto;
33853397
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";

0 commit comments

Comments
 (0)