Post

Replies

Boosts

Views

Activity

Reply to Unfinished transactions not being emitted on start of app
I have the same issue in an app using StoreKit 2. Transaction.updates does not emit unfinished transactions after app launch like the documentation says. I have only one observer, and my code is based on the StoreKit 2 demo code from Apple. (And I have my Store class modeled on Apple's example as a @StateObject on my main SwiftUI view, just like Apple's sample.) If I let a subscription renewal come through while the app is running, Transaction.updates does emit all of the unfinished transaction updates, but it's unrealistic to expect the app to be open in production at the time a subscription renewal occurs. (Transaction.currentEntitlements does show the correct information, but it's concerning that I potentially have so many unfinished transactions.) Does anyone have any other additional info, workarounds/etc.? @itsyusuf did you happen to figure out any fixes for this issue?
Topic: App & System Services SubTopic: StoreKit Tags:
Feb ’23
Reply to SwiftUI MapKit - MapAnnotation - Publishing changes from within view updates is not allowed, this will cause undefined behavior.
OK thanks @MartinMajewski Yeah, in the example above, there's nothing actually using a binding other than $region, but a binding is required for the coordinateRegion on the Map initializer. And it's also just a plain @State property, so nothing even that fancy. Not to confuse the issue, but there are some other areas (other than with the MapKit issue above) where I've seen this same warning that make sense to me and I've eliminated the errors in my code. Here is a YouTube video that made my understanding of it a little more clear: https://www.youtube.com/watch?v=3a7tuhVpoTQ I'm going to assume for now with the MapKit example it's a bug. I just submitted it as an issue in Feedback Assistant in case that helps.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’22
Reply to SwiftUI MapKit - MapAnnotation - Publishing changes from within view updates is not allowed, this will cause undefined behavior.
Just an update for anyone reading here -- my Feedback Assistant bug report for this issue now says "Potential fix identified - For a future OS update"
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to Unfinished transactions not being emitted on start of app
I have the same issue in an app using StoreKit 2. Transaction.updates does not emit unfinished transactions after app launch like the documentation says. I have only one observer, and my code is based on the StoreKit 2 demo code from Apple. (And I have my Store class modeled on Apple's example as a @StateObject on my main SwiftUI view, just like Apple's sample.) If I let a subscription renewal come through while the app is running, Transaction.updates does emit all of the unfinished transaction updates, but it's unrealistic to expect the app to be open in production at the time a subscription renewal occurs. (Transaction.currentEntitlements does show the correct information, but it's concerning that I potentially have so many unfinished transactions.) Does anyone have any other additional info, workarounds/etc.? @itsyusuf did you happen to figure out any fixes for this issue?
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to SwiftUI MapKit - MapAnnotation - Publishing changes from within view updates is not allowed, this will cause undefined behavior.
OK thanks @MartinMajewski Yeah, in the example above, there's nothing actually using a binding other than $region, but a binding is required for the coordinateRegion on the Map initializer. And it's also just a plain @State property, so nothing even that fancy. Not to confuse the issue, but there are some other areas (other than with the MapKit issue above) where I've seen this same warning that make sense to me and I've eliminated the errors in my code. Here is a YouTube video that made my understanding of it a little more clear: https://www.youtube.com/watch?v=3a7tuhVpoTQ I'm going to assume for now with the MapKit example it's a bug. I just submitted it as an issue in Feedback Assistant in case that helps.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22