Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions lib/services/ios-project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
}

private async addStaticLibrary(staticLibPath: string, projectData: IProjectData): Promise<void> {
await this.validateStaticLibrary(staticLibPath);
// Copy files to lib folder.
const libraryName = path.basename(staticLibPath, ".a");
const headersSubpath = path.join(path.dirname(staticLibPath), "include", libraryName);
Expand Down Expand Up @@ -1031,21 +1030,6 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f
}
}

private async validateStaticLibrary(libraryPath: string): Promise<void> {
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);
Expand Down