Skip to content

Commit 078c7d6

Browse files
committed
fix: watchos target handling
1 parent aa61b07 commit 078c7d6

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

lib/services/ios-watch-app-service.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ export class IOSWatchAppService implements IIOSWatchAppService {
235235
pbxProjPath,
236236
);
237237

238+
if (disableStubBinary) {
239+
this.applyWatchAppStubBinaryOverrides(appFolder, pbxProjPath);
240+
}
241+
238242
return true;
239243
}
240244

@@ -606,6 +610,28 @@ export class IOSWatchAppService implements IIOSWatchAppService {
606610
}
607611
}
608612

613+
private applyWatchAppStubBinaryOverrides(
614+
targetName: string,
615+
pbxProjPath: string,
616+
): void {
617+
const project = new this.$xcode.project(pbxProjPath);
618+
project.parseSync();
619+
620+
this.$iOSNativeTargetService.setXcodeTargetBuildConfigurationProperties(
621+
[
622+
{ name: "PRODUCT_BINARY_SOURCE_PATH", value: '""' },
623+
{ name: "PRODUCT_TYPE_HAS_STUB_BINARY", value: "NO" },
624+
],
625+
targetName,
626+
project,
627+
);
628+
629+
this.$fs.writeFile(
630+
pbxProjPath,
631+
project.writeSync({ omitEmptyValues: true }),
632+
);
633+
}
634+
609635
private async processWatchAppConfiguration(
610636
config: IWatchAppJSONConfig,
611637
basedir: string,

0 commit comments

Comments
 (0)