Simulate GPS location for XCUI tests
Simulate GPS location of the device for your XCUI test executions on BrowserStack App Automate. Test your apps on a real device cloud.
GPS Geolocation testing enables you to simulate the location of the device to specific GPS coordinates to test location-based scenarios for your app.
To specify the GPS coordinates, pass the gpsLocation parameter in the REST API request to start XCUI test execution. You will be required to pass the latitude and longitude of the desired location.
REST API endpoint:
POST /app-automate/xcuitest/v2/build
| Parameter | Description | Value |
|---|---|---|
gpsLocation |
Simulate the location of the device to a specific GPS location. | Latitude followed by longitude Acceptable range for latitude is -90 to +90 and for longitude is -180 to +180. Example: 40.730610,-73.935242
|
Example cURL request:
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/build" \
-d '{"gpsLocation": "40.730610,-73.935242", "devices": ["iPhone 8 Plus-11.0"], "app": "bs://f5L3azt9pLzE995f49376eb1fa3c284dc321f8d", "testSuite": "bs://6eb1fa3c284ddbe9971b2d1aee0d52943b9c081"}' \
-H "Content-Type: application/json"
Related topics
-
Manage your uploaded app or test suite using our upload app REST API and upload test suite REST API.
-
Use the get app API endpoint and list test suites API endpoint to list your recently uploaded apps and test suites.
-
Delete your uploaded app or test suite using the delete app API endpoint and delete test suite API endpoint.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!