2016-09-28 14 views
9

के साथ फेसबुक लॉगिन समस्या मैं अपने आवेदन में लॉगिन करने के लिए फेसबुक का उपयोग करता हूं। iOS 10 पर फेसबुक का उपयोग करके लॉगिन करने का प्रयास कर रहा है, आईफोन सिम्युलेटर 6 एस।आईओएस 10

-canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" 

10814 : kLSApplicationNotFoundErr 
-10814 No application in the Launch Services database matches the input criteria. 

मैं फेसबुक SDK संस्करण 4.13.1 उपयोग कर रहा हूँ। एक्सकोड 8 से पहले, एक ही कोड पूरी तरह से काम कर रहा था।

कोई मदद? अग्रिम धन्यवाद।

उत्तर

-1

कृपया सुनिश्चित करें कि आपकी Info.plist2. श्वेतसूची फेसबुक ऐप्सhttps://developers.facebook.com/docs/ios/ios9

आईओएस फेसबुक एसडीके v.4.13 के लिए की धारा से मेल खाती है यह शामिल करना चाहिए

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

ये आवश्यकताएं थे आईओएस 9.x के लिए पेश किया गया।

+0

मैंने पहले से ही यह किया है, लेकिन हल नहीं किया गया है। –

+0

आपके सिम्युलेटर पर आपके पास कोई फेसबुक ऐप इंस्टॉल नहीं है, इसलिए यह त्रुटि आपको सूचित करती है कि आईओएस इसे नहीं ढूंढ सकता है। इस मामले में आपको एक वेब-आधारित लॉगिन विंडो देखना चाहिए। –

+2

क्या आप वेब आधारित लॉगिन दृश्य चलाने के लिए उसमें सहायता कर सकते हैं। क्या होता है: मैं ऐप चलाता हूं, फेसबुक बटन दबाता हूं। एक वेब आधारित दृश्य खुलता है और बताता है कि आप इस ऐप के लिए पहले से ही फेसबुक में लॉग इन हैं। फिर मैं ठीक क्लिक करता हूं, बंद करता हूं और फेसबुक प्रतिक्रिया त्रुटि 308 आता है। कोई मदद? –

11

त्रुटि स्थिति 10,814 मूल रूप से तब होता है जब cantOpenUrl, जो facebook द्वारा किया जाता है तर्कों का उपयोग url कॉल करने के लिए fbauth2:/ जैसा कि इस thread bt का सुझाव दिया, मुद्रण इस समारोह के अंदर होता है तो आप कुछ भी नहीं कर सकते कि

एप्पल के साथ ज्यादा आईओएस 10.To के साथ काम कर इस समस्या को हल का तरीका ही बदल आप

लक्ष्य> क्षमताओं पर जा सकते हैं > सक्षम Keychain, साझा करना

यहाँ एक ही धागा ऊपर enter image description here

जुड़ा हुआ से एक स्क्रीनशॉट इस पोस्ट में तैनात रूप में मंचों की developor मुद्दों

समस्या FBSDLoginManager साथ है समापन हैंडलर को कभी भी

so in debuging, the author put the breakpoint in "FBSDKLoginManager.m" at "logInWithBehavior: (FBSDKLoginBehavior)loginBehavior" and findout that weakSelf getting nil and not be able to call "logInWithBehavior: serverConfiguration: serverConfigurationLoadError:"

नहीं कहा जाता है
- (void)logInWithBehavior:(FBSDKLoginBehavior)loginBehavior 
    { 
     __weak __typeof__(self) weakSelf = self; 
     [FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:^(FBSDKServerConfiguration *serverConfiguration, NSError *loadError) { 
     [weakSelf logInWithBehavior:loginBehavior serverConfiguration:serverConfiguration serverConfigurationLoadError:loadError]; 
     }]; 
    } 

समाधान 1:

Change FBSDKLoginManager variable as property rather than using as function variable. Make sure, FBSDKLoginManager variable must remain alive until the completion handler call

आप चालू कर सकते हैं -Wimplicit-बनाए रखने आत्म चेतावनी आप स्वयं संदर्भ यदि एक ब्लॉक में गलती से एक चेतावनी प्राप्त करने के लिए।Github issues

समाधान में प्रकाशित किया गया था 2:

आप अपने plist करने के लिए इन जोड़ सकते हैं

<key>NSAppTransportSecurity</key> 
    <dict> 
     <key>NSExceptionDomains</key> 
     <dict> 
      <key>akamaihd.net</key> 
      <dict> 
       <key>NSIncludesSubdomains</key> 
       <true/> 
       <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> 
       <false/> 
      </dict> 
      <key>facebook.com</key> 
      <dict> 
       <key>NSIncludesSubdomains</key> 
       <true/> 
       <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> 
       <false/> 
      </dict> 
      <key>fbcdn.net</key> 
      <dict> 
       <key>NSIncludesSubdomains</key> 
       <true/> 
       <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> 
       <false/> 
      </dict> 
     </dict> 
    </dict> 
    <key>LSApplicationQueriesSchemes</key> 
    <array> 
     <string>fbapi</string> 
     <string>fb-messenger-api</string> 
     <string>fbauth2</string> 
     <string>fbshareextension</string> 
    </array> 

और भी AppDelegate बदलने के द्वारा सुझाए गए के रूप में

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 
// Override point for customization after application launch. 
    return SDKApplicationDelegate.shared.application(application,  didFinishLaunchingWithOptions: launchOptions) 
} 
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool 
{ 
    return SDKApplicationDelegate.shared.application(app, open: url, options: options) 
} 

इस प्रकार है author इस के बाद आप अपने swift3, एसडीके, ios10पर XCode8

इसके अलावा द्वारा उल्लेख के रूप में जाँच चला सकते हैं author अगर गूगल एनालिटिक्स

सेट करके अपने दृश्य नियंत्रक के शीर्ष पर अपने स्वयं के नियंत्रक जोड़ने था

Setting "FirebaseAppDelegateProxyEnabled" to "NO" in the -Info.plist solved the problem.

Full attribution goes to the forum and the authors mentioned in the forum

+0

हे मुझे एहसास हुआ कि किसी भी तरह से मैंने आपका जवाब घटा दिया, और यह स्पष्ट रूप से मेरा इरादा नहीं था। मुझे यह भी नहीं पता कि यह कैसे हुआ और मैं अपने वोट को पूर्ववत करने की कोशिश कर रहा हूं लेकिन सिस्टम मुझे चेतावनी देता है कि जब तक आप अपना उत्तर संपादित नहीं करते तब तक ऐसा करना असंभव है। तो यदि आप ऐसा करते हैं तो मैं इसे ऊपर उठाऊंगा। किसी भी असुविधा के लिए मैं क्षमाप्रार्थी हूं! – i6x86

+0

कोई समस्या नहीं, धन्यवाद –

1

कि आप Capabilities-> चाबी का गुच्छा शेयरिंग में चेन शेयरिंग सक्षम कुंजी श्रृंखला साझा करने AppDelegate

FBSDKApplicationDelegate.sharedInstance में didFinishLaunchingWithOptions समारोह आप में इस लाइन को जोड़ने

0

कोशिश सक्षम सुनिश्चित करें ()। आवेदन (आवेदन, किया गया फिनिश लांचिंगविथऑप्शन: लॉन्चऑप्शन)

+0

क्या आप अपना उत्तर समझा सकते हैं ताकि अन्य इससे सीख सकें? – Robert