Skip to content

Commit b5b0744

Browse files
committed
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
1 parent 25ffa29 commit b5b0744

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

lib/services/ios-project-service.ts

-16
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
582582
}
583583

584584
private async addStaticLibrary(staticLibPath: string, projectData: IProjectData): Promise<void> {
585-
await this.validateStaticLibrary(staticLibPath);
586585
// Copy files to lib folder.
587586
const libraryName = path.basename(staticLibPath, ".a");
588587
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
10311030
}
10321031
}
10331032

1034-
private async validateStaticLibrary(libraryPath: string): Promise<void> {
1035-
if (path.extname(libraryPath) !== ".a") {
1036-
this.$errors.failWithoutHelp(`The bundle at ${libraryPath} does not contain a valid static library in the '.a' file format.`);
1037-
}
1038-
1039-
const expectedArchs = ["armv7", "arm64", "i386"];
1040-
const archsInTheFatFile = await this.$childProcess.exec("lipo -i " + libraryPath);
1041-
1042-
expectedArchs.forEach(expectedArch => {
1043-
if (archsInTheFatFile.indexOf(expectedArch) < 0) {
1044-
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.`);
1045-
}
1046-
});
1047-
}
1048-
10491033
private replaceFileContent(file: string, projectData: IProjectData): void {
10501034
const fileContent = this.$fs.readText(file);
10511035
const replacedContent = helpers.stringReplaceAll(fileContent, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER, projectData.projectName);

0 commit comments

Comments
 (0)