0

When you want to test your iOS app and point it to a test server, what's the best practice approach for this?

Can you have the app check if it's running on Test Flight, and if so, use the test server? Or is there some better way to do this?

EDIT: I want other testers to be able to test the app as well. So, I need some way to share this test release. If create a DEBUG or TEST build, wouldn't that prevent publishing the app?

Dan
  • 487
  • 5
  • 19
  • I want other testers to be able to test the app as well. So, I need some way to share this test release. If create a DEBUG or TEST build, wouldn't that prevent publishing the app? – Dan May 03 '21 at 14:45
  • Sorry wrong link, please see here: https://stackoverflow.com/questions/26081543/how-to-tell-at-runtime-whether-an-ios-app-is-running-through-a-testflight-beta-i – esqew May 03 '21 at 14:50

1 Answers1

1

When you want to test your iOS app and point it to a test server, what's the best practice approach for this?

I'm not sure that there's a single best practice. If you're using a development or beta version of your app, you can conditionally compile in a different URL using #ifdef, etc. If you want to choose the server depending on where the app was installed from, you can check for installation from TestFlight. Or you can have the app download configuration information at launch so that it knows which server(s) to talk to, how much debug/logging/analytics information to send back, etc.

There's no wrong way to go. Pick an approach to use now, and don't be afraid to change it when it no longer meets your needs.

Caleb
  • 124,013
  • 19
  • 183
  • 272