Framework7.device.os / app.device.os showing android instead of iOS (iPhone only)

Hello there,

NOTE: I am reposting as the previous thread was not assigned to any topic (in this case “Questions”), please delete the old one, reported already to mods.

I am experiencing this issue, that also has other consequences all over F7, theming in particular.

If I run my app on Android, everything works ok.
If I run my app on iPad Pro everything works ok.
If I run my app on iPhone, Framework7.device.os / app.device.os will show ‘android’, and all the theming will have the ‘md’ look (I set ‘theme’ to ‘auto’).

I am running [email protected], [email protected], [email protected]

One more thing: I am quite sure it is a F7 issue because calling device.platform returns ‘iOS’ correctly also on iPhones. iPhones were testes both in simulators and on physical devices, iOS version 13.7.

Let me know if you can reproduce this with my scenario (I basically have everything @latest version).

Quick update:

looking into the code, it looks like the os platform is taken from the UserAgent string. I checked navigator.userAgent and for some reason this is my output:

It is basically the UA string format for Android (with no versions replaced instead of the placeholders):

There is “Android”, but no references to the words that F7 is looking for (iPhone OS, iOS). But this is happening both on iPhone and on iPad, exactly the same string.
On iPhone the result is “android”, on iPad the result is “ios”.

Something is wrong, here is my iPhone’s navigator.userAgent there is no Android there and shouldn’t. Question is why do you have different/wrong UA string

Thanks for making a test!

Can you share which cordova, cordova-ios, F7 versions you are running on that project?

FYI: I already tried to remove ios platform and add it back from scratch, no luck.

Just tested: also the Android build returns the same generic User Agent string. So it is not a cordova-ios issue.