Problem opening links on ios from Flxbutton

51 views
Skip to first unread message

Tembac

unread,
Sep 1, 2014, 9:06:01 PM9/1/14
to haxef...@googlegroups.com
I made a post on Openfl forums without success:

http://www.openfl.org/forums/#!/programming:open-a-link-on-ios-is-not-w

But now, after reading the problem of bumblefish with the links on crome I'm thinking that maybe the problem is in HaxeFlixel. 

Do opening links on ios with HaxeFlixel buttons work for you?

Jonathan Hirz

unread,
Sep 1, 2014, 10:25:22 PM9/1/14
to haxef...@googlegroups.com
Links work fine in my ios app, but I use FlxG.openURL() to load them

Tembac

unread,
Sep 2, 2014, 4:14:16 AM9/2/14
to haxef...@googlegroups.com
Still not working. 

Can you test my demo? Maybe there is something wrong with my ipad or simulator?

Jonathan Hirz

unread,
Sep 2, 2014, 12:41:31 PM9/2/14
to haxef...@googlegroups.com
I have also used twixel (https://github.com/prestia/twixel) for tweet sheets in my ios games. Maybe that would work better for you.

You github code still has Lib.getURL() which I'm not familiar with. Did you try FlxG.openURL()?

Gama11

unread,
Sep 2, 2014, 12:55:02 PM9/2/14
to haxef...@googlegroups.com
FlxG.openURL() uses Lib.getURL().

Tembac

unread,
Sep 2, 2014, 3:46:02 PM9/2/14
to haxef...@googlegroups.com
Yes, I tried. 

FlxG.openURL() seems to be using the same code internally as gamma said.

Thanks for twixel. I will research that but I need to be able to open links for more things that twitter.

Maybe my problem is something on the app configuration? Did you had the chance to test my code on your devices?

Tembac

unread,
Sep 17, 2014, 9:48:40 PM9/17/14
to haxef...@googlegroups.com
Finally after so much headaches and research I found the problem and it was silly. 

I had spaces on the links and it worked on windows and android but not on ios and mac. I had to add the %20 to the links instead of spaces to fix it :P

One of those silly bugs that are hard to know when you don't know but silly after you fix it.

Gama11

unread,
Sep 18, 2014, 4:26:12 AM9/18/14
to haxef...@googlegroups.com
Hm.. might be worth opening an issue on the OpenFL repo about that? The URLRequest class could probably solve this by doing string.replace(" ", "%20"); or something like that and save people some headache.
Reply all
Reply to author
Forward
0 new messages