baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

appDelegate.swift facebook usage #212

Closed deptford closed 2 years ago

deptford commented 2 years ago

I'm upgrading to Capacitor 3 Using Xcode 13.0 Swift Language Version 5 IOS Deployment Target 12

From Podfile: platform :ios, '12.0' FBAEMKit (13.0.0):
FBSDKCoreKit (13.0.0):
FBSDKCoreKit_Basics (13.0.0) FBSDKLoginKit (13.0.0):

Adding the following to AppDelegate.swift (one minor change re CAPBridge)

  import FBSDKCoreKit
  ...
  func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
    // Called when the app was launched with a url. Feel free to add additional processing here,
    // but if you want the App API to support tracking app url opens, make sure to keep this call
    if let scheme = url.scheme, let host = url.host {
        if scheme == "fb\(String(describing: Settings.appID))" && host == "authorize" {
            return ApplicationDelegate.shared.application(app, open: url, options: options)
        }
    }

    return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
    // CAPBridge deprecated: see https://capacitorjs.com/docs/updating/3-0
    // return CAPBridge.handleOpenUrl(url, options)
  }

However Xcode is giving the following build error against Settings.appID Instance member 'appID' cannot be used on type 'Settings'; did you mean to use a value of this type instead?

Has anyone come across this? What's the obvious thing I'm missing here?

Thanks

deptford commented 2 years ago

Ok, so there is a change in FBSDKCoreKit (13.0.0) Settings.appID -> Settings.shared.appID