Description
First off, thanks for working on this plugin. I've looked everywhere and cannot find one solution for using facebook analytics and capacitor/ionic react based applications.
I've implemented everything as you've described. Yet, I see no events flowing through to facebook when I check the events stream.
I am testing on a device and simulator both running iOS 14. I have entered the FacebookAppID and FacebookDisplayName in the info.plist file.
I am running on:
@capacitor/core 2.4.2
@capacitor/ios 2.4.2
The app is based on @types/react 16.9.17 and @ionic/react 5.0.7
When I try to log an event in XCode I receive the message: "To Native -> FacebookAnalytics logEvent " followed by an event number.
Using the facebook datasources view, I do not see any events appearing in the test view where I would typically get a live stream of all incoming events.
Any idea whats going on? Thanks for you help and effort on this!
Example Usage:
const { FacebookAnalytics } = Plugins;
FacebookAnalytics.logEvent({ event:'test_event', params:{platform:'ios'}})
Edit: I think I might have found the issue. Additional code needs to be added to AppDelegate.swift to activate the FBSDK.
As marked here in the facebook docs: https://developers.facebook.com/docs/ios/getting-started/
Now I am seeing the same message as marked in Issue #3 for support on iOS 14. Now in Facebook event manager the events still do not show up but I get the message:
" Improvements to the Facebook SDK for iOS
Open
We released a newer version of the Facebook SDK for iOS that supports the SKAdNetwork and iOS 14. Update to the latest version for all apps to help enable the delivery and performance of your iOS 14 ad campaigns."