New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facebook Event Manager not receive events from iOS 14+ #66
Comments
Perhaps related #25 I don't think this will result in any change to the module, I believe there is a project configuration / API usage issue. An example (https://stackoverflow.com/help/minimal-reproducible-example) in this case would be a complete App.js that may be dropped in the example project and run without modification that shows the issue Separately I would suggest react-native-permissions is a superior library to the one you are using though it will not actually change your result |
added a small code example to my bug report, it will be great if someone take a look |
looks like this is a problem with Facebook IOS SDK |
Good find - but also a bit unfortunate as it implies any fix there will be for current versions and there's a forward port required #55 with no one currently interested + motivated to do it 😅 |
Same problem, I have this code and it doesn't work on +iOS14
|
@PrimulaX this appears to be an upstream issue - please report back when it is resolved there and note that until someone takes up #55 (could be you!) that will still need to be done here in order to take advantage of the upstream fix. I do not believe this is actionable here though. For future people to be very clear I believe these are the needs:
Further +1s and metoos etc are not helpful, but do feel free to hit the thumbsup on the issue, that is equivalent to a popularity vote and shows whether it is important to you, without generating notifications that are not actionable. |
@mikehardy Thanks for your answer. |
@trilam1409 your comment is just a fancy "me too" For future people to be very clear I believe these are the needs:
|
Thanks for your answer. I'm not familiar with native code. You can help me know how to change the initial method in fbsdk 11. Integrate two products of FB that was quite difficult haha. |
Unfortunately I can't help without actually trying to do it: changing those methods is the task. We need someone that has the time to just do it. I don't have the time now unfortunately. Note that even after forward-porting I think we're still waiting on the upstream issue? So it may not be fully fixed after the forward port here, but it means that at least when upstream does fix a bug, we can get the fix since we can access the new versions |
For people that struggling with this bug please make sure that you HAVE A FACEBOOK APP INSTALLED AND LOGGED IN! |
I cannot explain how frustratingly difficult it was for me to get this """"""working"""""", and by working I mean getting events to show up on the "Test Events" tab of the Events Manager web app. I have absolutely no idea if this means that events will be captured for our users or not but I guess it's a start :bang-head-on-wall:. In summary, for it to work you need to:
This will make it so events you log on your app by YOU—which I guess they determine by seeing who is logged in on the Facebook App— are the ones to show up on the Event manager. Worst part is that events weren't even showing on the "Overview" tab before enabling ATT on both apps, this is troubling because I suppose the chances of this happening is rather low. |
If someone wants to PR the documentation (just hit the edit button at the top right of the page! To add the steps from @santiagofm that would be most welcome! Looks nearly impossible to figure out. |
Tried exactly as mentioned by @santiagofm but app_install event is not showing up, All other events are populating in the events manager. |
I was finally able to log events to Facebook Event Manager by changing the AppDelegate with the following code:
Please note that you also need to add AppTrackingTransparency.framework to your XCode project (under the General tab): I'm using react-native-fbsdk-next 10.1.0. |
Wow! That looks like exactly the sort of thing that this module should do itself? Is there something missing in the events module wrapper code here that requires all that code in your AppDelegate? |
@mikehardy no idea. I tried multiple things over 4 hours and in the end the only solution was that code (which is based on the link posted by @santiagofm ) All I know is that without it, no AppTrackingTransparency dialog appears on the App, I didn't try the solutions that use AppTrackingTransparency through other react-native libs however, I did try to call |
It's a little weird that |
Well, all I know is that without it, it was giving an “undefined symbols” error when building |
I use react-native-permissions myself, and it has ATT support. I'm not sure why anyone would avoid it - that's the go-to module for permissions (including ATT) and may eliminate the need for some of that code |
We are still starting our project, so we didn’t need other permissions for now and since the setting on JS didn’t seem to be working, I used the objective C directly. |
In my case adding AppTrackingTransparency with react-native-permissions worked. Also if you have multiple info.plist files, add config for all of them. Additionally FB config is not enough. Add Client Token too |
🐛 Bug Report
I tried to send some events to Facebook Event manager, like this:
AppEventsLogger.logEvent('test', 14, { type: 'ios' });
In android and IOS < 14 it works fine, I can easily check this event in Event Manager, but if I try to send an event on IOS 14+, I don't receive anything.
Not any errors appear.
To Reproduce
Well, I don't do any special, just make all like in setup instruction.
I used 'react-native-permissions' package to get permission for advertiser tracking enabled on the first app run.
I also made 5 and 6 steps from here
https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#disable-auto-events
In my app I had AppDelegate.swift file, so in 6 I used Swift part
I init SDK like this:
(I use requestTrackingPermission method from 'react-native-tracking-transparency' package to check if I really had permissions)
and I added to button calling event:
AppEventsLogger.logEvent('test', 14, { type: 'ios' });
Expected Behavior
Should receive an event in Facebook Event Manager and check it in recent activity.
Code Example
https://github.com/AlexButovFairo/testFacebookSDK
This is an example of my setup, only left to configure Info.plist
Environment
The text was updated successfully, but these errors were encountered: