Bug Issue: iOS purchases not working


Pages: 1 2

makaydenko

  • Subscriber - Stencyl Studio
  • *
March 06, 2022, 06:19:52 am
Hi!

Stencyl 4.1.0-beta (b10928).

After launching the application on iOS, in-app purchases are not initialized. In the error logs:
Code: [Select]
...
[ios-deploy] throwing -10877
[ios-deploy] throwing -10877
stencyl.sw.util.StreamGobbler
[ios-deploy] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x147e0d930>.
[ios-deploy] Purchases initialize

This error "throwing -10877" is repeated many times.

Regards.
« Last Edit: March 06, 2022, 08:33:48 am by makaydenko »


Justin

  • Master Stencyler
  • *
May 01, 2022, 07:20:50 am
The last paragraph of my previous post was supposed to be a solution. Did you try it and it didn't work?

Quote
What you should be able to use, however, is the when [player can purchase goods] event. When that event is fired, you can make your product info requests (request info for product with ID [__]) and they should work.


makaydenko

  • Subscriber - Stencyl Studio
  • *
May 01, 2022, 01:39:34 pm
If I use the event "When player can purchase good" then I get an error:
Code: [Select]
ios-deploy[12032:104020] [ !! ] Error 0xe8000022: The service is invalid. AMDeviceSecureStartService(device, serviceName, NULL, &dbgServiceConnection)
And Stencyl doesn't run the game on the iOS device.


Justin

  • Master Stencyler
  • *
May 01, 2022, 06:07:02 pm
That specific error should be completely unrelated to the use of the event. Did you recently update your iOS version, update Xcode, or change settings on your iOS device?


makaydenko

  • Subscriber - Stencyl Studio
  • *
May 02, 2022, 03:04:13 am
I updated iOS to version 15.4.1. I will check on iOS 12.5.3 on another device.


makaydenko

  • Subscriber - Stencyl Studio
  • *
May 02, 2022, 03:49:40 am
I tested on a device with iOS 12.5.3

But purchases don't work. I attached screenshot of blocks for event "When player can purchase goods".
1. Nothing happens after starting the game.
2. As soon as I close the application, the following lines appear in the Stencyl logs:
Code: [Select]
[ios-deploy] Event "When player can purchase goods" is called
[ios-deploy] Purchases initialize
...

That is, while the application is running, purchases are not initialized. I wrote about it earlier.
« Last Edit: May 02, 2022, 05:22:31 am by makaydenko »


New attachment added by makaydenko - May 02, 2022, 03:51:20 am


Justin

  • Master Stencyler
  • *
May 02, 2022, 08:11:34 am
Again, I feel like the logging is just delayed. Don't worry too much about that.

You're getting closer now. The problem is that your product info request block is inside a condition that will never be true.

In the when [player can purchase goods] event, the value of product id is just an empty string. Get rid of the condition. When the event happens, just make the product info request right away.


makaydenko

  • Subscriber - Stencyl Studio
  • *
May 04, 2022, 04:30:18 am
Thanks for the explanation, Justin.

I checked on a new test application. And I was able to get the purchase price.
On Android, the "If player can make purchases" block works. So I couldn't figure out why the same doesn't work on iOS.

In any case, thanks for the help!


makaydenko

  • Subscriber - Stencyl Studio
  • *
May 04, 2022, 08:09:39 am
But it doesn't work for multiple products.

If I send request information for several products, then I get null for the first one, and nothing for the others.


makaydenko

  • Subscriber - Stencyl Studio
  • *
May 04, 2022, 03:07:38 pm
I used the "request info for product with ID" block without checking that the player can make purchases and now the payments work.


Pages: 1 2

Details

  • Reported
    March 06, 2022, 06:19:52 am
  • Updated
    June 21, 2022, 11:40:24 pm

  • View Status
    Public
  • Type
    Bug
  • Status
    New
  • Priority
    Normal
  • Version
    (none)
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Compiling/Testing Games

Tags


Attachments

* 2022-03-08_14-49-14.log (13.53 kB - downloaded 261 times.)

* 1.png (24.82 kB, 621x218 - viewed 525 times.)

* 2.png (31.45 kB, 736x231 - viewed 523 times.)

* 3.png (44.1 kB, 1048x274 - viewed 516 times.)

* 4.png (23.68 kB, 626x203 - viewed 514 times.)

* If player can make purchases.png (35.26 kB, 498x235 - viewed 516 times.)

* If player can make purchases logs.png (252.47 kB, 1426x610 - viewed 518 times.)

* when-player-can-purchase-goods.png (33.07 kB, 533x255 - viewed 513 times.)