@Graphics and Games Engineer First off, appreciate all the hard work from the dev team as well as for the update.
I'm getting a warning that says "Unknown Part" for the camera and depth data is not being collected by the lidar sensor. I went to the Apple store thinking I needed a repair, but a staff member there told me that it's because I'm running iOS 17 beta (latest version on iPhone 13 Pro Max) and it's likely a calibration bug. Is he right? I can't run the sample code (or any code that uses depth) and could use an assist, please.
Post
Replies
Boosts
Views
Activity
Regarding the errors about $feedback and $state, the implementation of the ObjectCaptureSession was changed to use the AsyncSequence protocol instead of the original Combine publishers. The AsyncSequences I'm referring to are stored under two new properties called feedbackUpdates and stateUpdates, respectively. Here are the changes I made to fix those two errors:
private var subscriptions = Set<Task<(), Never>>()
@MainActor
private func attachListeners() {
logger.debug("Attaching listeners...")
guard let model = objectCaptureSession else {
fatalError("Logic error")
}
let feedbackUpdatesTask = Task { [weak self] in
for await newFeedback in model.feedbackUpdates {
self?.updateFeedbackMessages(for: newFeedback)
}
}
subscriptions.insert(feedbackUpdatesTask)
let stateUpdatesTask = Task { [weak self] in
for await newState in model.stateUpdates {
self?.onStateChanged(newState: newState)
}
}
subscriptions.insert(stateUpdatesTask)
}
private func detachListeners() {
logger.debug("Detaching listeners...")
for sub in subscriptions {
sub.cancel()
}
subscriptions = Set<Task<(), Never>>()
}
The other errors, however, are much more annoying. ObjectCaptureSession is no longer an ObservableObject, so the entire app has to be reworked to account for that shift. I refactored it to access it directly from the appModel EnvironmentObject instead and the app ran, but the reconstruction phase crashed, so I think getting the demo app might require a rewrite to make sure that the code doesn't depend on the session being an observed object. My guess is that's what the Apple dev team is currently doing since I can't find the demo app in the docs table of contents right now (though the link is still accessible). I just wish they'd be more transparent about these things with alerts in the docs above the sample code instead of simply hiding the links.