From 80de65b6ae3b9ddc60f180d87cfb2335a5f12ab3 Mon Sep 17 00:00:00 2001 From: Martin Bektchiev Date: Mon, 1 Jul 2019 18:45:20 +0300 Subject: [PATCH 1/2] feat(ios): Extract iOS Runtime's xcframeworks from zip NPM doesn't support symlinks and as a workaround we're embedding all XCFrameworks in a zip archive. --- lib/services/ios-project-service.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/services/ios-project-service.ts b/lib/services/ios-project-service.ts index 6a0854c2fb..bd58448033 100644 --- a/lib/services/ios-project-service.ts +++ b/lib/services/ios-project-service.ts @@ -178,6 +178,13 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ const pbxprojFilePath = this.getPbxProjPath(projectData); this.replaceFileContent(pbxprojFilePath, projectData); + + const internalDirPath = path.join(projectRootFilePath, "..", "internal"); + const xcframeworksFilePath = path.join(internalDirPath, "XCFrameworks.zip"); + if (this.$fs.exists(xcframeworksFilePath)) { + await this.$fs.unzip(xcframeworksFilePath, internalDirPath); + this.$fs.deleteFile(xcframeworksFilePath); + } } public interpolateConfigurationFile(projectData: IProjectData): void { From aeb426d338e940b6702b13f2798e284b6745099a Mon Sep 17 00:00:00 2001 From: Martin Bektchiev Date: Mon, 1 Jul 2019 18:46:08 +0300 Subject: [PATCH 2/2] fix(ios): CodeSign frameworks in final executable It is required for UIKit for Mac --- lib/services/ios-project-service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/services/ios-project-service.ts b/lib/services/ios-project-service.ts index bd58448033..c3db103ba7 100644 --- a/lib/services/ios-project-service.ts +++ b/lib/services/ios-project-service.ts @@ -271,6 +271,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ const frameworkAddOptions: IXcode.Options = { customFramework: true }; if (await this.isDynamicFramework(frameworkPath)) { frameworkAddOptions["embed"] = true; + frameworkAddOptions["sign"] = true; } const frameworkRelativePath = '$(SRCROOT)/' + this.getLibSubpathRelativeToProjectPath(frameworkPath, projectData);