iOS local always points to 10.0.2.2 after exp build:android


#1

Hello,

I have an expo app (sdk 27) that uses a third party for login. I have mocked out the third party login to run on a different port for local testing. (i.e. the app runs on port 8080 and uses 8081 for login)

Once I ran the command ‘exp build:android’, the local iOS always tries to hit ‘10.0.2.2’ rather than localhost. All of the links point to ‘localhost’ not ‘10.0.2.2’ in my local application.

If I run my local app on the android emulator, it tries to hit ‘localhost’ as it should. (I know that android needs to hit 10.0.2.2, it works appropriately when I update the links to point to that. However, if I leave the links at ‘localhost’ - how they are for iOS - it DOES try to hit localhost).

The published versions of the app still work fine but I am unable to test local work on the iOS simulator due to this.

Any guidance on where to look to solve this problem is greatly appreciated! This was not a problem prior to running the command ‘exp build:android’.


closed #2

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