system.openUrl() on iOS - Help

I am using the system.openUrl () on iOS and when step for iphone, nothing happens when you open click the button and open the url.

If I go to the android phone works 100%, but if iPhone does not (iOS version 9+)

You must add something in build.setting for iOS?

The code is:

system.openURL (“https: //www.youtube.com/c/mychannel …”)

and even

system.openURL (“https: //www.facebook…com/mypage …”)

The button code is 100%, I put some print and print it all.

Is the code copy/pasted from  your actual code or did you type the code into the forum post? 

Rob

Hello Rob;

The code is:

local function onBtnYoutubePBGPress()

        system.openURL( “https://www.youtube.com/c/pontobarraGAME” )

end

I just tested following code on iOS 6 and 9. Both work fine, both with youtube app installed and not. What does console says?

[lua]

require(“widget”).newButton(

{

    x = display.contentCenterX,

    y = display.contentCenterY,

    id = “button1”,

    label = “Go to URL”,

    shape = “roundedRect”,

    cornerRadius = 2,

    fillColor = { default={0.7,0.7,0.7,1}, over={1,0.1,0.7,0.4} },

    strokeColor = { default={0,1.1,0,1}, over={0.8,0.8,1,1} },

    onEvent =  function()

        system.openURL( “https://www.youtube.com/c/pontobarraGAME” )

    end

})

[/lua]

Its working 100%. Thanks!

Is the code copy/pasted from  your actual code or did you type the code into the forum post? 

Rob

Hello Rob;

The code is:

local function onBtnYoutubePBGPress()

        system.openURL( “https://www.youtube.com/c/pontobarraGAME” )

end

I just tested following code on iOS 6 and 9. Both work fine, both with youtube app installed and not. What does console says?

[lua]

require(“widget”).newButton(

{

    x = display.contentCenterX,

    y = display.contentCenterY,

    id = “button1”,

    label = “Go to URL”,

    shape = “roundedRect”,

    cornerRadius = 2,

    fillColor = { default={0.7,0.7,0.7,1}, over={1,0.1,0.7,0.4} },

    strokeColor = { default={0,1.1,0,1}, over={0.8,0.8,1,1} },

    onEvent =  function()

        system.openURL( “https://www.youtube.com/c/pontobarraGAME” )

    end

})

[/lua]

Its working 100%. Thanks!