Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove EXCLUDED_ARCHS workaround in xcode 13+ #5705

Merged
merged 2 commits into from
Nov 29, 2022
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
12 changes: 10 additions & 2 deletions lib/services/cocoapods-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
ISpawnResult,
} from "../common/declarations";
import { injector } from "../common/yok";
import { XcodeSelectService } from "../common/services/xcode-select-service";

export class CocoaPodsService implements ICocoaPodsService {
private static PODFILE_POST_INSTALL_SECTION_NAME = "post_install";
Expand All @@ -32,7 +33,8 @@ export class CocoaPodsService implements ICocoaPodsService {
private $errors: IErrors,
private $logger: ILogger,
private $config: IConfiguration,
private $xcconfigService: IXcconfigService
private $xcconfigService: IXcconfigService,
private $xcodeSelectService: XcodeSelectService
) {
this.getCocoaPodsFromPodfile = _.memoize(
this._getCocoaPodsFromPodfile,
Expand Down Expand Up @@ -164,6 +166,13 @@ ${versionResolutionHint}`);
projectData: IProjectData,
platformData: IPlatformData
): Promise<void> {
const xcodeVersionData = await this.$xcodeSelectService.getXcodeVersion();

// only apply EXCLUDED_ARCHS workaround on XCode 12
if (+xcodeVersionData.major !== 12) {
return;
}

const { projectRoot } = platformData;
const exclusionsPodfile = path.join(projectRoot, "Podfile-exclusions");

Expand All @@ -179,7 +188,6 @@ post_install do |installer|
end`.trim();
this.$fs.writeFile(exclusionsPodfile, exclusions);
}

await this.applyPodfileToProject(
"NativeScript-CLI-Architecture-Exclusions",
exclusionsPodfile,
Expand Down