Git Product home page Git Product logo

Comments (7)

x401om avatar x401om commented on May 20, 2024 1

@Vaberer In Observer Mode, the only difference lies in calling the finishTransaction method. You can fully rely on our infrastructure for purchases, and, of course, you can listen to the SKPaymentQueue yourself, but refrain from closing transactions.

Additionally, you can utilize the getReceipt method and the transaction property of the AdaptyPurchasedInfo object, which is the result of makePurchase.

from adaptysdk-ios.

Vaberer avatar Vaberer commented on May 20, 2024 1

in this case we can close the issue, thank you for your help

from adaptysdk-ios.

x401om avatar x401om commented on May 20, 2024

Hi, @Vaberer! Thank you for the issue. According to the stack trace you have provided, it looks like this crash was occurred within StoreKit framework. How often do you observe this behaviour? Are there any other details you can provide?

from adaptysdk-ios.

Vaberer avatar Vaberer commented on May 20, 2024

Hello @x401om thanks for your reply, maybe I found the root cause, I'm also observing SKPaymentTransactionObserver in the codebase and Adapty does the same and we both are calling SKPaymentQueue.default().finishTransaction(transaction).

As I understand, I should pass true value for observerMode https://docs.adapty.io/docs/ios-observer-mode

Am. I correct? if so, I'd like to confirm my current implementation, when a user wants to buy something, I'm calling

Adapty.makePurchase(product: product) { _ in
  // No need to handle because app has it's own observer.
}

and finishing transactions are made in the app layer. We need to integrate Adapty due to analytics and pulling the products from Adapty paywalls. Is my understanding correct?

Thanks

from adaptysdk-ios.

x401om avatar x401om commented on May 20, 2024

@Vaberer, you are correct. If you don't want the Adapty SDK to finish transactions, you have to activate it in observer mode. It seems like StoreKit is not very reliable at finishing the same transaction twice, as we can see.

By the way, I am curious, what is the reason you want to finish transactions by yourself? Observer Mode is intended to be used as you described, but we did not expect users to use our products and the makePurchase method in that mode, since they are supposed to have their own purchase infrastructure. There is no issue if you use makePurchase, but I have to ask for the reasons, and perhaps you will consider using the Adapty SDK in full mode.

from adaptysdk-ios.

Vaberer avatar Vaberer commented on May 20, 2024

@x401om let me explain our situation and maybe you can help.

We cooperate with a marketing agency and they want us to implement Adapty for analytics, pulling products and running ab tests.

However we, originally, had our own system for managing in-app purchases and we had to make our and Adapty systems work together. Our systems also have our own analytics and logic (i.e: sending receipts to our backend) to make everything work.

One idea came to my mind:
We still add an observer SKPaymentQueue.default().add(self)
but we won't call SKPaymentQueue.default().finishTransaction(transaction).

We just need to listen to the delegate methods to send data to our backend and do our own analytics.

Is this approach correct? Will Adapty analytics and ab testing work?

Thanks.

from adaptysdk-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.