Skip to main content

Use IP geolocation

TestingBot's GeoIP feature allows you to test your app from various parts of the world, by using IP addresses in over 20 different countries.
When you enable GeoIP, traffic originating from the iOS device which is running your XCUITest will come from an IP address in the country you specified.

GeoIP example

To get started with location testing, pass --geo-country-code to the CLI, or the geoLocation option to the REST API, when starting a XCUITest.
Please see the example below where we specify that the app should connect through Germany.

testingbot xcuitest app.ipa app-test.zip \
  --device "iPhone.*" \
  --real-device \
  --geo-country-code "DE"

The DE abbreviation is the ISO code of Germany. You can find other GeoIP country codes to use.

curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/xcuitest/:id/run" \
-d '{ "options": { "geoLocation": "DE" }, "capabilities":[{"deviceName":"iPhone.*", "platformName":"iOS", "realDevice": true}]}' \
-H "Content-Type: application/json"

The DE abbreviation is the ISO code of Germany. You can find other GeoIP country codes to use.

Was this page helpful?
Last updated