GithubHelp home page GithubHelp logo

Comments (45)

syzlztt avatar syzlztt commented on May 28, 2024 4

I think Apple fixed this bug in iOS 16.0.3 .

from swiftystorekit.

sabiland avatar sabiland commented on May 28, 2024 3

FYI, it’s also in Production environment.
As recommended, I have refactored first of my apps to StoreKit2 with the help of Mercato git library.

from swiftystorekit.

mercadodiego avatar mercadodiego commented on May 28, 2024 3

Guys I finally migrated to StoreKit2 and it was more easy than expected. Also I had important issues with Testflight versions and the damn sandbox server. So I finally figure out that after doing a phone reset and using a single apple id (don't ever change it if you can) everything worked as expected. Hope it helps

from swiftystorekit.

CH3COOH avatar CH3COOH commented on May 28, 2024 3

I have confirmed that it works with Xcode 14.1 RC2, iOS 16.1 and a combination of TestFlight and SwiftyStoreKit, and my app was able to restore.

I would appreciate it if you could also check if you are having this issue.

from swiftystorekit.

joseph2166 avatar joseph2166 commented on May 28, 2024 2

I can confirm that this is happening on iOS 16 even when build with Xcode 13.

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024 1

Can everyone here comment their bitcode configurations? This may actually be the issue here. Checked with another app so so far we have

App Bitcode? Xcode 14? SSK iOS 14?
Reiszecke 1
Reiszecke 2
Arthur 1

@sabiland I'm not sure if I understood what apps of yours are bitcode and which ones aren't - can you elaborate the missing info?

| Sabi 1 |  |  | 
| Sabi 2 |  |  | 
| Sabi 3 |  |  | 

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024 1

If I understood correctly you didn't have any issues in your non-bitcode app. I think that's the key, you don't need to do anything on your end I guess. SSK is pretty much on hold anyway.

I moved away from SSK to SK2 now because I couldn't afford messing around with build settings etc. and releasing a potentially breaking update so I have released whatever worked with TestFlight (automatic Sandbox) accounts and released that.

from swiftystorekit.

sabiland avatar sabiland commented on May 28, 2024 1

I refactored 3 my apps to Mercato, no problems so far. Though I only use 1 non-consumable IAP.

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024

Yes, there seems to be an issue with iOS 16 https://developer.apple.com/forums/thread/713533

Now I'm not sure if that's a bug on their side that they are going to fix or if some parameters have changed, leading to SwiftyStoreKit not recognizing the data the App Store sends

from swiftystorekit.

CH3COOH avatar CH3COOH commented on May 28, 2024

I have tried the SwiftyStoreKit demo app with Xcode 14.1 Beta 1, but the callback is not called after restoring.

Does this problem occur only in the Sandbox environment?

from swiftystorekit.

mercadodiego avatar mercadodiego commented on May 28, 2024

I can confirm that happens, not on all the devices.

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

I have apps that rely on SwiftyStoreKit and running directly on device and also through Testflight I can purchase and restore with no problems (testing on iPhone 11 Pro, iOS 16.0).

Could you please share more details about your test environment?

from swiftystorekit.

sabiland avatar sabiland commented on May 28, 2024

After I built my apps (no changes in the code) with Xcode Version 14.0 (14A309), pushed them to AppStore, restore purchases stoped working. I have iPhone 13 Pro (tested it directly on it)

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

After I built my apps (no changes in the code) with Xcode Version 14.0 (14A309), pushed them to AppStore, restore purchases stoped working.

Does it work on Testflight?

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024

It's not the Xcode version, my builds are not submitted with Xcode 14

from swiftystorekit.

sabiland avatar sabiland commented on May 28, 2024

Does it work on Testflight?

Nope. (TestFlight == production right?)

(as suggested on main repo site - I migrated to StoreKit 2 all of my apps)

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

Which version of SwiftyStoreKit are you using?

I'm using cocoapods: pod 'SwiftyStoreKit', '0.15.0'

from swiftystorekit.

sabiland avatar sabiland commented on May 28, 2024

Which version of SwiftyStoreKit are you using?

Always latest/updated as Swift package.

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

I was planning to release an updated version built with Xcode 14 but I guess I'll wait a while then

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024

https://zenn.dev/ch3cooh/scraps/5a907126170634 (use Google Translate to translate the page) has some more insight on this. The most important bit is that one:

I confirmed that the callback of paymentQueueController.restorePurchases was not returned.

    fileprivate func restorePurchases(atomically: Bool = true, applicationUsername: String = "", completion: @escaping (RestoreResults) -> Void) {
        
        paymentQueueController.restorePurchases(RestorePurchases(atomically: atomically, applicationUsername: applicationUsername) { results in
            
            let results = self.processRestoreResults(results)
            completion(results)
        })
    }

I've kind of given up on the whole SwiftyStoreKit thing but now that this person has been able to estimate a cause there may actually be some hope

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024

@CH3COOH sorry for the tag, just found your GH - what's your status now? Did you figure out anything else regarding SwiftyStoreKit or did you drop it entirely and go fully StoreKit 2?

from swiftystorekit.

CH3COOH avatar CH3COOH commented on May 28, 2024

I investigated the success or failure of the combination of Xcode and Testflight/AppStore. I was able to restore if I used a combination of Xcode 14 and App Store. I am installing SwiftyStoreKit with Carthage.

Xcode iOS source restore app
13.4.1 16 App Store OK MyApp P
13.4.1 16 App Store OK MyApp S
13.4.1 16 Testflight NG🙅‍♂️ MyApp P
13.4.1 16 Testflight NG🙅‍♂️ MyApp S
13.4.1 15.7 App Store OK MyApp P
13.4.1 15.7 App Store OK MyApp S
13.4.1 15.7 Testflight OK MyApp S
13.4.1 14.8 Testflight OK MyApp S
14.0 16 App Store OK🙆 MyApp F
14.0 16 Testflight NG🙅‍♂️ MyApp F
14.0 16 Testflight NG🙅‍♂️ MyApp P
14.0 16 Xcode Debug NG🙅‍♂️ SwiftyStoreKit demo app
14.1 Beta 16 Xcode Debug NG🙅‍♂️ SwiftyStoreKit demo app

from swiftystorekit.

CH3COOH avatar CH3COOH commented on May 28, 2024

@Reiszecke

This bug is that restoreCompletedTransactionsFailedWithError or paymentQueueRestoreCompletedTransactionsFinished in PaymentQueueController is not called.

func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error) {
restorePurchasesController.restoreCompletedTransactionsFailed(withError: error)
}
func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) {
restorePurchasesController.restoreCompletedTransactionsFinished()
}

However, we were unable to discover why the callback was not called in the case of the combination of Xcode 14 and Testflight.

I would like to fix SwiftyStoreKit, but I have no knowledge of StoreKit 1 and cannot fix it. If I can't fix it after investigating for a while, I would like to move to StoreKit 2.

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

I still haven't been able to reproduce this error with my apps, I just tested submitting new builds to TestFlight integrating SwiftyStoreKit from Carthage and SPM and both work fine for me too on my iPhone 11 Pro.

Maybe this problem could be related to the App Store region that you're using? My Apple ID account is Brazilian, with BRL as currency.

I'll submit one build to TestFlight review and share a link here so you can test if it is hanging on your devices

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024

@CH3COOH thank you for the insights - we have moved to SK2 now. Testing is a real pain but hopefully everything is going to work out now. Good luck to you too!

@ArthurAlvarez It's hard for me to estimate but I'd say I don't see this problem with all devices if I consider purchases and support requests.

You can do the link-sharing and I can tell you whether it worked or not if that helps you. I will probably say bye to SSK but not because I think it's at fault - it's because I think the issue is very likely with SK1, it seems like Apple tried to touch something they shouldn't have touched for iOS 16. Otherwise it doesn't make sense why iOS 16 behaves differently than iOS 15.

What's odd is that I can hardly find any other reports. I'd guess more than 90% of the apps on the App Store are on SK1 or on a library that depends on it.

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024

@joseph2166

I can confirm that this is happening on iOS 16 even when build with Xcode 13.

This is what I don't understand. It doesn't seem to affect everyone for some reason. Do you have bitcode enabled in your apps?

from swiftystorekit.

sabiland avatar sabiland commented on May 28, 2024

@Reiszecke Testing SK2 with Xcode 14 is quite easy using StoreKit configuration file. Check it on google.

FYI, I also disabled Bitcode on my apps as suggested by Xcode 14.

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

Here is the Testflight link:
https://testflight.apple.com/join/kRV7inhy

In my device (iPhone 11 Pro - iOS 16.0) this build is restoring OK. Please check on your devices so we can try to determine if the problem is build-related.

Can someone also provide a Testflight link of some app that is failing to restore?

from swiftystorekit.

joseph2166 avatar joseph2166 commented on May 28, 2024

Here is the Testflight link: https://testflight.apple.com/join/kRV7inhy

In my device (iPhone 11 Pro - iOS 16.0) this build is restoring OK. Please check on your devices so we can try to determine if the problem is build-related.

Can someone also provide a Testflight link of some app that is failing to restore?

As per the screenshot feedback I just sent through TestFlight, I’m just getting a spinning green Buy button

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024

Green button spun for 10 seconds (probably SK TF Sandbox delay)

I have first tried restoring because why not, did not work. Then I have purchased, purchase went through, was recognized. I have uninstalled, restored again, worked again.

iPhone SE 3rd gen iOS 16.

What's your dev machine setup? OS, Xcode version and bitcode enabled/disabled?

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

As per the screenshot feedback I just sent through TestFlight, I’m just getting a spinning green Buy button

Please wait a while for it to fetch the product. I don't know why but it is slow on TestFlight environment.

What's your dev machine setup? OS, Xcode version and bitcode enabled/disabled?

Macbook with M1 Pro processor, macOS Monterey, Xcode 14.0 (14A309), bitcode disabled

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

So we don't have any development on this... Are you all moving away from SwiftyStoreKit or this problem just happens in Sandbox?

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

If I understood correctly you didn't have any issues in your non-bitcode app. I think that's the key, you don't need to do anything on your end I guess. SSK is pretty much on hold anyway.

I moved away from SSK to SK2 now because I couldn't afford messing around with build settings etc. and releasing a potentially breaking update so I have released whatever worked with TestFlight (automatic Sandbox) accounts and released that.

Just for curiosity, are you using a library that wraps SK2 or implementing it directly?

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024

Was thinking about using tikhop/Mercato#4 but the issue sounded too risky, so it's native SK2 without any library. RevenueCat is also fairly simple to add however if you browse through their forums, they have also messed up something in their code more than once so far so that's another risk I would only take for a temporary hotfix. In other words unless we see any issues with native SK2 it's probably the best decision to bite the bullet and move over to SK2. Testing is still an absolute nightmare tho.

About adding the code; SK2 really is much simpler than SK1 - the implementation code amount required is fairly similar to SSK. I think Apple could've made this A LOT simpler still by simply providing a singleton that has getters for each IAP identifier but I doubt there will ever be a SK3 so it probably won't get better than this, ever

from swiftystorekit.

Reiszecke avatar Reiszecke commented on May 28, 2024

Yeah I'm simply afraid of Mercato breaking in future just like SSK broke for some reason. Users are (understandably) very sensitive when it comes to purchase errors, they are quick to call you a scam etc. so the risk of using a lib with 41 stars was too high for me this time.

from swiftystorekit.

rockylive avatar rockylive commented on May 28, 2024

I'm also facing this issue running on Xcode 14. Restore hangs

from swiftystorekit.

sabiland avatar sabiland commented on May 28, 2024

Yeah I'm simply afraid of Mercato breaking in future just like SSK broke for some reason.

It seems SK2 is quite easy for manually to implement and as I checked Mercato code, it’s also quite straightforward.

And another thing (I did not know about this until recently), IAP can so easily be tested locally with StoreKit configuration file.

from swiftystorekit.

ArthurAlvarez avatar ArthurAlvarez commented on May 28, 2024

And another thing (I did not know about this until recently), IAP can so easily be tested locally with StoreKit configuration file.

This Xcode testing also works with SK1, I have tested my app both with SSK and using this Mercato Library and one thing that I found is that when SSK restores a purchase, instead of only validating the existing transaction, it creates a new transaction with the same ID of the original one, so if you restore a bunch of times you will end up with a lot of transactions on the debug menu.

Maybe this behavior could be a hint to the problem

from swiftystorekit.

mercadodiego avatar mercadodiego commented on May 28, 2024

I would like to add that I published this using Version 14.0.1 (14A400). Also our CI Server has an outdated version and I think that was an issue too.

from swiftystorekit.

astrokin avatar astrokin commented on May 28, 2024

@mercadodiego as far as i understand the issue was not in code but in the environment?

from swiftystorekit.

CH3COOH avatar CH3COOH commented on May 28, 2024

The combination of Xcode 14.0, iOS 16.0.3 and Testflight did not fix this problem...

from swiftystorekit.

mercadodiego avatar mercadodiego commented on May 28, 2024

The combination of Xcode 14.0, iOS 16.0.3 and Testflight did not fix this problem...

Yep, that's why I had to migrate to StoreKit2

from swiftystorekit.

mercadodiego avatar mercadodiego commented on May 28, 2024

@mercadodiego as far as i understand the issue was not in code but in the environment?

@CH3COOH after I migrated to StoreKit2 I found issues with the environment as I described above. A factory reset seems to resolve the issue I was having only on my phone.

from swiftystorekit.

powhu avatar powhu commented on May 28, 2024

I have confirmed that it works with Xcode 14.1 RC2, iOS 16.1 and a combination of TestFlight and SwiftyStoreKit, and my app was able to restore.
I would appreciate it if you could also check if you are having this issue.

Confirmed.
Xcode 14.1, iOS 16.1 TestFlight fixed.

from swiftystorekit.

frogg avatar frogg commented on May 28, 2024

Is there any info on restoring one-time purchases on macOS 13?
Seems like this is fixed on iOS 16.2, but not on macOS 13.1?

from swiftystorekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.