我在Xcode 10中打开了我的应用,现在在9.4.1中出现错误:SDKApplicationDelegate(FacebookCore) [英] I opened my app in Xcode 10 and now I have errors in 9.4.1 : SDKApplicationDelegate (FacebookCore)

查看:95
本文介绍了我在Xcode 10中打开了我的应用,现在在9.4.1中出现错误:SDKApplicationDelegate(FacebookCore)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用beta版本的Xcode 10打开了我的应用程序,以检查它是否与iOS 12兼容.现在,如果我尝试在Xcode的稳定版本中构建项目,则SDKApplicationDelegate(FacebookCore)中有2个错误:

I opened my app with the beta version of Xcode 10 to check if it was compatible with iOS 12, and now if I try to build my project in the stable version of Xcode I have 2 errors in the SDKApplicationDelegate (FacebookCore) :

@discardableResult
  public func
    application(_ application: UIApplication,
                didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
    return delegate?.application(application, didFinishLaunchingWithOptions: launchOptions) ?? false
  }

->``LaunchOptionsKey'不是'UIApplication'的成员类型

--> ''LaunchOptionsKey' is not a member type of 'UIApplication''

@available(iOS 9.0, *)
  @discardableResult
  public func application(_ app: UIApplication,
                          open url: URL,
                          options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
    return delegate?.application(app,
                                 open: url,
                                 sourceApplication: options[.sourceApplication] as? String,
                                 annotation: options[.annotation]) ?? false
  }

->'OpenURLOptionsKey'不是'UIApplication'的成员类型

--> 'OpenURLOptionsKey' is not a member type of 'UIApplication'

我尝试更新吊舱,但没有任何改变.

I tried to update my pods but nothing changed.

我必须手动更改这些代码行吗?

Do I have to manually change these lines of code ?

推荐答案

这是xcode版本问题.我有同样的错误.在集成Facebook工具包时,我的朋友在Xcode10中创建了项目.但是我正在使用Xcode 9. 只需更换,
UIApplication.LaunchOptionsKey UIApplicationLaunchOptionsKey
UIApplication.OpenURLOptionsKey UIApplicationOpenURLOptionsKey . 清理完我的项目后,它运行正常

This is xcode version problem. I got same error. While integrating Facebook kit my friend had created project in Xcode10. But i'm using Xcode 9. Simply just replaced,
UIApplication.LaunchOptionsKey to UIApplicationLaunchOptionsKey and
UIApplication.OpenURLOptionsKey to UIApplicationOpenURLOptionsKey. After clean my project, it is working fine

这篇关于我在Xcode 10中打开了我的应用,现在在9.4.1中出现错误:SDKApplicationDelegate(FacebookCore)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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