Post

Replies

Boosts

Views

Activity

Vision Pro app crashes when scene loads in ImmersiveSpace
Hello, I am getting following error on console and my app crashes. It goes to dark and then Apple logo appears and app crashes apply fence tx failed (client=0x61dbbfd7) [0xfffffecc (ipc/mig) server died] [C:3] Error received: Connection interrupted. Failed to commit transaction (client=0x94097449) [0x10000003 (ipc/send) invalid destination port] Failed to commit transaction (client=0xe9684b50) [0x10000003 (ipc/send) invalid destination port] [C:3-1] Error received: Connection interrupted. Failed to commit transaction (client=0xbcac17e9) [0x10000003 (ipc/send) invalid destination port] Failed to commit transaction (client=0x52392119) [0x10000003 (ipc/send) invalid destination port] Failed to commit transaction (client=0xff841d17) [0x10000003 (ipc/send) invalid destination port] Failed to commit transaction (client=0xdef5c915) [0x10000003 (ipc/send) invalid destination port] Failed to commit transaction (client=0xefdc8bf3) [0x10000003 (ipc/send) invalid destination port] Failed to commit transaction (client=0xd50c1eff) [0x10000003 (ipc/send) invalid destination port] Failed to commit transaction (client=0x15690a46) [0x10000003 (ipc/send) invalid destination port] Failed to commit transaction (client=0xf296f56b) [0x10000003 (ipc/send) invalid destination port] Failed to commit transaction (client=0x61dbbfd7) [0x10000003 (ipc/send) invalid destination port] apply fence tx failed (client=0x61dbbfd7) [0x10000003 (ipc/send) invalid destination port] nw_read_request_report [C1] Receive failed with error "No message available on STREAM" nw_read_request_report [C1] Receive failed with error "No message available on STREAM" nw_read_request_report [C1] Receive failed with error "No message available on STREAM" nw_read_request_report [C1] Receive failed with error "No message available on STREAM" nw_read_request_report [C1] Receive failed with error "No message available on STREAM" nw_read_request_report [C1] Receive failed with error "No message available on STREAM" nw_read_request_report [C1] Receive failed with error "No message available on STREAM" nw_read_request_report [C1] Receive failed with error "No message available on STREAM" nw_read_request_report [C1] Receive failed with error "No message available on STREAM" nw_protocol_socket_reset_linger [C1:2] setsockopt SO_LINGER failed [22: Invalid argument] apply fence tx failed (client=0x61dbbfd7) [0x10000003 (ipc/send) invalid destination port] Failed to set override status for bind point component member. Failed to set override status for bind point component member. Failed to set override status for bind point component member. Message from debugger: Terminated due to signal 9 Could you please tell me what's the reason and how can I resolve this. When I loads 2,3 times then app works fine from that point onwards. But this happens time to time when debug.
0
0
266
Sep ’24
Main camera not updating the buffer when comes from background to foreground
Hi, My camera access method is like this func processCameraUpdates() async { print("Process camera called") let formats = CameraVideoFormat.supportedVideoFormats(for: .main, cameraPositions:[.left]) guard let cameraFrameUpdates = cameraFrameProvider.cameraFrameUpdates(for: formats[0]) else { return } for await cameraFrame in cameraFrameUpdates { guard let mainCameraSample = cameraFrame.sample(for: .left) else { continue } pixelBuffer = mainCameraSample.pixelBuffer print("Pixel buffer updated)") } } In my ImmersiveSpace I am calling that method in this way task { // Main camera access await placeManager.processCameraUpdates() } This works fine as long as app is in active / opened / foreground. Once I close the app and re-open, I cannot capture any image. What am I missing here? Do I need to do something when scene become active?
2
0
363
Aug ’24
How to update immersiveSpace from another window
Hi I have 2 views and an Immersive space. 1st and 2nd views are display in a TabView I open my ImmersiveSpace from a button in the 1st view of the tab. Then When I go to 2nd TabView I want to show an attachment in my Immersive space. This attachment should be visible in Immersive space only as long as the user os on the 2nd view. This is what I have done so far struct Second: View { @StateObject var sharedImageData = SharedImageData() var body: some View { VStack { // other code } .onAppear() { Task { sharedImageData.shouldCameraButtonShouw = true } } .onDisappear() { Task { sharedImageData.shouldCameraButtonShouw = false } } } } This is my Immersive space struct ImmersiveView: View { @EnvironmentObject var sharedImageData: SharedImageData var body: some View { RealityView { content, attachments in // some code } update: { content, attachments in guard let controlCenterAttachmentEntity = attachments.entity(for: Attachments.controlCenter) else { return } controlCenterentity.addChild(controlCenterAttachmentEntity) content.add(controlCenterentity) } attachments: { if sharedImageData.shouldCameraButtonShouw { Attachment(id: Attachments.controlCenter) { ControlCenter() } } } } } And this is my Observable class class SharedImageData: ObservableObject { @Published var takenImage: UIImage? = nil @Published var shouldCameraButtonShouw: Bool = false } My problem is, when I am on Second view my attachment never appears. Attachment appears without this if condition. But How can I achieve my goal?
1
0
409
Aug ’24
Main Camera Access on Vision OS
Hello, I have received Enterprise.license from Apple and I am trying to implement main Camera access for Vision Pro by following https://developer.apple.com/videos/play/wwdc2024/10139/. Here is my camera function. func takePicture() async { let formats = CameraVideoFormat.supportedVideoFormats(for: .main, cameraPositions:[.left]) let cameraFrameProvider = CameraFrameProvider() var arKitSession = ARKitSession() var pixelBuffer: CVPixelBuffer? await arKitSession.queryAuthorization(for: [.cameraAccess]) do { try await arKitSession.run([cameraFrameProvider]) } catch { return } guard let cameraFrameUpdates = cameraFrameProvider.cameraFrameUpdates(for: formats[0]) else { return } for await cameraFrame in cameraFrameUpdates { guard let mainCameraSample = cameraFrame.sample(for: .left) else { continue } pixelBuffer = mainCameraSample.pixelBuffer let image = UIImage(ciImage: CIImage(cvPixelBuffer: pixelBuffer!)) print(image) UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil) } } } My problem is debug stops at this line. guard let cameraFrameUpdates = cameraFrameProvider.cameraFrameUpdates(for: formats[0]) else { return } Why does it happen so and what else do I need to do?
1
1
544
Aug ’24
Button in the attachment not clickable after adding BillboardComponent
I created some attachments by following the Diorama Apple example. Things have been working fine. I wanted to add BillboardComponent to my attachments. So I added it in this way guard let attachmentEntity = attachments.entity(for: component.attachmentTag) else { return } guard attachmentEntity.parent == nil else {return} var billBoard = BillboardComponent() billBoard.rotationAxis = [0,1,0] attachmentEntity.components.set(billBoard) content.add(attachmentEntity) attachmentEntity.setPosition([0.0, 0.5, 0.0], relativeTo: entity) My attachment view is like this Text(name) .matchedGeometryEffect(id: "Name", in: animation) .font(titleFont) Text(description) .font(descriptionFont) Button("Done") { viewModel.arrows.remove(at: 0) } } If I remove the BillboardComponent then button click works fine. but with the `BillboardComponent button click doesn't work (not even highlighting when I look at it) in certain directions. How to resolve this issue?
1
0
297
Aug ’24