Skip to content

Commit a4d7a61

Browse files
Fix broken codesign option for bundle dependency (#1104)
* Fix missing codesign option for bundle dependency * Add codeSign: false test case for bundle dependency * Update CHANGELOG.md
1 parent d35d22f commit a4d7a61

File tree

6 files changed

+227
-2
lines changed

6 files changed

+227
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
### Added
66
- Allow specifying a `copy` setting for each dependency. [#1038](https://github.com/yonaskolb/XcodeGen/pull/1039) @JakubBednar
77

8+
### Fixed
9+
10+
- Fix broken codesign option for bundle dependency [#1104](https://github.com/yonaskolb/XcodeGen/pull/1104) @kateinoigakukun
11+
812
## 2.24.0
913

1014
### Added

Sources/XcodeGenKit/PBXProjGenerator.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,10 @@ public class PBXProjGenerator {
958958
sourceTree: .buildProductsDir
959959
)
960960

961-
let pbxBuildFile = PBXBuildFile(file: fileReference, settings: nil)
961+
let pbxBuildFile = PBXBuildFile(
962+
file: fileReference,
963+
settings: embed ? getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true) : nil
964+
)
962965
pbxBuildFile.platformFilter = platform
963966
let buildFile = addObject(pbxBuildFile)
964967
copyBundlesReferences.append(buildFile)

Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
1111
60D6679FB526839EAFEA2EEE /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = "<group>"; };
1212
D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ExternalTarget.framework; sourceTree = BUILT_PRODUCTS_DIR; };
13+
F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleY.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
1314
/* End PBXFileReference section */
1415

1516
/* Begin PBXGroup section */
@@ -34,6 +35,7 @@
3435
isa = PBXGroup;
3536
children = (
3637
6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */,
38+
F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */,
3739
D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */,
3840
);
3941
name = Products;
@@ -59,6 +61,20 @@
5961
/* End PBXLegacyTarget section */
6062

6163
/* Begin PBXNativeTarget section */
64+
201AC870383B8CD218AD0FAB /* BundleY */ = {
65+
isa = PBXNativeTarget;
66+
buildConfigurationList = EF9E2AA4073D3B2EC8195688 /* Build configuration list for PBXNativeTarget "BundleY" */;
67+
buildPhases = (
68+
);
69+
buildRules = (
70+
);
71+
dependencies = (
72+
);
73+
name = BundleY;
74+
productName = BundleY;
75+
productReference = F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */;
76+
productType = "com.apple.product-type.bundle";
77+
};
6278
63A2D4898D974A06E85B07F8 /* BundleX */ = {
6379
isa = PBXNativeTarget;
6480
buildConfigurationList = 32C09717E388BCD9DB9E513C /* Build configuration list for PBXNativeTarget "BundleX" */;
@@ -110,6 +126,7 @@
110126
projectRoot = "";
111127
targets = (
112128
63A2D4898D974A06E85B07F8 /* BundleX */,
129+
201AC870383B8CD218AD0FAB /* BundleY */,
113130
E76A5F5E363E470416D3B487 /* ExternalTarget */,
114131
A6D9FB94860C005F0B723B5F /* IncludedLegacy */,
115132
);
@@ -322,6 +339,18 @@
322339
};
323340
name = "Test Debug";
324341
};
342+
1CE986A8B593E707AB71BDBA /* Production Release */ = {
343+
isa = XCBuildConfiguration;
344+
buildSettings = {
345+
LD_RUNPATH_SEARCH_PATHS = (
346+
"$(inherited)",
347+
"@executable_path/Frameworks",
348+
);
349+
SDKROOT = iphoneos;
350+
TARGETED_DEVICE_FAMILY = "1,2";
351+
};
352+
name = "Production Release";
353+
};
325354
270E1D32776D2D196D435FDA /* Staging Debug */ = {
326355
isa = XCBuildConfiguration;
327356
buildSettings = {
@@ -570,6 +599,18 @@
570599
};
571600
name = "Production Debug";
572601
};
602+
58F418B6745A09C6479FDD6E /* Staging Release */ = {
603+
isa = XCBuildConfiguration;
604+
buildSettings = {
605+
LD_RUNPATH_SEARCH_PATHS = (
606+
"$(inherited)",
607+
"@executable_path/Frameworks",
608+
);
609+
SDKROOT = iphoneos;
610+
TARGETED_DEVICE_FAMILY = "1,2";
611+
};
612+
name = "Staging Release";
613+
};
573614
5F14CE04E33ACD729A0EE6B6 /* Test Debug */ = {
574615
isa = XCBuildConfiguration;
575616
buildSettings = {
@@ -648,6 +689,18 @@
648689
};
649690
name = "Test Release";
650691
};
692+
816E80EA88CB645CE988138C /* Staging Debug */ = {
693+
isa = XCBuildConfiguration;
694+
buildSettings = {
695+
LD_RUNPATH_SEARCH_PATHS = (
696+
"$(inherited)",
697+
"@executable_path/Frameworks",
698+
);
699+
SDKROOT = iphoneos;
700+
TARGETED_DEVICE_FAMILY = "1,2";
701+
};
702+
name = "Staging Debug";
703+
};
651704
9BD6CAD5463121A1C3FED138 /* Production Release */ = {
652705
isa = XCBuildConfiguration;
653706
buildSettings = {
@@ -760,6 +813,42 @@
760813
};
761814
name = "Production Release";
762815
};
816+
E7907C46C6282D78E009083B /* Test Debug */ = {
817+
isa = XCBuildConfiguration;
818+
buildSettings = {
819+
LD_RUNPATH_SEARCH_PATHS = (
820+
"$(inherited)",
821+
"@executable_path/Frameworks",
822+
);
823+
SDKROOT = iphoneos;
824+
TARGETED_DEVICE_FAMILY = "1,2";
825+
};
826+
name = "Test Debug";
827+
};
828+
FB66976FF75B2B0B255D5AA4 /* Test Release */ = {
829+
isa = XCBuildConfiguration;
830+
buildSettings = {
831+
LD_RUNPATH_SEARCH_PATHS = (
832+
"$(inherited)",
833+
"@executable_path/Frameworks",
834+
);
835+
SDKROOT = iphoneos;
836+
TARGETED_DEVICE_FAMILY = "1,2";
837+
};
838+
name = "Test Release";
839+
};
840+
FD9323224BE5A91248B7BEF2 /* Production Debug */ = {
841+
isa = XCBuildConfiguration;
842+
buildSettings = {
843+
LD_RUNPATH_SEARCH_PATHS = (
844+
"$(inherited)",
845+
"@executable_path/Frameworks",
846+
);
847+
SDKROOT = iphoneos;
848+
TARGETED_DEVICE_FAMILY = "1,2";
849+
};
850+
name = "Production Debug";
851+
};
763852
/* End XCBuildConfiguration section */
764853

765854
/* Begin XCConfigurationList section */
@@ -815,6 +904,19 @@
815904
defaultConfigurationIsVisible = 0;
816905
defaultConfigurationName = "Production Debug";
817906
};
907+
EF9E2AA4073D3B2EC8195688 /* Build configuration list for PBXNativeTarget "BundleY" */ = {
908+
isa = XCConfigurationList;
909+
buildConfigurations = (
910+
FD9323224BE5A91248B7BEF2 /* Production Debug */,
911+
1CE986A8B593E707AB71BDBA /* Production Release */,
912+
816E80EA88CB645CE988138C /* Staging Debug */,
913+
58F418B6745A09C6479FDD6E /* Staging Release */,
914+
E7907C46C6282D78E009083B /* Test Debug */,
915+
FB66976FF75B2B0B255D5AA4 /* Test Release */,
916+
);
917+
defaultConfigurationIsVisible = 0;
918+
defaultConfigurationName = "Production Debug";
919+
};
818920
/* End XCConfigurationList section */
819921
};
820922
rootObject = 1B166EB49192B73A9DD8E108 /* Project object */;

Tests/Fixtures/TestProject/AnotherProject/project.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ targets:
88
BundleX:
99
type: bundle
1010
platform: iOS
11+
BundleY:
12+
type: bundle
13+
platform: iOS
1114
ExternalTarget:
1215
type: framework
1316
platform: iOS

0 commit comments

Comments
 (0)