Skip to content

Commit

Permalink
Fix broken codesign option for bundle dependency (yonaskolb#1104)
Browse files Browse the repository at this point in the history
* Fix missing codesign option for bundle dependency

* Add codeSign: false test case for bundle dependency

* Update CHANGELOG.md
  • Loading branch information
kateinoigakukun committed Jul 15, 2021
1 parent d35d22f commit a4d7a61
Show file tree
Hide file tree
Showing 6 changed files with 227 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
### Added
- Allow specifying a `copy` setting for each dependency. [#1038](https://github.com/yonaskolb/XcodeGen/pull/1039) @JakubBednar

### Fixed

- Fix broken codesign option for bundle dependency [#1104](https://github.com/yonaskolb/XcodeGen/pull/1104) @kateinoigakukun

## 2.24.0

### Added
Expand Down
5 changes: 4 additions & 1 deletion Sources/XcodeGenKit/PBXProjGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,10 @@ public class PBXProjGenerator {
sourceTree: .buildProductsDir
)

let pbxBuildFile = PBXBuildFile(file: fileReference, settings: nil)
let pbxBuildFile = PBXBuildFile(
file: fileReference,
settings: embed ? getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true) : nil
)
pbxBuildFile.platformFilter = platform
let buildFile = addObject(pbxBuildFile)
copyBundlesReferences.append(buildFile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
60D6679FB526839EAFEA2EEE /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = "<group>"; };
D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ExternalTarget.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleY.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXGroup section */
Expand All @@ -34,6 +35,7 @@
isa = PBXGroup;
children = (
6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */,
F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */,
D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */,
);
name = Products;
Expand All @@ -59,6 +61,20 @@
/* End PBXLegacyTarget section */

/* Begin PBXNativeTarget section */
201AC870383B8CD218AD0FAB /* BundleY */ = {
isa = PBXNativeTarget;
buildConfigurationList = EF9E2AA4073D3B2EC8195688 /* Build configuration list for PBXNativeTarget "BundleY" */;
buildPhases = (
);
buildRules = (
);
dependencies = (
);
name = BundleY;
productName = BundleY;
productReference = F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */;
productType = "com.apple.product-type.bundle";
};
63A2D4898D974A06E85B07F8 /* BundleX */ = {
isa = PBXNativeTarget;
buildConfigurationList = 32C09717E388BCD9DB9E513C /* Build configuration list for PBXNativeTarget "BundleX" */;
Expand Down Expand Up @@ -110,6 +126,7 @@
projectRoot = "";
targets = (
63A2D4898D974A06E85B07F8 /* BundleX */,
201AC870383B8CD218AD0FAB /* BundleY */,
E76A5F5E363E470416D3B487 /* ExternalTarget */,
A6D9FB94860C005F0B723B5F /* IncludedLegacy */,
);
Expand Down Expand Up @@ -322,6 +339,18 @@
};
name = "Test Debug";
};
1CE986A8B593E707AB71BDBA /* Production Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = "Production Release";
};
270E1D32776D2D196D435FDA /* Staging Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -570,6 +599,18 @@
};
name = "Production Debug";
};
58F418B6745A09C6479FDD6E /* Staging Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = "Staging Release";
};
5F14CE04E33ACD729A0EE6B6 /* Test Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -648,6 +689,18 @@
};
name = "Test Release";
};
816E80EA88CB645CE988138C /* Staging Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = "Staging Debug";
};
9BD6CAD5463121A1C3FED138 /* Production Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -760,6 +813,42 @@
};
name = "Production Release";
};
E7907C46C6282D78E009083B /* Test Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = "Test Debug";
};
FB66976FF75B2B0B255D5AA4 /* Test Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = "Test Release";
};
FD9323224BE5A91248B7BEF2 /* Production Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = "Production Debug";
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -815,6 +904,19 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "Production Debug";
};
EF9E2AA4073D3B2EC8195688 /* Build configuration list for PBXNativeTarget "BundleY" */ = {
isa = XCConfigurationList;
buildConfigurations = (
FD9323224BE5A91248B7BEF2 /* Production Debug */,
1CE986A8B593E707AB71BDBA /* Production Release */,
816E80EA88CB645CE988138C /* Staging Debug */,
58F418B6745A09C6479FDD6E /* Staging Release */,
E7907C46C6282D78E009083B /* Test Debug */,
FB66976FF75B2B0B255D5AA4 /* Test Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "Production Debug";
};
/* End XCConfigurationList section */
};
rootObject = 1B166EB49192B73A9DD8E108 /* Project object */;
Expand Down
3 changes: 3 additions & 0 deletions Tests/Fixtures/TestProject/AnotherProject/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ targets:
BundleX:
type: bundle
platform: iOS
BundleY:
type: bundle
platform: iOS
ExternalTarget:
type: framework
platform: iOS
Expand Down
Loading

0 comments on commit a4d7a61

Please sign in to comment.