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

15 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

accounting7

[GLOBAL: userInfoPane.html]
accounting7
  • Observer

  • 3 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,207 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

  • 3 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/+819QfRhSmISQGaUP1lcnc6mtd5ZPXafMVP1cmvYOYhOt0oBT1kuEKN5iR8zqOKNIRXAu9DUxT6lTC3AusRiZTSPMAAAWAMIIFfDCCBGSgAwIBAgIIDutXh+eeCY0wDQYJKoZIh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PSAiNC41LjI4IjsKCSJ0cmFuc2FjdGlvbi1pZCIgPSAiMTAwMDAwMDU3MTM3MzU4NSI7CgkicXVhbnRpdHkiID0gIjEiOwoJIm9yaWdpbmFsLXB1cmNoYXNlLWRhdGUtbXMiID0gIjE1NjkyNDgzMTU4NjYiOwoJInVuaXF1ZS12ZW5kb3ItaWRlbnRpZmllciIgPSAiMDAxQzQ4OTEtRkJDMy00QkEzLTlBOEMtOEYzQkNGRTQ4Mjk2IjsKCSJwcm9kdWN0LWlkIiA9ICJvZmZlcl8zOTlfMl9hcHBzdG9yZV9qYWNrcG90IjsKCSJpdGVtLWlkIiA9ICIxMDYzNzgyMTY1IjsKCSJ2ZXJzaW9uLWV4dGVybmFsLWlkZW50aWZpZXIiID0gIjAiOwoJImlzLWluLWludHJvLW9mZmVyLXBlcmlvZCIgPSAiZmFsc2UiOwoJInB1cmNoYXNlLWRhdGUtbXMiID0gIjE1NjkyNDgzMTU4NjYiOwoJInB1cmNoYXNlLWRhdGUiID0gIjIwMTktMDktMjMgMTQ6MTg6MzUgRXRjL0dNVCI7CgkiaXMtdHJpYWwtcGVyaW9kIiA9ICJmYWxzZSI7Cgkib3JpZ2luYWwtcHVyY2hhc2UtZGF0ZSIgPSAiMjAxOS0wOS0yMyAxNDoxODozNSBFdGMvR01UIjsKCSJiaWQiID0gImNvbS53aG93LmphY2twb3QiOwoJInB1cmNoYXNlLWRhdGUtcHN0IiA9ICIyMDE5LTA5LTIzIDA3OjE4OjM1IEFtZXJpY2EvTG9zX0FuZ2VsZXMiOwp9";
    "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.



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,207 posts
  • Enterprise

Forwarded to Engineering.

 

Rob



[TOPIC: post.html]
#5

colinmorgan

[GLOBAL: userInfoPane.html]
colinmorgan
  • Observer

  • 20 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,207 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

  • 892 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
  • Observer

  • 20 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,207 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

  • 892 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

  • 892 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

  • 892 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_controls]
[/topic_controls]