-
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
15.4
Facebook iOS SDK version
17.0.2
Dependency Manager
SPM
SDK Framework
Core
Goals
I need to activate Facebook Events. It required for advertising company from Facebook. I can't choose the facebook application from list becouse in Event Manager displays message "Your app is out of date. To run your app on iOS 14, update to the latest Facebook SDK for iOS."
Expected results
There needs to be no message in Event Manager "Your app is out of date. To run your app on iOS 14, update to the latest Facebook SDK for iOS." and I could choose the project for starting of advertising company.
Actual results
Display message "Your app is our of date" although I have installed the last version of SDK.
Steps to reproduce
- I've added package dependency in XCode via Swift Package Manager and use the last version of SDK that downloaded from https://github.com/facebook/facebook-ios-sdk.
- I've inserted to AppDelegate.swift the code for initialize SDK using FlutterMethodChannel.
- I've configured my info.plist and checked that properties is right.
- I've added to Flutter code invoke method for calling Facebook SDK initialization after request of permission for tracking (it is required).
- I've checked that all work is correct. I've seen information about events in Facebook Event Manager, they have appear.
But the message didn't appear: "Your app is out of date. To run your app on iOS 14, update to the latest Facebook SDK for iOS."
What I can do for solve this problem?
Code samples & details
// AppDelegate.swift
import UIKit
import FacebookCore
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
let facebookChannel = FlutterMethodChannel(name: "com.app.myapp/facebook",
binaryMessenger: controller.binaryMessenger)
facebookChannel.setMethodCallHandler({
(call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
guard call.method == "FBSDKInit" else {
AppEvents.shared.activateApp()
ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
return
}
})
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return ApplicationDelegate.shared.application(app, open: url, options: options)
}
}
// Flutter
const platform = MethodChannel('com.app.myapp/facebook');
platform.invokeMethod('FBSDKInit');