Comments (7)
@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.
in this case we can close the issue, thank you for your help
from adaptysdk-ios.
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.
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.
@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.
@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)
- How to solve the problem that you need to go over the wall to buy it HOT 2
- Example code is old version HOT 8
- Questions with new sdk version HOT 4
- Fixed Code. finally working, please update HOT 1
- Please remove 'dummy' profiles HOT 1
- Adapty SDK is failing to send an ever-growing event log to Kinesis HOT 5
- Intermittent crash in Adapty.activate(_:observerMode:customerUserId:enableUsageLogs:storeKit2Usage:dispatchQueue:_:) HOT 4
- Adapty > 2.0 Objective-C initialisation HOT 1
- Constant Apple ID request on the simulator HOT 4
- Plan for removal of deprecated iAd framework from Adapty SDK HOT 3
- Missing Objective-C Interop HOT 1
- Crash on Adapty.SDK.SendEvents Thread HOT 3
- Repeated calls to api/v1/sdk/events/blacklist when internet connection offline HOT 1
- Crash happened after successful purchase in ProfileStorage+UserDefaults.swift HOT 2
- Add StoreKit 2 `Product` to `AdaptyPaywallProduct` HOT 3
- Add VisionOS support HOT 4
- Infinite error on MacOS - ERROR: #API# ERROR HOT 5
- OneSignal Integration is broken HOT 1
- logShowPaywall from SwiftUI Demo not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adaptysdk-ios.