From b5b0744791f090d9032984d76875f6de6315d330 Mon Sep 17 00:00:00 2001 From: Martin Bektchiev Date: Thu, 19 Oct 2017 09:39:21 +0300 Subject: [PATCH] Remove iOS static library verification It tries to predict a linker error and stop earlier, but there are cases where it fails to do so correctly. We now start building without any preliminary checks on libraries and let it fail with whatever error it does. fixes #2967 --- lib/services/ios-project-service.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/services/ios-project-service.ts b/lib/services/ios-project-service.ts index 3ecfcd4162..658bafee3b 100644 --- a/lib/services/ios-project-service.ts +++ b/lib/services/ios-project-service.ts @@ -582,7 +582,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ } private async addStaticLibrary(staticLibPath: string, projectData: IProjectData): Promise { - await this.validateStaticLibrary(staticLibPath); // Copy files to lib folder. const libraryName = path.basename(staticLibPath, ".a"); const headersSubpath = path.join(path.dirname(staticLibPath), "include", libraryName); @@ -1031,21 +1030,6 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f } } - private async validateStaticLibrary(libraryPath: string): Promise { - if (path.extname(libraryPath) !== ".a") { - this.$errors.failWithoutHelp(`The bundle at ${libraryPath} does not contain a valid static library in the '.a' file format.`); - } - - const expectedArchs = ["armv7", "arm64", "i386"]; - const archsInTheFatFile = await this.$childProcess.exec("lipo -i " + libraryPath); - - expectedArchs.forEach(expectedArch => { - if (archsInTheFatFile.indexOf(expectedArch) < 0) { - this.$errors.failWithoutHelp(`The static library at ${libraryPath} is not built for one or more of the following required architectures: ${expectedArchs.join(", ")}. The static library must be built for all required architectures.`); - } - }); - } - private replaceFileContent(file: string, projectData: IProjectData): void { const fileContent = this.$fs.readText(file); const replacedContent = helpers.stringReplaceAll(fileContent, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER, projectData.projectName);