Post

Replies

Boosts

Views

Activity

Reply to Simulator won't sync with CloudKit since Xcode 14
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.
Nov ’24
Reply to Detect a subscription has expired
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.
Oct ’22
Reply to Detect a subscription has expired
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.
Oct ’22
Reply to Can't filter records by creation timestamp
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.
Oct ’22
Reply to Sign In With Apple not working with Xcode 12 beta on simulator ?
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).
Oct ’20
Reply to Sign In With Apple not working with Xcode 12 beta on simulator ?
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.
Oct ’20