diff --git a/plugin/src/withPodfile.ts b/plugin/src/withPodfile.ts index a870946..db38328 100644 --- a/plugin/src/withPodfile.ts +++ b/plugin/src/withPodfile.ts @@ -31,10 +31,8 @@ export const withPodfile: ConfigPlugin<{ config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"]; else config_command = [ - 'node', - '--no-warnings', - '--eval', - 'require(require.resolve(\\'expo-modules-autolinking\\', { paths: [require.resolve(\\'expo/package.json\\')] }))(process.argv.slice(1))', + 'npx', + 'expo-modules-autolinking', 'react-native-config', '--json', '--platform', diff --git a/plugin/src/xcode/addBuildPhases.ts b/plugin/src/xcode/addBuildPhases.ts index 0327745..5a80eb2 100644 --- a/plugin/src/xcode/addBuildPhases.ts +++ b/plugin/src/xcode/addBuildPhases.ts @@ -21,7 +21,7 @@ export function addBuildPhases( const buildPath = `"$(CONTENTS_FOLDER_PATH)/AppClips"`; const folderType = "watch2_app"; // "watch2_app" uses the same subfolder spec (16), app_clip does not exist in cordova-node-xcode yet - const buildPhaseFiles = ["AppDelegate.mm", "main.m"]; + const buildPhaseFiles = ["AppDelegate.swift"]; // Add shell script build phase "Start Packager" xcodeProject.addBuildPhase( diff --git a/plugin/src/xcode/addPbxGroup.ts b/plugin/src/xcode/addPbxGroup.ts index 781d67f..33d7644 100644 --- a/plugin/src/xcode/addPbxGroup.ts +++ b/plugin/src/xcode/addPbxGroup.ts @@ -18,9 +18,7 @@ export function addPbxGroup( const filesToCopy = [ "SplashScreen.storyboard", - "AppDelegate.h", - "AppDelegate.mm", - "main.m", + "AppDelegate.swift", ]; for (const file of filesToCopy) { @@ -39,9 +37,7 @@ export function addPbxGroup( // Add PBX group const { uuid: pbxGroupUuid } = xcodeProject.addPbxGroup( [ - "AppDelegate.h", - "AppDelegate.mm", - "main.m", + "AppDelegate.swift", "Info.plist", "Images.xcassets", "SplashScreen.storyboard",