iOS Question [B4X] B4XPages - B4i - OpenURL

luke2012

Well-Known Member
Licensed User
Longtime User
Hi everyone, I'm testing the iPhone app versione (of a B4XPages app) that I developed and I have a button that opens the link (like this: https://wa.me/c/12345678) to the whatsapp catalog that works within Android versione of the app (real device with w.a. installed).

B4X:
        If Main.App.CanOpenURL (WA_CAT_URI) Then
            Main.App.OpenURL(WA_CAT_URI)    'WA_CAT_URI is "https://wa.me/c/12345678"
        Else
            toast.Show("Per favore, installa whatsapp.")
End If

If I test the app on Android (real smartphone with whatsapp installed) the catalog opens without problems but if I test the app on the iPhone emulator, Safari opens me with the (correct) message that says: "Look at the catalog of 12345678 on WhatsApp "and immediately afterwards, instead of opening the catalog, a message from Safari appears saying:" Safari cannot open the page because the address is not valid ".

What can it depend on? Maybe because the whatsapp app is not installed on the iPhone emulator?

On the same page, under the "Open" button (the one in the WhatsApp catalog) I read: "Don't have WhatsApp yet?" and then I see the "Download" link. If I touch the "Download" link I get the exact same error that is: "Safari cannot open the page because the address is not valid".

Thanks in advance for your suggestions :)
Luca.

Simulator Screen Shot - iPhone 13 - 2022-02-03 at 08.16.37.png
Simulator Screen Shot - iPhone 13 - 2022-02-03 at 08.35.22.png
 

Attachments

  • Simulator Screen Shot - iPhone 13 - 2022-02-03 at 08.35.22.png
    Simulator Screen Shot - iPhone 13 - 2022-02-03 at 08.35.22.png
    402.5 KB · Views: 122
Top