In general the currentdevicetype should work, might be an old bug, which you could check for in the release notes of your mendix version.
I have used the function extensively and have not run into the issue, but I need to say that i was using 9.11.1
So recommendation 1 might be: update to Mx 9
Safari can mask itself on iPadOS so it requests the desktop version of a site.
To change this, on Safari click on the aA icon in the address bar, go to the Request Desktop Site option and toggle it off.
Hope this helps.