This really sounds like a bug - I’d encourage you to submit a Feedback with the above sample code - limited time to get bugs fixed in this release cycle!
Since I wrote the above post, I've been trying to get it to work with the focus system and it feels like I'm so close, just can't quite get it there.
If anyone has any tips, they would be much appreciated.
This is not currently supported by TabView.
I'd suggest you file a feedback asking for this functionality.
If you really do need this, you'd need to implement it yourself, perhaps by custom wrapping UITabBarController but that'll be a bit of work depending on how many features you need.
Yeah, I actually opened a DTS case for this and while it hasn't been updated in awhile, I basically got the vibe that there wasn't totally complete API support for what I wanted to do.
I don't know of a specific tutorial but basically what you want to do is to define a model with these properties that is "Codable" (you can look this up - it will help you move back and forth between instances of the model and the JSON data) and then use URLSession to get data from the network and tell JSONDecoder to use your codable model to decode the data. The model specification and networking code is probably ~20 lines of code total, maybe less. Then you can use it with SwiftUI or in any other way needed.
I only run it when I know I've changed something.
As far as technique, you need to be really thoughtful with your CloudKit schema since you are limited in what can change in production.
Go watch the session from this year, Evolve your Core Data schema, for some suggestions and thoughts.
I had this issue and for my, the fix was to use the builder syntax in the AppShortcutsProvider, not returning an array.
https://gist.github.com/HunterHillegas/92839a14c2b24572f6ff2aca0460f3c5
No, you're not missing anything. This came up several times in the Slack-based Tech Talk chats too... Your choices are push notifications or background tasks. If you use background tasks you have very very little control over when they run. I eventually gave up and setup a very basic push system to do what I wanted and that works great. Basic push is pretty simple to do - I'd strongly recommend going down that road even if it's something where you really shouldn't need it.
This really sounds like a bug - I’d encourage you to submit a Feedback with the above sample code - limited time to get bugs fixed in this release cycle!
Since I wrote the above post, I've been trying to get it to work with the focus system and it feels like I'm so close, just can't quite get it there.
If anyone has any tips, they would be much appreciated.
This is not currently supported by TabView.
I'd suggest you file a feedback asking for this functionality.
If you really do need this, you'd need to implement it yourself, perhaps by custom wrapping UITabBarController but that'll be a bit of work depending on how many features you need.
Yeah, I actually opened a DTS case for this and while it hasn't been updated in awhile, I basically got the vibe that there wasn't totally complete API support for what I wanted to do.
I don't know of a specific tutorial but basically what you want to do is to define a model with these properties that is "Codable" (you can look this up - it will help you move back and forth between instances of the model and the JSON data) and then use URLSession to get data from the network and tell JSONDecoder to use your codable model to decode the data. The model specification and networking code is probably ~20 lines of code total, maybe less. Then you can use it with SwiftUI or in any other way needed.
I only run it when I know I've changed something.
As far as technique, you need to be really thoughtful with your CloudKit schema since you are limited in what can change in production.
Go watch the session from this year, Evolve your Core Data schema, for some suggestions and thoughts.
I had this issue and for my, the fix was to use the builder syntax in the AppShortcutsProvider, not returning an array.
https://gist.github.com/HunterHillegas/92839a14c2b24572f6ff2aca0460f3c5
No, you're not missing anything. This came up several times in the Slack-based Tech Talk chats too... Your choices are push notifications or background tasks. If you use background tasks you have very very little control over when they run. I eventually gave up and setup a very basic push system to do what I wanted and that works great. Basic push is pretty simple to do - I'd strongly recommend going down that road even if it's something where you really shouldn't need it.