Str::encode problem on iOS

Ive used the code below to obfusificate email addresses, which works fine on a computer. However I have just tested the link on the iOS Simulator that comes with Xcode and it says it cant open the link. Wondering if this is something to do with the simulator and it will work on a real iOS device (i dont have any to test with)…

<a href="mailto:<?= str::encode($site->socialemailaddress()) ?>">

… anyone else experienced this? Safari on the simulator pops up a message to say it cant follow it because the address is invalid.

I does work on a real device (at least on my 6 Plus)

Hmm interesting. Thanks for checking. as long as it works in reality I guess.

Probably happens because there is no email client on. those simulators.

Ahh well yes thats a good point. You would think that Apple would give a better error message other than the link is invalid. It IS valid, its just the software to deal with it is missing… :sigh:

Yeah, I agree, that error message is not very helpful.

But this has nothing to do with the encoding at. all, a standard email link throws the same error.