The customized GPX file for Xcode 16 cannot be selected.

I am using the latest version of Xcode 16, and I have created a GPX file in my project. However, I am unable to see or select the file to simulate the GPS location. I have attempted to uninstall and reinstall Xcode completely, but the issue persists. Has anyone encountered a similar problem? How can I resolve this? Thank you.

Same error in version 16.1 beta 2, here you cannot select the gpx file because it is grayed out

I am having the same issue. Didn't have any issues with adding a GPX file until I updated Xcode. I hope someone has a fix for this.

I have the same issue. Testing with 3, 4 gpx files in Xcode 15, all ok. Now they are not even visible in predefined location Xcode window.

Having the same issue. In the meantime, I am using a small Bash script that takes a GPX file as an argument and sends the locations within that file once a second to the simulator. Here it is in case anyone needs it:

`#!/bin/bash

# Function to send the coordinates to the Xcode simulator
send_coordinate_to_simulator() {
    latitude=$1
    longitude=$2
    echo "Sending coordinate: Latitude = $latitude, Longitude = $longitude"
    xcrun simctl location booted set "$latitude","$longitude"
}

# Function to extract coordinates from the GPX file and send them to the simulator
simulate_gpx_coordinates() {
    gpx_file=$1

    # Use grep and awk to extract latitude and longitude from the GPX file
    # Assuming the <wpt> elements in GPX look like: <wpt lat="***" lon="yyy">
    while true; do
        grep "<wpt" "$gpx_file" | while read -r line ; do
            latitude=$(echo "$line" | awk -F'"' '{print $2}')
            longitude=$(echo "$line" | awk -F'"' '{print $4}')
            
            # Send the coordinates to the simulator
            send_coordinate_to_simulator "$latitude" "$longitude"
            
            # Wait for 1 second before sending the next coordinate
            sleep 1
        done

        # When the loop finishes, it will start again from the beginning
        echo "Restarting simulation from the first coordinate..."
    done
}

# Function to handle script termination on Ctrl+C (SIGINT)
handle_exit() {
    echo -e "\nStopping location simulation. Exiting..."
    exit 0
}

# Trap Ctrl+C (SIGINT) and call handle_exit
trap handle_exit SIGINT

# Check if a GPX file was provided as an argument
if [[ $# -eq 0 ]]; then
    echo "Usage: $0 <path_to_gpx_file>"
    exit 1
fi

gpx_file=$1

# Check if the GPX file exists
if [[ ! -f "$gpx_file" ]]; then
    echo "GPX file not found: $gpx_file"
    exit 1
fi

# Simulate the GPX coordinates in an infinite loop
simulate_gpx_coordinates "$gpx_file"`

Problem is not xCode, the problem is MacOS Sequoia!! It is fixed in Sequioa 15.1 Beta 6.

Just updated to released Sequioa 15.1 (24B83). Issue is still present in Xcode 16.1 (16B40).

Have the same issue for months, Apple please, fix it ASAP 😖

Have the same issue, Apple please fix ASAP.

I think, Sequoia doesn't recognize the GPX-Files. If you add this file into your project scheme manually, it works. Just put the file name into the file: <yourprojectname>.xcsheme:

<LocationScenarioReference identifier = "../../<yourprojectname>/<gpxfilename>.gpx" referenceType = "0"> </LocationScenarioReference> and it will work. The <gpxfilename>.gpx musst be in your Xcode project, of course. If you don't know at which place in the .xcsceme file it hast to be put, you can put in Xcode some standard location (for example Honolulu), exit Xcode and replace "Honolulu"- sequence with the sequence above in the .xcscheme file. Best DM

Thank you @drMacOS, this worked for me

The customized GPX file for Xcode 16 cannot be selected.
 
 
Q