iOS 9 “fbauth2” missing from Info.plist

后端 未结 9 1562
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 06:23
FBSDKLog: fbauth2 is missing from your Info.plist under LSApplicationQueriesSchemes and is required for iOS 9.0

Any idea what this is? I have added

相关标签:
9条回答
  • 2020-12-02 06:43

    Please just do not add this to your CFBundleURLSchemes... that will actually HIJACK any app's attempt at Facebook auth, causing a popup to show "X app wants to open " dialog...

    You DO NOT want to be doing that.

    cf:

    https://developers.facebook.com/docs/applinks/ios
    https://www.fireeye.com/blog/threat-research/2015/04/url_masques_on_apps.html
    https://www.reddit.com/r/workflow/comments/2tlx29/get_url_scheme_of_any_app
    
    0 讨论(0)
  • 2020-12-02 06:43

    You can try with below code in swift 5.0

    extension Bundle {
       static let externalURLSchemes: [String] = {
          guard let urlTypes = main.infoDictionary?["LSApplicationQueriesSchemes"] 
           as? [String] else {
            return []
          }
          return urlTypes
       }()
    }
    

    You can call using Bundle

    guard Bundle.externalURLSchemes.contains(URLScheme) else {
        return
    }
    
    0 讨论(0)
  • 2020-12-02 06:48
    Write the below code in your info.plist under the **LSApplicationQueriesScheme**
    
    <string>fbapi</string>
            <string>fbapi20130214</string>
            <string>fbapi20130410</string>
            <string>fbapi20130702</string>
            <string>fbapi20131010</string>
            <string>fbapi20131219</string>
            <string>fbapi20140410</string>
            <string>fbapi20140116</string>
            <string>fbapi20150313</string>
            <string>fbapi20150629</string>
            <string>fbauth</string>
            <string>fbauth2</string>
            <string>fb-messenger-api20140430</string>
            <string>fb-messenger-platform-20150128</string>
            <string>fb-messenger-platform-20150218</string>
            <string>fb-messenger-platform-20150305</string>
    
    0 讨论(0)
  • 2020-12-02 06:57

    You can continue to use URL schemes when you build your app for iOS 9 and you want to call URL schemes, you will now need to declare them in your apps Info.plist. There is a new key, LSApplicationQueriesSchemes, and here you will need to add the list of schemes you want to are canOpenURL on.

    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>fbauth2</string>
    </array>
    
    0 讨论(0)
  • 2020-12-02 06:57

    Just follow the Facebook explanation: Preparing Your Apps for iOS9
    Apple mention it in their:Privacy and Your App Keynote 2015

    0 讨论(0)
  • 2020-12-02 07:01

    As to v4.6.0 of the FaceBook SDK, add the following key into your plist file:

    <key>LSApplicationQueriesSchemes</key>
    <array>
            <string>fbapi</string>
            <string>fb-messenger-api</string>
            <string>fbauth2</string>
            <string>fbshareextension</string>
    </array>
    

    Link: https://developers.facebook.com/docs/ios/ios9

    0 讨论(0)
提交回复
热议问题