title: Swift development: How can I check if my local development api server is running?
body: <p>Developing an iOS application that connects to an api server, I'd like the app to connect to the local development api server at <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a> if the local server is running. Otherwise, the app should connect to the production server, for example at <a href="https://example.com" rel="nofollow">https://example.com</a>.</p>
  
  <p>How can I check if the local api server is running?</p>
  
  <p>This is only necessary in the iOS simulator, not in the real app.</p>