State restoration across devices
You support the same music playback screen on iPhone, iPad, and CarPlay. When the app has been terminated and a scene reconnects, what would you restore the playing state from?
You support the same music playback screen on iPhone, iPad, and CarPlay. When the app has been terminated and a scene reconnects, what would you restore the playing state from?
Save the current track id, the playback position in seconds, and the queue order with a version to disk instead of the screen objects, and when the scene reconnects, look the track up in the library again by that identifier and line the audio engine and the screen up with it.
App lifecycle and systemShort answerExpert
Users complain that when they're writing a long post and step out to another app, what…
#state-restoration
App lifecycle and systemShort answerExpert
You're building a digital car key app. When the user walks up to the car with the phone…
#state-restoration
App lifecycle and systemShort answerIntro
In a scene-based iOS app, where would you put work like registering the push token, and…
#scene
SwiftUIShort answerIntro
In a SwiftUI app, what does @main mean?
#scene