Questions with new sdk version
burakgomec opened this issue · 4 comments
Hi folks,
I upgraded Adapty Sdk version from 1.16 to 2.2.0 in an ios app but I'm having some problems.
-
In the new adapty version, every time the application runs in the simulator, it asks for apple id and password and I can't get past the screen without saying "cancel". This was not available in the adapty(1.16) version I used before. Is there a solution to this, the problem is related to the development environment but it is quite annoying.
-
Every time I enter the payment screen (etc. Paywall View Controller), the "Adapty.getPaywall" function is running and I wait for a certain time while bringing the paywall name. This did not exist in the previous version and except for the first load, I did not have the problem of waiting by reading from the cache every time I entered the screen. Here, after the first screen is opened, I can cache the paywall variable to a global variable myself, but this does not seem to be best practice. how can i solve this?
Thank you so much.
I tried the new example code, it doesn't bring any info from the paywall .. the description, buttons, colors, anything..
@burakgomec I am sorry for a long response time.
In order to get the data on the transactions performed, Adapty SDK is trying to validate the receipt.
In the production environment this receipt should always be on the device. At the same time, in the sandbox environment the receipt is always missing when the application is launched for the first time, and in a normal situation it should appear after the first purchase.
-
The Adapty SDK tries to request the receipt from the system if it is not on the device, and it is this operation that causes iOS to show you the authorization dialog. However, if you ignore it by pressing Cancel, the system will not provide a receipt and you will get an error in the log. In real life, the user is most often authorized with their Apple Id, so they will not see this dialog. At the moment, there is no way we can avoid authorization without adding more settings to the SDK. In older versions the logic of the receipt request was different, for this reason you may not have seen this dialog box. You can read more about this in the Apple docs.
-
The new version of the SDK uses object caching for exceptional cases, such as server unavailability or no internet connection. There is no way to fetch an object directly from the cache, the SDK will always try to return the most up-to-date data. If you are sure that the paywall object is up-to-date enough at the moment, you can make your own cache in RAM.
At the same time, I strongly recommend that you load paywalls and products before the user is shown the screen.
I tried the new example code, it doesn't bring any info from the paywall .. the description, buttons, colors, anything..
@hopye could you please clarify your question? What do you mean by "it doesn't bring any info from the paywall"?
Since there is no response for a long time, I will close the issue. Feel free to reopen or create a new one in case of any trouble.