Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

IAP not working correctly with Corona-2019.3528 and IOS 13
Started by accounting7 Sep 24 2019 08:34 AM

82 replies to this topic
[TOPIC CONTROLS]
Page 1 of 4 1 2 3 »
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

accounting7

[GLOBAL: userInfoPane.html]
accounting7
  • Observer

  • 4 posts
  • Corona SDK

We have noticed a problem with Build Corona-2019.3528 on IOS 13 with XCode 11.0 .

After the payment gone through when the purchased state is triggered in the listener, the receipt from the transaction is broken. We are using the standart store implementation.

On IOS 12 the same version is working. Also are versions wtih older Corona versions and an older XCode Version working fine.

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,682 posts
  • Enterprise

Can you provide more information?

 

what tells you the receipt from the transaction is broken?

 

What do you mean by standard store implementation? Almost everyone implements IAP slightly differently.

 

Any log information, screenshots, etc. showing the issue would be very helpful.

 

Rob



[TOPIC: post.html]
#3

accounting7

[GLOBAL: userInfoPane.html]
accounting7
  • Observer

  • 4 posts
  • Corona SDK

We are sending the receipt base64-encoded to our Backend for validation.

 

Sandbox-Receipt with IOS 12

{
    "signature" = "A2zQ3dj/+Cj+ik660Ek+U3vzlkGIz/K/S+V3EUq+L+SENrWrVg77ldLCZzJmpo7EoFPl5WyNtz78M7zU+6zkHNu5+cN5NUO6xszbO00iUk0Qf7uWdtlvC+Dj/cBjmCUn0ctzyNM+3JffMIKLi14XIobj9TWWOkkSfv0ec63z1OBxvPtATWJyTep7prgmmb+R6XDxnVIif+OdM3p5/KKjlq8BhVlZnIBxq9h2hP+D74b8/lwQ6/0SsJYQ/D/G5/+819QfRhSmISQGaUP1lcnc6mtd5ZPXafMVP1cmvYOYhOt0oBT1kuEKN5iR8zqOKNIRXAu9DUxT6lTC3AusRiZTSPMAAAWAMIIFfDCCBGSgAwIBAgIIDutX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U4NSI7CgkiYnZycyIgPSAiNC41LjI4IjsKCSJ0cmFuc2FjdGlvbi1pZCIgPSAiMTAwMDAwMDU3MTM3MzU4NSI7CgkicXVhbnRpdHkiID0gIjEiOwoJIm9yaWdpbmFsLXB1cmNoYXNlLWRhdGUtbXMiID0gIjE1NjkyNDgzMTU4NjYiOwoJInVuaXF1ZS12ZW5kb3ItaWRlbnRpZmllciIgPSAiMDAxQzQ4OTEtRkJDMy00QkEzLTlBOEMtOEYzQkNGRTQ4Mjk2IjsKCSJwcm9kdWN0LWlkIiA9ICJvZmZlcl8zOTlfMl9hcHBzdG9yZV9qYWNrcG90IjsKCSJpdGVtLWlkIiA9ICIxMDYzNzgyMTY1IjsKCSJ2ZXJzaW9uLWV4dGVybmFsLWlkZW50aWZpZXIiID0gIjAiOwoJImlzLWluLWludHJvLW9mZmVyLXBlcmlvZCIgPSAiZmFsc2UiOwoJInB1cmNoYXNlLWRhdGUtbXMiID0gIjE1NjkyNDgzMTU4NjYiOwoJInB1cmNoYXNlLWRhdGUiID0gIjIwMTktMDktMjMgMTQ6MTg6MzUgRXRjL0dNVCI7CgkiaXMtdHJpYWwtcGVyaW9kIiA9ICJmYWxzZSI7Cgkib3JpZ2luYWwtcHVyY2hhc2UtZGF0ZSIgPSAiMjAxOS0wOS0yMyAxNDoxODozNSBFdGMvR01UIjsKCSJiaWQiID0gImNvbS53aG93LmphY2twb3QiOwoJInB1cmNoYXNlLWRhdGUtcHN0IiA9ICIyMDE5LTA5LTIzIDA3OjE4OjM1IEFtZXJpY2EvTG9zX0FuZ2VsZXMiOwp9";
    "environment" = "Sandbox";
    "pod" = "100";
    "signing-status" = "0";
}

 

Sandbox-Receipt with IOS 13

C{
    "signature" =##

 

This broken receipt leads to the error "Payment not verified. Status 21002. Message: The data in the receipt-data property was malformed" from Apple.

 

With standard store implemtation we mean the store=require("store") and not the plugin store=require("plugin.apple.iap") implementation.


  • ans likes this

[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,682 posts
  • Enterprise

Forwarded to Engineering.

 

Rob



[TOPIC: post.html]
#5

colinmorgan

[GLOBAL: userInfoPane.html]
colinmorgan
  • Enthusiast

  • 46 posts
  • Corona SDK

I'm having what I think is a different flavor of the same problem.

On older iOS devices (v 9.3.5), IAP transactions crash the app on the latest version of my app, built with 2019.3531, but work fine on the previous version of my app, built last month with 2019.3504. The crash seems to happen at the point when the app has received a reply from Apple's servers.

I also experience a crash when attempting to restore purchases.

IAP transactions work fine on devices running iOS 12 and 13. (I don't know about iOS 10 and 11, since I don't have any test devices that use that version of the OS.)

I'd attach a crash log if I could, but, even though I'm watching the crashes happen in Console, the report is not showing up where it is supposedly being saved.



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,682 posts
  • Enterprise

There is a discussion on the community Slack about this. When I test it, I get something like:

 

{length = 3478, bytes = 0x7b0a0922 7369676e 61747572 6522203d ... 3d202230 223b0a7d }

 

when I print the transaction.receipt to the console.  

 

The developer reporting this on Slack has gone back to some older builds that he knows worked before so apparently Apple has changed how the receipt is formatted. It's possible that it's a hex encoded byte array that contains a JSON structure inside it.

 

I'll post more once I learn more.

 

Rob



[TOPIC: post.html]
#7

d.mach

[GLOBAL: userInfoPane.html]
d.mach
  • Contributor

  • 971 posts
  • Corona SDK

Is this something which has an impact on IAPs in older games which are already in the store for some time?

 

Any news on the problem?



[TOPIC: post.html]
#8

colinmorgan

[GLOBAL: userInfoPane.html]
colinmorgan
  • Enthusiast

  • 46 posts
  • Corona SDK

Shouldn't.

After this issue was reported, I put out an update of my app that I built with Corona 2019.3476 targeting iOS SDK 12.1 and it works fine: No problem with App Store review, no customer complaints and plenty of successful transactions.



[TOPIC: post.html]
#9

tntwickey

[GLOBAL: userInfoPane.html]
tntwickey
  • Enthusiast

  • 74 posts
  • Corona SDK

any update on this?



[TOPIC: post.html]
#10

tntwickey

[GLOBAL: userInfoPane.html]
tntwickey
  • Enthusiast

  • 74 posts
  • Corona SDK

There is a discussion on the community Slack about this. When I test it, I get something like:

 

{length = 3478, bytes = 0x7b0a0922 7369676e 61747572 6522203d ... 3d202230 223b0a7d }

 

when I print the transaction.receipt to the console.  

 

The developer reporting this on Slack has gone back to some older builds that he knows worked before so apparently Apple has changed how the receipt is formatted. It's possible that it's a hex encoded byte array that contains a JSON structure inside it.

 

I'll post more once I learn more.

 

Rob

Do you have any update? This still doesn't work.



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,682 posts
  • Enterprise

There is an Apple IAP in the Marketplace that will handle the new receipts. 

 

Rob



[TOPIC: post.html]
#12

d.mach

[GLOBAL: userInfoPane.html]
d.mach
  • Contributor

  • 971 posts
  • Corona SDK

There is an Apple IAP in the Marketplace that will handle the new receipts. 

 

Rob

 

Who has to update already published apps now?



[TOPIC: post.html]
#13

tntwickey

[GLOBAL: userInfoPane.html]
tntwickey
  • Enthusiast

  • 74 posts
  • Corona SDK

Who has to update already published apps now?

 We do. The new iap  plugin returns all receipts rather than simply the one just purchased.



[TOPIC: post.html]
#14

d.mach

[GLOBAL: userInfoPane.html]
d.mach
  • Contributor

  • 971 posts
  • Corona SDK

What does this mean for apps already published. Is there something "broken" with IAP now or is this for new app builds? Do I have to "fix" old apps in the store or is everything working like before if it already is in the store?



[TOPIC: post.html]
#15

tntwickey

[GLOBAL: userInfoPane.html]
tntwickey
  • Enthusiast

  • 74 posts
  • Corona SDK

What does this mean for apps already published. Is there something "broken" with IAP now or is this for new app builds? Do I have to "fix" old apps in the store or is everything working like before if it already is in the store?

 Apps already on the store will still work. If you update any apps with ios 13 test your purchases.



[TOPIC: post.html]
#16

d.mach

[GLOBAL: userInfoPane.html]
d.mach
  • Contributor

  • 971 posts
  • Corona SDK

 Apps already on the store will still work. If you update any apps with ios 13 test your purchases.

 

Thanks for the clarification! Helps a lot! :)



[TOPIC: post.html]
#17

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 614 posts
  • Corona SDK

There is an Apple IAP in the Marketplace that will handle the new receipts. 

 

Rob

 

So how do we use this plugin?

Just replacing the old one with the one in the marketplace still throws an error on receipt validation.



[TOPIC: post.html]
#18

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,682 posts
  • Enterprise

It should be a drop in replacement.



[TOPIC: post.html]
#19

colinmorgan

[GLOBAL: userInfoPane.html]
colinmorgan
  • Enthusiast

  • 46 posts
  • Corona SDK

I just wanted to add a quick bit of followup based on my experience today: In September, after this problem cropped up, I did a build using Corona 2019.3476 targeting iOS SDK 12.1 that worked fine. Today, the same build combo resulted in crashes on purchase on devices running iOS 9. However, after downloading the latest daily build (3545) and activating the new Apple IAP plugin, purchasing on iOS 9 is once again working.

So, if you are using an older version of Corona targeting an older version of the iOS SDK, you might start seeing transaction failures in future builds. Obviously, your mileage may vary.

Also, "Restore Purchases" is still a little crash-prone, but upon relaunch, purchases are successfully restored.

Thank you for getting this taken care of, Team Corona- I appreciate it!



[TOPIC: post.html]
#20

Studycat2

[GLOBAL: userInfoPane.html]
Studycat2
  • Enthusiast

  • 92 posts
  • Corona SDK

I just wanted to add a quick bit of followup based on my experience today: In September, after this problem cropped up, I did a build using Corona 2019.3476 targeting iOS SDK 12.1 that worked fine. Today, the same build combo resulted in crashes on purchase on devices running iOS 9. However, after downloading the latest daily build (3545) and activating the new Apple IAP plugin, purchasing on iOS 9 is once again working.

So, if you are using an older version of Corona targeting an older version of the iOS SDK, you might start seeing transaction failures in future builds. Obviously, your mileage may vary.

Also, "Restore Purchases" is still a little crash-prone, but upon relaunch, purchases are successfully restored.

Thank you for getting this taken care of, Team Corona- I appreciate it!

I tried your solution. When trying "restore purchases" the app crashes immediately.
I was using the latest iPad Pro running iPad OS 13.1.3.
Corona version is 2019.3547 and iOS SDK 12.4. There is no error message in device log.
Anyone knows what's going on?



[TOPIC: post.html]
#21

d.mach

[GLOBAL: userInfoPane.html]
d.mach
  • Contributor

  • 971 posts
  • Corona SDK

Any news on this? I'm experiencing a drop in IAP sales with older apps (online for months!) and wonder if this could be connected!?



[TOPIC: post.html]
#22

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Corona Geek

  • 1,249 posts
  • Corona SDK

@d.mach, in your particular case, you should just implement analytics to different points in your app.

 

For instance, if you track whenever a player presses any purchase button, and then you also track what action they take afterwards, e.g. complete the purchase, cancel it, or an error occurs, etc. then you can easily deduce what is going on in your apps. It could simply be the case that fewer people are buying in-app purchases in your apps (the reason for which could be found via analytics or customer feedback/surveys), or it could be that something is broken, but if you had the analytics in place, you'd know for certain.


  • pixec likes this

[TOPIC: post.html]
#23

d.mach

[GLOBAL: userInfoPane.html]
d.mach
  • Contributor

  • 971 posts
  • Corona SDK

@d.mach, in your particular case, you should just implement analytics to different points in your app.

 

For instance, if you track whenever a player presses any purchase button, and then you also track what action they take afterwards, e.g. complete the purchase, cancel it, or an error occurs, etc. then you can easily deduce what is going on in your apps. It could simply be the case that fewer people are buying in-app purchases in your apps (the reason for which could be found via analytics or customer feedback/surveys), or it could be that something is broken, but if you had the analytics in place, you'd know for certain.

 

Thanks, but most of the apps are for kids and Apple don't allow any third-party analytics for those apps soon which is why we have removed all analytics.

I hope the drop is nothing permanent and has nothing to do with the new iOS.



[TOPIC: post.html]
#24

pixec

[GLOBAL: userInfoPane.html]
pixec
  • Contributor

  • 210 posts
  • Corona SDK

Why not setup first party tracking for something so important as iap?

[TOPIC: post.html]
#25

d.mach

[GLOBAL: userInfoPane.html]
d.mach
  • Contributor

  • 971 posts
  • Corona SDK

Why not setup first party tracking for something so important as iap?

 

with the kids apps we wanted to be on the safe side. We are still not sure what changes Apple will make in March 2020.

How are you doing this 1party?




[topic_controls]
Page 1 of 4 1 2 3 »
 
[/topic_controls]