After re-launching the immersive space in my app 5-10 times, the WorldTrackingProvider stops working. Only restarting the app will allow it to start working again.
Only on device, not the simulator.
I get these errors when it happens:
The device_anchor can only be queried when the world tracking provider is running.
ARPredictorRemoteService <0x107cbb5e0>: Service configured with error: Error Domain=com.apple.arkit.error Code=501 "(null)"
Remote Service was invalidated: <ARPredictorRemoteService: 0x107cbb5e0>, will stop all data_providers.
ARRemoteService: remote object proxy failed with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 81 named com.apple.arkit.service.session was invalidated from this process." UserInfo={NSDebugDescription=The connection to service with pid 81 named com.apple.arkit.service.session was invalidated from this process.}
ARRemoteService: weak self released before invalidation
@Observable class VisionPro {
let session = ARKitSession()
let worldTracking = WorldTrackingProvider()
func transformMatrix() async -> simd_float4x4 {
guard let deviceAnchor = worldTracking.queryDeviceAnchor(atTimestamp: CACurrentMediaTime())
else { return .init() }
return deviceAnchor.originFromAnchorTransform
}
func runArkitSession() async {
Task {
try? await session.run([worldTracking])
}
}
}
which I call from my RealityView:
.task {
await visionPro.runArkitSession()
}
Post
Replies
Boosts
Views
Activity
When opening the Game Center dashboard via the Access Point, the Game Center dashboard appears BEHIND any content in the window with z depth (default type not volumetric). It obscures the dashboard and this makes it unusable.
Alerts have the same placement.
The new defaultWindowPlacement would probably suffice, but I don't think there's a way to apply that to the Game Center window.
What to do?
Thanks.
I'm dynamically creating anywhere from 10-50 attachments in an immersive view by looping through an array.
When there are 10-20 attachments -> no problem, all attachments appear fine.
Where there are more than ~40 attachments -> ~25% of them never show up. The ones that don't show up are random and change each time the immersive view is loaded.
Never had a problem in visionOS 1 so wondering if this is a bug or what's going on here. Nothing in the console that would indicate a problem.
Thanks
GKLocalPlayer.local.authenticateHandler = {viewController, error in
When authenticating a player using authenticateHandler, the completion handler is only called if the player is already logged in. If the player is not logged in, the authentication window will appear but the completion handler is never called.
If I have content in a volumetric window that obscures the login window (which appears at a slight Z increase from the parent window), what can I do? If the completion handler was being called then I could make adjustments to my view, but it never gets called if the user is not already logged in.
https://developer.apple.com/documentation/gamekit/authenticating_a_player
Thanks.