Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Trouble opening Facebook app on iOS 10 — Gideros Forum

Trouble opening Facebook app on iOS 10

NatWobbleNatWobble Member
edited November 2016 in Bugs and issues
Hi guys,

I'm having trouble launching the Facebook app with Application:openUrl. I'm not sure if it is Gideros or some new Xcode configuration I don't know about. The Facebook plugin is working fine. We just can't launch a link to our Facebook home page in the FB app. Everything is ok on the lua side. It works on Android but not on iOS 10. As far as I can tell, the configuration is the same as in our last app 3 months ago.

I get: 2016-11-30 17:02:20.885753 GiderosiOSPlayer[2211:1090822] -canOpenURL: failed for URL: "fb://profile/123873191121321" - error: "This app is not allowed to query for scheme fb"

I have already added the following to the plist, which should whitelist the fb app:
<key>LSApplicationQueriesSchemes</key>
   <array>
      <string>fb</string>
    </array>
The allows arbitrary loads entry is still "YES".

This site says that the openURL method (Objective-C) has been deprecated by Apple in iOS 10. Could that be the issue?

Any ideas would be greatly appreciated, thanks.

Comments

  • Sorry to bump.

    Just wondering if anyone has compiled with the latest (2016/10) version of Gideros with Xcode 8 for ios 10 and has any links working to any external apps such as FB?

    This isn't a Facebook plugin issue. I'm just trying to open our Wobble Monkey Facebook page in the Facebook app, from a link within our game. Everything worked fine with 2010.8.2 and I have configured the P list in the same way as before with fb in the white list.

    As in the link above the old openURL method has been deprecated in iOS 10. I'm not sure whether it should still be backwards compatible or whether this is the issue.

    Thanks
  • hgy29hgy29 Maintainer
    edited December 2016 Accepted Answer
    Just had a try on my iPhone 6 (iOS 10.1.1) with that code:
    application:openUrl("fb://profile/123873191121321")
    And it works fine: I get the prompt asking me if my gideros player should be granted access to facebook app, I click 'Yes' and facebook opens on 'Wobble Monkey' FB page.

    Could it be that your app is denied access to FB (someone said 'No' to the prompt) ?

    EDIT: I misread your post: your issue was about 'canOpenUrl' which has gone asynchronous, meaning that gideros api will need to change. Can you check if openUrl() works anyway (without checking for canOpenUrl beforehand) ?
  • Thanks @hgy29

    Yes, I've checked openUrl() works fine with no issues on my iPad Air 2 and iPhone 5.

    Sorry, I thought it was an issue opening the URL and not just canOpenUrl (which openUrl depended on in our app). But yes, it appears canOpenUrl() has broken on iOS 10 because it was working fine before.

    It will be OK to remove canOpenUrl in our app. Without it, if I uninstall the FB app and click on the FB page button in our app nothing happens, which is OK - no freezing or crashing.

    I can't remember why we used canOpenUrl, it might have been an issue in Android - we'll check again. We might only need canOpenUrl on Android.

Sign In or Register to comment.