Flutter app keeps using old API endpoint instead of newer version

My flutter app had an endpoint that I no longer am using. I updated the API endpoint to the newer version and in my iOS published version of my app on TestFlight, it works great. However, when I'm doing testing on my iOS simulator it's still trying to send requests with the old endpoint that I deleted even though that endpoint URL doesn't exist anywhere in my code. I deleted my iOS emulator and added a new one and the same issue appears. This doesn't happen when I run it straight from XCode, only when I'm running it from Android Studio. Does anyone have any ideas as to why or how it is still using the old API endpoint when it doesn't exist in my code?

1 answer

  • answered 2019-10-08 21:11 Jet.Black.Pope

    I ended up using flutter clean, but for some reason, iOS breaks and can't find the app when you try running it again if you have already changed the display name of the app. Struggled for a while to figure this out, but by changing my apps display name to "Runner" while testing it, I was able to get it working after doing a "flutter clean", followed by "flutter build ios". Old cached code went away after this.