Report
Plugin Version
6.18.0
On what Platform are you having the issue?
ios
What did you do?
Called enableFacebookDeferredApplinks() before initSDK() in a Capacitor app that has the Facebook SDK installed and configured (FBSDKCoreKit 18.1.1, installed via CocoaPods).
What did you expect to happen?
Facebook deferred App Links attribution to be enabled.
What happened instead?
The call always rejects with Please install FBSDK First!, so Facebook deferred deep link attribution can never be enabled from a Capacitor app.
Please provide any other relevant information.
The native implementation gates the feature behind a compile-time check in ios/Plugin/AppsFlyerPlugin.swift:
#if canImport(FacebookCore)
AppsFlyerLib.shared().enableFacebookDeferredApplinks(with: FBSDKAppLinkUtility.self)
call.resolve(["res": "enabled"])
#else
call.reject("Please install FBSDK First!")
#endif
FacebookCore as a module name only exists under Swift Package Manager (and the pre-v9 wrapper pods, removed after Facebook SDK v8). Capacitor apps install the Facebook SDK via CocoaPods, where the module is named FBSDKCoreKit — so the #else branch is always the one that gets compiled, and the call cannot succeed in any Capacitor app.
Suggested fix: also accept the CocoaPods module name, plus the matching conditional import:
#if canImport(FacebookCore) || canImport(FBSDKCoreKit)
Related: #39 reported this against 6.9.2; it was closed without a code change and the gate is unchanged in 6.18.0.
Report
Plugin Version
6.18.0On what Platform are you having the issue?
iosWhat did you do?
Called
enableFacebookDeferredApplinks()beforeinitSDK()in a Capacitor app that has the Facebook SDK installed and configured (FBSDKCoreKit 18.1.1, installed via CocoaPods).What did you expect to happen?
Facebook deferred App Links attribution to be enabled.
What happened instead?
The call always rejects with
Please install FBSDK First!, so Facebook deferred deep link attribution can never be enabled from a Capacitor app.Please provide any other relevant information.
The native implementation gates the feature behind a compile-time check in
ios/Plugin/AppsFlyerPlugin.swift:FacebookCoreas a module name only exists under Swift Package Manager (and the pre-v9 wrapper pods, removed after Facebook SDK v8). Capacitor apps install the Facebook SDK via CocoaPods, where the module is namedFBSDKCoreKit— so the#elsebranch is always the one that gets compiled, and the call cannot succeed in any Capacitor app.Suggested fix: also accept the CocoaPods module name, plus the matching conditional import:
#if canImport(FacebookCore) || canImport(FBSDKCoreKit)Related: #39 reported this against 6.9.2; it was closed without a code change and the gate is unchanged in 6.18.0.