Re-installing Xcode indeed fixed it for me when dealing with this issue on the simulator.
Post
Replies
Boosts
Views
Activity
Not that it makes things any better or less frustrating, but I got a new computer a few days ago and after setting up Xcode and checking out the app code, I did NOT run into the issue. However, I'm still running into this with my other computer which makes me think that completely reinstalling Xcode might be a way to mitigate it.
The same thing started happening for me after I started running my app on a 18.1 simulator. When running the same code on a 18.0 simulator, it works correctly. I've tried logging in and out multiple times, restarting both simulators and even my computer, tried using different device simulators, but unfortunately nothing seems to help. I'm unsure what to try next other than filing a bug or asking for code-level support.
Actually, I think this is more of a problem with how sandbox testing might work. In fact, listening to Transaction.updates works for a sandbox test user with a cleared purchase history. In my experience the information presented here is not reliable. This page says:
You can choose a subscription renewal rate for each tester to speed up or slow down how often subscriptions renew. Subscriptions renew up to 12 times before auto-renewal turns off on the thirteenth renewal attempt.
This is true for users with a clear purchase history. I would expect that after the auto-renewal subscription has ended, re-subscribing to the same subscription would trigger another 12 auto-renewables. But at this point, the renew rate seems totally random. Sometimes it would renew one or two times but then completely stop. In addition, the listener task code in Transaction.updates posted in the previous posts is not called anymore (if the subscription renews at all), hence my confusion.
Thanks a lot for coming back to me. The sample code for Transaction.updates looks very similar, albeit not identical to the listener task code in the SKDemo app provided as part of the session you linked to.
func listenForTransactions() -> Task<Void, Error> {
return Task.detached {
for await result in Transaction.updates {
do {
let transaction = try self.checkVerified(result)
//Deliver products to the user.
await self.updateCustomerProductStatus()
//Always finish a transaction.
await transaction.finish()
} catch {
//StoreKit has a transaction that fails verification. Don't deliver content to the user.
print("Transaction failed verification")
}
}
}
}
I can see how this code is executed whenever the subscription status changes triggered by an event outside the app. However, in my case, it's never called when the app enters the foreground and the current date is past the subscription's expiration date.
Apparently there is a problem in CloudKit with re-indexing records after the index has been altered. I can filter new records (added after the queryable field was added to the index) successfully, but "old" records continue to be ignored. I don't see any option in the CloudKit dashboard to force re-indexing.
The price you pay for giving away control of your backend.
My app update was previously rejected because of this as well.
I left the review team a comment in the resolution center asking if they are testing on a simulator. I added that if that's the case I don't think the problem is in my code and pointed to this forum post.
One or two days later my update was approved. Maybe that's useful for you being in the same situation (I know it's kind of sad).
Same problem here- I implemented the Apple Sign in exactly like it is recommended on the developer websites. - https://developer.apple.com/documentation/authenticationservices/implementing_user_authentication_with_sign_in_with_apple?language=data
I'm using Xcode 12.1 and neither the delegate functions of ASAuthorizationControllerDelegate nor ASAuthorizationControllerPresentationContextProviding are called at all.
The worst part is that my app has been rejected already twice and I'm spending a whole of time on problems I'm more and more sure I haven't introduced.