# Str::encode problem on iOS

**URL:** <https://forum.getkirby.com/t/str-encode-problem-on-ios/11158>\
**Category:** Questions\
**Tags:** v2\
**Created:** [September 4, 2018, 2:14pm UTC](https://forum.getkirby.com/t/str-encode-problem-on-ios/11158 "2018-09-04T14:14:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [September 4, 2018, 2:14pm UTC](https://forum.getkirby.com/t/str-encode-problem-on-ios/11158/1 "2018-09-04T14:14:45Z")

</div>

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)…

```auto
<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.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 4, 2018, 3:14pm UTC](https://forum.getkirby.com/t/str-encode-problem-on-ios/11158/2 "2018-09-04T15:14:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [September 4, 2018, 3:16pm UTC](https://forum.getkirby.com/t/str-encode-problem-on-ios/11158/3 "2018-09-04T15:16:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 4, 2018, 3:23pm UTC](https://forum.getkirby.com/t/str-encode-problem-on-ios/11158/4 "2018-09-04T15:23:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [September 4, 2018, 3:25pm UTC](https://forum.getkirby.com/t/str-encode-problem-on-ios/11158/5 "2018-09-04T15:25:56Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 4, 2018, 3:30pm UTC](https://forum.getkirby.com/t/str-encode-problem-on-ios/11158/6 "2018-09-04T15:30:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:26pm UTC](https://forum.getkirby.com/t/str-encode-problem-on-ios/11158/7 "2025-02-06T17:26:18Z")

</div>

Archived on February 6, 2025, 5:26pm UTC


