Problem with fingerid touch input (iOS 17.4/SDL 2.30.9)

I’ve been trying to develop an iOS port of the game “Cataclysm: Dark Days Ahead”, written in SDL. The game launches, but there’s a problem: Touch doesn’t work. I logged the variables, and got these:

...
14:10:28.268 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3344: Fingermotion triggered.
14:10:28.269 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3345: ev.tfinger.fingerId: 5522868720
14:10:28.285 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3344: Fingermotion triggered.
14:10:28.286 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3345: ev.tfinger.fingerId: 5522868720
14:10:28.302 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3344: Fingermotion triggered.
14:10:28.303 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3345: ev.tfinger.fingerId: 5522868720
14:10:28.319 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3344: Fingermotion triggered.
14:10:28.320 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3345: ev.tfinger.fingerId: 5522868720
14:10:28.335 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3344: Fingermotion triggered.
14:10:28.335 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3345: ev.tfinger.fingerId: 5522868720
14:10:28.338 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3414: Fingerup triggered.
14:10:28.339 INFO SDL : /Users/runner/work/Cataclysm-Compiler/Cataclysm-Compiler/src/sdltiles.cpp:3415: ev.tfinger.fingerId: 5522868720
...

This is supposed to be 0 or 1 or 2, not like these (they are also randomized every time I launch). What can I do to solve this? For reference, I debugged via this method.

the documentation does not match your expectations

I don’t have iOS nor experience with touch

It’s SDL3, SDL2 uses Sint64, and my goal here is to get a more coherent fingerid, instead of being randomized at launch

I don’t see where in the documentation it says the finger ID is supposed to be 0, 1, or 2.

SDL_TouchFingerEvent
SDL_Finger

No mention of finger ID being any specific value. These are probably unique IDs for every touch event, in which case it would be up to the application to remember which order they were touched in.