-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Checklist before submitting a bug report
- I've updated to the latest released version of the SDK
- I've searched for existing GitHub issues
- I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- I've read the Code of Conduct
- This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
16.2
Facebook iOS SDK version
18.0.2
Dependency Manager
CocoaPods
SDK Framework
Core
Goals
compile success
Expected results
compile success
Actual results
Xcode errors:
facebook_app_events-0.20.1/ios/Classes/SwiftFacebookAppEventsPlugin.swift:27:47 Incorrect argument label in call (have ':didFinishLaunchingWithOptions:', expected ':continue:')
facebook_app_events-0.20.1/ios/Classes/SwiftFacebookAppEventsPlugin.swift:27:91 Cannot convert value of type '[UIApplication.LaunchOptionsKey : Any]' to expected argument type 'NSUserActivity'
facebook_app_events-0.20.1/ios/Classes/SwiftFacebookAppEventsPlugin.swift:32:63 Extra arguments at positions #3, #4 in call
facebook_app_events-0.20.1/ios/Classes/SwiftFacebookAppEventsPlugin.swift:33:27 Missing argument for parameter 'options' in call
facebook_app_events-0.20.1/ios/Classes/SwiftFacebookAppEventsPlugin.swift:118:32 Value of type 'Settings' has no member 'appID'
facebook_app_events-0.20.1/ios/Classes/SwiftFacebookAppEventsPlugin.swift:168:25 Value of type 'Settings' has no member 'setDataProcessingOptions'
Steps to reproduce
I'm using the Flutter plugin facebook_app_events, version 0.20.1. Its podspec file specifies s.dependency 'FBSDKCoreKit', '~> 18.0', which works for others, but fails for me.
When I specify pod 'FBSDKCoreKit', '= 18.0.1' in my Podfile, it compiles successfully.
@objcMembers @objc(FBSDKApplicationDelegate) final public class ApplicationDelegate : NSObject {
/// Gets the singleton instance.
@objc(sharedInstance) public static var shared: FBSDKCoreKit.ApplicationDelegate { get }
/**
Initializes the SDK.
If you are using the SDK within the context of the `UIApplication` lifecycle, do not use this method.
Instead use `application(_:didFinishLaunchingWithOptions:)`.
As part of SDK initialization, basic auto logging of app events will occur, this can be
controlled via the 'FacebookAutoLogAppEventsEnabled' key in your project's Info.plist file.
*/
@objc final public func initializeSDK()
/**
Call this method from the `UIApplicationDelegate.application(_:continue:restorationHandler:)` method
of your application delegate. It should be invoked in order to properly process the web URL (universal link)
once the end user is redirected to your app.
- Parameters:
- application: The application as passed to `UIApplicationDelegate.application(_:continue:restorationHandler:).
- userActivity: The user activity as passed to `UIApplicationDelegate.application(_:continue:restorationHandler:)`.
- Returns: `true` if the URL was intended for the Facebook SDK, `false` if not.
*/
@discardableResult
@objc(application:continueUserActivity:) final public func application(_ application: UIApplication, continue userActivity: NSUserActivity) -> Bool
/**
Call this method from the `UIApplicationDelegate.application(_:open:options:)` method
of your application delegate. It should be invoked for the proper processing of responses during interaction
with the native Facebook app or Safari as part of an SSO authorization flow or Facebook dialogs.
- Parameters:
- application: The application as passed to `UIApplicationDelegate.application(_:open:options:)`.
- url: The URL as passed to `UIApplicationDelegate.application(_:open:options:)`.
- options: The options dictionary as passed to `UIApplicationDelegate.application(_:open:options:)`.
- Returns: `true` if the URL was intended for the Facebook SDK, `false` if not.
*/
@discardableResult
@objc(application:openURL:options:) final public func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool
/**
Call this method from the `UIApplicationDelegate.application(_:openL:sourceApplication:annotation:)` method
of your application delegate. It should be invoked for the proper processing of responses during interaction
with the native Facebook app or Safari as part of an SSO authorization flow or Facebook dialogs.
- Parameters:
- application: The application as passed to `UIApplicationDelegate.application(_:open:sourceApplication:annotation:)`.
- url: The URL as passed to `UIApplicationDelegate.application(_:open:sourceApplication:annotation:)`.
- sourceApplication: The source application as passed to `UIApplicationDelegate.application(_:open:sourceApplication:annotation:)`.
- annotation: The annotation as passed to `UIApplicationDelegate.application(_:open:sourceApplication:annotation:)`.
- Returns: `true` if the URL was intended for the Facebook SDK, `false` if not.
*/
@discardableResult
@objc(application:openURL:sourceApplication:annotation:) final public func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any?) -> Bool
/**
Call this method from the `UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:)` method
of your application delegate. It should be invoked for the proper use of the Facebook SDK.
As part of SDK initialization, basic auto-logging of app events will occur; this can be
controlled via the `FacebookAutoLogAppEventsEnabled` key in the project's Info.plist file.
- Parameters:
- application: The application as passed to `UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:)`.
- launchOptions: The launch options as passed to `UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:)`.
- Returns: `true`
*/
@discardableResult
@objc final public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool
/**
Adds an observer that will be informed about application lifecycle events.
- Note: Observers are weakly held
*/
@objc final public func addObserver(_ observer: any FBSDKApplicationObserving)
/// Removes an observer so that it will no longer be informed about application lifecycle events.
@objc final public func removeObserver(_ observer: any FBSDKApplicationObserving)
}
However, when I specify pod 'FBSDKCoreKit', '= 18.0.2', Xcode doesn't see the other application functions.
/**
An `ApplicationDelegate` is designed to post-process the results from Facebook Login
or Facebook Dialogs (or any action that requires switching over to the native Facebook
app or Safari).
The methods in this class are designed to mirror those in `UIApplicationDelegate`, and you
should call them in the respective methods in your application delegate implementation.
*/
@objcMembers @objc(FBSDKApplicationDelegate) final public class ApplicationDelegate : NSObject {
/// Gets the singleton instance.
@objc(sharedInstance) public static var shared: FBSDKCoreKit.ApplicationDelegate { get }
/**
Initializes the SDK.
If you are using the SDK within the context of the `UIApplication` lifecycle, do not use this method.
Instead use `application(_:didFinishLaunchingWithOptions:)`.
As part of SDK initialization, basic auto logging of app events will occur, this can be
controlled via the 'FacebookAutoLogAppEventsEnabled' key in your project's Info.plist file.
*/
@objc final public func initializeSDK()
/**
Call this method from the `UIApplicationDelegate.application(_:continue:restorationHandler:)` method
of your application delegate. It should be invoked in order to properly process the web URL (universal link)
once the end user is redirected to your app.
- Parameters:
- application: The application as passed to `UIApplicationDelegate.application(_:continue:restorationHandler:).
- userActivity: The user activity as passed to `UIApplicationDelegate.application(_:continue:restorationHandler:)`.
- Returns: `true` if the URL was intended for the Facebook SDK, `false` if not.
*/
@discardableResult
@objc(application:continueUserActivity:) final public func application(_ application: UIApplication, continue userActivity: NSUserActivity) -> Bool
/**
Call this method from the `UIApplicationDelegate.application(_:open:options:)` method
of your application delegate. It should be invoked for the proper processing of responses during interaction
with the native Facebook app or Safari as part of an SSO authorization flow or Facebook dialogs.
- Parameters:
- application: The application as passed to `UIApplicationDelegate.application(_:open:options:)`.
- url: The URL as passed to `UIApplicationDelegate.application(_:open:options:)`.
- options: The options dictionary as passed to `UIApplicationDelegate.application(_:open:options:)`.
- Returns: `true` if the URL was intended for the Facebook SDK, `false` if not.
*/
@discardableResult
@objc(application:openURL:options:) final public func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool
/**
Adds an observer that will be informed about application lifecycle events.
- Note: Observers are weakly held
*/
@objc final public func addObserver(_ observer: any FBSDKApplicationObserving)
/// Removes an observer so that it will no longer be informed about application lifecycle events.
@objc final public func removeObserver(_ observer: any FBSDKApplicationObserving)
}
Code samples & details
// INSERT YOUR CODE HERE
var example = "Example code"