为什么IOS13用facebook登录不起作用? [英] why IOS13 Login with facebook does not work?

查看:116
本文介绍了为什么IOS13用facebook登录不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我单击Facebook按钮,但是在iOS 13上它没有响应,但是在iOS 12.x上它可以正常工作.我该怎么办?

I click the Facebook button but it is unresponsive on iOS 13, but on iOS 12.x it works fine. What should I do?

我正在使用:
1)pod'FBSDKCoreKit','〜> 5.13.1'
2)pod'FBSDKLoginKit','〜> 5.13.1'
3)pod'FacebookCore'
4)pod'FacebookLogin'
5)pod'FacebookShare'

I am using:
1) pod 'FBSDKCoreKit', '~> 5.13.1'
2) pod 'FBSDKLoginKit', '~> 5.13.1'
3) pod 'FacebookCore'
4) pod 'FacebookLogin'
5) pod 'FacebookShare'

推荐答案

您的开放式url方法中的appdelegate无法正常工作,因为ios13发生了更改

Your appdelegate in open url method not working because ios13 in change

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool {
  return 
}    

您必须比添加此方法的SceneDelegate.swift文件更新最新的xcode.请尝试.

you have to latest xcode in work than SceneDelegate.swift file in add this method. please try it.

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
      guard let url = URLContexts.first?.url else {
          return
      }
      let _ = ApplicationDelegate.shared.application(
          UIApplication.shared,
          open: url,
          sourceApplication: nil,
          annotation: [UIApplication.OpenURLOptionsKey.annotation])
  }

,并且不要忘记在SceneDelegate中导入 FBSDKLoginKit

and not forgot to import FBSDKLoginKit in SceneDelegate

这篇关于为什么IOS13用facebook登录不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆