Streaming is available in most browsers,
and in the Developer app.
-
Introducing enterprise APIs for visionOS
Find out how you can use new enterprise APIs for visionOS to create spatial experiences that enhance employee and customer productivity on Apple Vision Pro.
Chapters
- 0:00 - Introduction
- 2:36 - Enhanced sensor access
- 11:38 - Platform control
- 18:39 - Best practices
Resources
Related Videos
WWDC24
-
DownloadArray
-
-
3:36 - Main Camera Feed Access Example
// Main Camera Feed Access Example 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 } self.pixelBuffer = mainCameraSample.pixelBuffer }
-
7:47 - Spatial barcode & QR code scanning example
// Spatial barcode & QR code scanning example await arkitSession.queryAuthorization(for: [.worldSensing]) let barcodeDetection = BarcodeDetectionProvider(symbologies: [.code39, .qr, .upce]) do { try await arkitSession.run([barcodeDetection]) } catch { return } for await anchorUpdate in barcodeDetection.anchorUpdates { switch anchorUpdate.event { case .added: // Call our app method to add a box around a new barcode addEntity(for: anchorUpdate.anchor) case .updated: // Call our app method to move a barcode's box updateEntity(for: anchorUpdate.anchor) case .removed: // Call our app method to remove a barcode's box removeEntity(for: anchorUpdate.anchor) } }
-
13:17 - Apple Neural Engine access example
// Apple Neural Engine access example let availableComputeDevices = MLModel.availableComputeDevices for computeDevice in availableComputeDevices { switch computeDevice { case .cpu: setCpuEnabledForML(true) // Example method name case .gpu: setGpuEnabledForML(true) // Example method name case .neuralEngine: runMyMLModelWithNeuralEngineAvailable() // Example method name default: continue } }
-
15:39 - Object tracking enhancements example
// Object tracking enhancements example var trackingParameters = ObjectTrackingProvider.TrackingConfiguration() // Increasing our maximum items tracked from 10 to 15 trackingParameters.maximumTrackableInstances = 15 // Leaving all our other parameters at their defaults trackingParameters.maximumInstancesPerReferenceObject = 1 trackingParameters.detectionRate = 2.0 trackingParameters.stationaryObjectTrackingRate = 5.0 trackingParameters.movingObjectTrackingRate = 5.0 let objectTracking = ObjectTrackingProvider( referenceObjects: Array(referenceObjectDictionary.values), trackingConfiguration: trackingParameters) var arkitSession = ARKitSession() arkitSession.run([objectTracking])
-
-
Looking for something specific? Enter a topic above and jump straight to the good stuff.
An error occurred when submitting your query. Please check your Internet connection and try again.