Custom test schema location is not respected on CI run

Hi,
I have an issue with setting geo data for iOS simulator on CircleCI.

Environment:
XCode: 12.1.0 (specified in .yaml file)
Simulator: iPhone 11 Pro, OS 14.1

My task is to set different location for simulator before build starts and with e2e test check the respective location is set when user requests current location in app.
I achieved this by updating test schema with custom .gpx file with coordinates for the place I need.
(Allow Location Simulation is enabled and respective file is used, test suits are also configured to use this .gpx file)
Locally this works just fine, when I run the same test on CI another location which I suppose to be a default one for all schemas (namely some San Francisco address) is used. Seems that the custom location settings are not respected by CircleCI.
I tried to explicitly set test schema env. variable in .yaml file however the result is the same.
Does anyone know about the possible issue here?

I think the issue for this is that the sim isn’t set to use “custom location”. This is set in Features -> Location in the sim app, but I’m not how this can be set at the command line.

Hi All, having same issue with current location for simulator.

Here are the items I tried:

  1. enabled checkbox “Allow Location Simulation” in UITest scheme and provided .gpx file for default location
  2. in UI Test have code responsible to Allow Location Tracking
  3. in CircleCi config file added step before executing UI test to set current location (using brew package lyft/formulae/set-simulator-location)
  4. Executed tests using TestPlan, where also did configuration “Simulated Location” and provided .gpx file with location.

Items 1,2 and 4 works for me locally, but non of them worked in CircleC.
Could you please help me with issue?
Thanks!

Had to create an account just for this, are there still not any solutions? Setting a .gpx location in the scheme and testplans works when building/testing locally in xcode, but it seems the xcodebuild command itself ignores all attempts to set a location both locally and over CI.