Skip to content
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

App events not received in iOS. #148

Closed
Young-Slim-Jim opened this issue Oct 13, 2021 · 11 comments
Closed

App events not received in iOS. #148

Young-Slim-Jim opened this issue Oct 13, 2021 · 11 comments

Comments

@Young-Slim-Jim
Copy link

Currently, I am using this package to send custom events. On Android devices everything is working fine. I see events in the overview and in event testing tab on the Facebook event dashboard. However, I do not see anything when I am running the app on a iOS Device. In my Facebook dashboard no error are shown and it is telling me, that everything is up to date.

Possible Solution

I saw that a lot of people are struggling with iOS Device on sending out the events on iOS 14.5 and higher. I tried everything that these people where suggestion, but I can not try everything since some of the suggested fixes are only possible to do for people who use Swift / native development. Tracking for this iOS devices was allowed, but it did not change anything.

Steps to Reproduce (for bugs)

  1. modifie info.plist file as described on pub dev
  2. activate app in Facebook
  3. place a custom app event and trigger it with user behavior.

Context

Your Environment

  • no errors for flutter doctor
  • Operating System and version: iOS 14.5
  • package version: 13.5
  • flutter version: 2.5.2
@DennisAlund
Copy link
Member

Sounds like a duplicate of #145 ... can you confirm

@Young-Slim-Jim
Copy link
Author

yes, but the difference is, that all events are captured for android devices, but not for iOS devices. I have autoLogEvents enabled, so on android I am seeing these events + my custom events. But on iOS devices, nothing is detected.

@Young-Slim-Jim
Copy link
Author

Update: I just tested the package on a iOS 13.7 simulator and it worked. I saw in the events manager that my device was detected and that all of the auto logged events where collected.

@Marandsch
Copy link

@DennisAlund Do you have any solution? Please give us an update. Thank you!

@DennisAlund
Copy link
Member

DennisAlund commented Oct 16, 2021

I have just revisited the plugin and its example. I don't have a iOS device to test on right now. Please have a look at PR #149 as it bumps plugin version to 0.14 and Facebook SDK to v12 and removes a number of deprecated methods.

@Young-Slim-Jim
Copy link
Author

unfortunately I can't test if this solved my problem because I am also using flutter_login_facebook: ^1.1.0 in my app which still depends on SDK v11. And now, when I want to update, coco pods is throwing an error because it cannot resolve the sdk versions. So, since I can't have to versions of the sdk at the same time(right ?) I am kind of stuck here. Would be great if anyone who is also experiencing this can give feedback wether or nor updating changed anything.

@DennisAlund
Copy link
Member

Update: I just tested the package on a iOS 13.7 simulator and it worked. I saw in the events manager that my device was detected and that all of the auto logged events where collected.

Would be happy to get some insights from a iOS developer who has a finger on the pulse on what happened in the jump from v13-14 for iOS and how it might have impacted the Facebook SDK.

Is it a bug on the plugin or some restrictions of the OS that prevents the Facebook SDK to work differently.

Would be happy to learn more abou this.

@DennisAlund
Copy link
Member

I am also using flutter_login_facebook: ^1.1.0

You might want to look into https://pub.dev/packages/flutter_facebook_auth which seems to be more up to date

@furkanvatandas
Copy link

Do you think it could be related? https://developers.facebook.com/docs/app-events/guides/advertising-tracking-enabled/

@DennisAlund
Copy link
Member

Thanks @furkanvatandas that seems to be a good lead.

@Young-Slim-Jim can you confirm if you have enabled the advertisement tracking using this method already? Or if you enable it can you confirm that the events start showing up. Would be great to know for future troubleshooting 🙏

/// Sets the Advert Tracking propeety for iOS advert tracking
/// an iOS 14+ feature, android should just return a success.
Future<void> setAdvertiserTracking({
required bool enabled,
}) {
final args = <String, dynamic>{'enabled': enabled};
return _channel.invokeMethod<void>('setAdvertiserTracking', args);
}

@Young-Slim-Jim
Copy link
Author

Thank you for that hint. That actually solved the problem for me. Before I opened the ticket, I tried setting that flag in another way, which didn't work out, which is why I did not take it into consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants