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

Facebook SDK automatic app events logging with StoreKit2 #2377

Open
5 tasks done
max-sab opened this issue Apr 8, 2024 · 2 comments
Open
5 tasks done

Facebook SDK automatic app events logging with StoreKit2 #2377

max-sab opened this issue Apr 8, 2024 · 2 comments

Comments

@max-sab
Copy link

max-sab commented Apr 8, 2024

Checklist before submitting a bug report

Xcode version

15.1

Facebook iOS SDK version

16.3.1

Dependency Manager

SPM

SDK Framework

Core

Goals

We are currently making a switch from Original StoreKit to StoreKit2 in our iOS app. We have Facebook SDK of version 16.3.1 (but tried on 17.0.0 as well) that automatically logs our purchase events.

After the migration, we noticed drop in Purchase events quantity in our Events Manager.

While debugging Facebook App Events automatic logging I have noticed that purchase events that Facebook sends from mobile client to Events Manager do not work as expected when purchase is made using StoreKit2:

  • when switched back to Original StoreKit - purchase event logs immediately in the Facebook debug console after the actual purchase
  • when purchased using StoreKit2 - purchase event does not appear in the debug console. Sometimes they are being sent when I relaunch the app, usually not

I've researched Facebook SDK implementation and noticed that it uses public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) to listen for the payment updates (sorry if i missed something and it's not the only method that you use)
In my case, purchase made using StoreKit2 does not trigger any events in this function right after the purchase and my theory is that it leads to the drop in our Purchase events quantity.

So my question is if this is a known issue or StoreKit2 purchases should track in the same way as Original StoreKit and it looks like something's wrong with my code?

Thanks in advance!

Expected results

After user makes a purchase either with Original StoreKit or StoreKit2, Facebook SDK sends Purchase event to Events Manager

Actual results

If i make purchase using Original StoreKit SDK -> Facebook SDK logs Purchase event immediately and everything works as expected

if I make purchase using StoreKit2 API -> no event is being tracked. sometimes it's tracked on the next app session, but usually not

Steps to reproduce

  • Install Facebook SDK to your project with automatic app events logging enabled
  • Initiate test session with Events Manager
  • Make in-app purchase using StoreKit2
  • Observe that no Purchase event is being tracked

Code samples & details

No response

@MatoMA
Copy link

MatoMA commented Apr 10, 2024

We also encountered this issue. We also discovered that Firebase does not support StoreKit 2. Considering that StoreKit 2 does not have any particular advantages, we plan to fall back to StoreKit 1.

@max-sab
Copy link
Author

max-sab commented Apr 12, 2024

Sad to hear that you've also encountered this issue

We've taken a decision to switch to StoreKit2 and Server-to-Server Notifications v2 to make it easier to handle in-app purchases and therefore it's very important for us that SDKs also support this version of StoreKit

As for now, it'd be amazing to understand whether it's widespread issue and if Facebook Mobile SDK team considers to support that

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

No branches or pull requests

2 participants