11

When running expo ios, the default connection type is LAN. Via app.json, metro.config.js, or .env, how does one configure type tunnel to be the default?

lovelikelando
  • 7,593
  • 6
  • 32
  • 50

3 Answers3

20

It's been a while since you asked this question so I assume you have already figure out the answer. You need to change the "start" script in package.json to "expo start --tunnel".

  "scripts": {
    "start": "expo start --tunnel",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
porkupan
  • 301
  • 2
  • 5
4

I was having the same issue and i tried to change my scripts to:

{
   "scripts": {
    "start": "expo start --tunnel",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  }
}

But I didn't work. I then run directly the command:

expo start --tunnel

Then everything worked fine.

crispengari
  • 7,901
  • 7
  • 45
  • 53
1

Btw, on July 25th, the Expo team announced "Sunsetting the Web UI for Expo CLI".

So, only the commands typed in the terminal stand:

"start": "expo start --tunnel",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"

or writing them in the package.jason --> scripts, as @porkupan suggested.