Skip to content

Commit 4d75287

Browse files
committed
Disregard CODE_SIGNING_REQUIRED when deciding to sign
1 parent 1ad9da9 commit 4d75287

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

packages/host/src/node/cli/apple.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,15 +421,17 @@ export async function createAppleLinker(): Promise<ModuleLinker> {
421421

422422
const expectedSlice = determineFrameworkSlice();
423423

424+
assert(
425+
signingRequired !== "YES" || signingAllowed !== "NO",
426+
"Expected either CODE_SIGNING_REQUIRED not be YES or CODE_SIGNING_ALLOWED not be NO",
427+
);
428+
424429
return (options: LinkModuleOptions) => {
425430
return linkXcframework({
426431
...options,
427432
outputPath,
428433
expectedSlice,
429-
signingIdentity:
430-
signingRequired !== "NO" && signingAllowed !== "NO"
431-
? signingIdentity
432-
: undefined,
434+
signingIdentity: signingAllowed !== "NO" ? signingIdentity : undefined,
433435
});
434436
};
435437
}
@@ -443,6 +445,10 @@ export async function linkXcframework({
443445
}: LinkModuleOptions & {
444446
outputPath: string;
445447
expectedSlice: ExpectedFrameworkSlice;
448+
/**
449+
* If not provided, the framework will not be signed.
450+
* If provided, the framework will be signed with the given identity.
451+
*/
446452
signingIdentity?: string;
447453
}): Promise<LinkModuleResult> {
448454
// Copy the xcframework to the output directory and rename the framework and binary

0 commit comments

Comments
 (0)