How to tell what is causing the run:ios command to generate native project

Hi there,
I used the prebuild command to debug some stuff and then deleted the native folder (ios and android) as per Debugging - Expo Documentation
But now I can’t seem to use the expo-go app to develop. Whenever i call expo run:ios it regenerates the native projects.

I think it’s either my deps:

{
  "dependencies": {
    "expo": "~46.0.9",
    "expo-dev-client": "~1.2.1",
    "expo-random": "~12.3.0",
    "expo-splash-screen": "~0.16.2",
    "expo-standard-web-crypto": "^1.4.0",
    "expo-status-bar": "~1.4.0",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.5",
    "react-native-safe-area-context": "4.3.1",
    "react-native-web": "~0.18.7",
    "react-native-webview": "11.23.0",
    "uuid": "3.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/react-native": "~0.69.1",
    "@types/uuid": "3.4.0",
    "expo-cli": "^6.0.5",
    "ts-node": "^10.9.1"
  },
}

or my config:

{
  "expo": {
    "name": "Dogg Dev",
    "slug": "walker-companion-app",
    "description": "Dogg app made with expo",
    "owner": "dogg",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "***"
    },
    "build": {
      "preview": {
        "distribution": "internal",
        "ios": {
          "enterpriseProvisioning": "adhoc"
        },
        "android": {
          "buildType": "apk"
        }
      }
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "config": {
        "googleMaps": {
          "apiKey": "***"
        }
      },
      "package": "***"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "extra": {
      "eas": {
        "projectId": "***"
      }
    }
  }
}

Any ideas?

Cheers

Hi @riordan-dogg

No, npx expo run:ios actually runs npx expo prebuild behind the scenes and then builds the native project with Xcode, so you’ll have to remove the native project again.

Although that by itself should not prevent you from using Expo Go.

1 Like

Ah thanks :slight_smile:
Where I went wrong is that in a fresh expo app the “ios” script in package.json calls “expo start --ios” - whereas in my app at some point the script became “expo run:ios”

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.