Add your own train data key
The app that you build shows no live train times until you give it a key. The times come from PRIM, the open data service of Île-de-France Mobilités, and PRIM gives a free key to anyone with an account. This page gets you a key, puts it where the app reads it, and shows live trains on your iPhone.
You need TROME on your iPhone, as Install TROME on your iPhone shows, and the iPhone with its cable.
Put the key in your app
Section titled “Put the key in your app”-
Create a free account on prim.iledefrance-mobilites.fr.
-
In your account on PRIM, create an API key for the API Prochains passages - requête unitaire, and copy it.
-
In Terminal, create the key file and open it in TextEdit:
Fenêtre de terminal cd ~/tromecp ios/Config/Secrets.example.xcconfig ios/Config/Secrets.xcconfigopen -e ios/Config/Secrets.xcconfigTextEdit shows a file with two comments and one line to fill in,
PRIM_API_KEY =. -
Paste your key after
PRIM_API_KEY =, with no quotes, then save (Cmd + S) and close the file.PRIM_API_KEY = 0123abcd -
Connect the iPhone and unlock it. Quit Xcode if it is open, then open the project again, so that Xcode reads the file:
Fenêtre de terminal open ios/TROME.xcodeproj -
In Xcode, check the scheme TROME and your iPhone, then click Run. Xcode builds the app again, with your key inside, and the app opens on the iPhone.
-
In the app, tap Testing tools at the top right, then Next trains of a station. At the bottom, the screen says Train data key: set.
With the key, the Live Activity of a station shows live trains: near the station, or with the fake position below. PRIM limits the calls for each key and each day, and the app asks for new times every 30 seconds while it shows them: close the app and stop the Live Activity when you do not use them. The train guide counts the calls of each screen.
To use the key in the Simulator of your Mac instead, follow The train data key in the developer guide.
Try live trains at any station, without going there
Section titled “Try live trains at any station, without going there”The app that Xcode puts on your iPhone has a Testing tools screen, and the app of the App Store does not. It moves your position to any station, so that you can see the Live Activity of that station, with live trains, without being there.

-
In the app, tap Testing tools at the top right. Under Fake position, tap Pick a station and choose one. The section Position used by the app shows the station, and the main screen says Fake position in orange.
-
Tap Show the Live Activity now, then lock the iPhone. The lock screen shows the Live Activity of the station, with live trains.
-
When you are done, open Testing tools and tap Use the real GPS. The orange Fake position goes away.
Try the app at any station, without going there in the developer guide shows the other tools: coordinates, an address, and the next trains of any station.