Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 8 additions & 3 deletions packages/apple-targets/src/with-bacons-xcode.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { XcodeProject } from "@bacons/xcode";
import * as xcodeParse from "@bacons/xcode/json";
import {
BaseMods,
ConfigPlugin,
createRunOncePlugin,
IOSConfig,
Mod,
withMod,
} from "expo/config-plugins";
// BaseMods.withGeneratedBaseMods and BaseMods.provider were moved to standalone
// exports in @expo/config-plugins SDK 54
import {
provider,
withGeneratedBaseMods,
} from "@expo/config-plugins/build/plugins/createBaseMod";
import fs from "fs";

const customModName = "xcodeProjectBeta2";
Expand All @@ -24,13 +29,13 @@ export const withXcodeProjectBeta: ConfigPlugin<Mod<XcodeProject>> = (
};

const withXcodeProjectBetaBaseModInternal: ConfigPlugin = (config) => {
return BaseMods.withGeneratedBaseMods(config, {
return withGeneratedBaseMods(config, {
platform: "ios",
saveToInternal: true,
skipEmptyMod: false,
providers: {
// Append a custom rule to supply AppDelegate header data to mods on `mods.ios.AppClipInfoPlist`
[customModName]: BaseMods.provider<XcodeProject>({
[customModName]: provider<XcodeProject>({
isIntrospective: false,
// isIntrospective: true,
async getFilePath({ modRequest, _internal }) {
Expand Down
3 changes: 1 addition & 2 deletions packages/apple-targets/src/with-xcode-changes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ async function applyXcodeChanges(
const productName = props.productName;

let targetToUpdate: PBXNativeTarget | undefined =
targets.find((target) => target.props.productName === productName) ??
targets[0];
targets.find((target) => target.props.productName === productName);

if (targetToUpdate) {
warnOnce(
Expand Down