Support external cameras in your iPadOS app

RSS for tag

Discuss the WWDC23 Session Support external cameras in your iPadOS app

View Session

Posts under wwdc2023-10106 tag

7 Posts
Sort by:
Post not yet marked as solved
1 Replies
784 Views
Hi, I am trying to use the AVCam sample app code (latest as of 19 Jul 2023 from here - https://developer.apple.com/documentation/avfoundation/capture_setup/avcam_building_a_camera_app) Test setup: iPad Pro 11" 4 Gen running iPadOS 17 (public beta). Xcode 15 beta 4 to use the iPad as the run destination (wireless mode). An external USB webcam is connected to the iPad during the test. This camera is working when I test using the FaceTime app. I am able to build and run the app on the iPad, however I get the following error when the external camera is selected for video capture. Capture session runtime error: related decl 'e' for AVError(_nsError: Error Domain=AVFoundationErrorDomain Code=-11819 "Cannot Complete Action" UserInfo={NSLocalizedDescription=Cannot Complete Action, NSLocalizedRecoverySuggestion=Try again later.}) Error Code = AVError(rawValue: -11819) From the code the error points to "mediaServicesWereReset" error. I am unable to figure out what is the cause of this error. Can someone help regarding this? Thanks!
Posted
by usbapps.
Last updated
.
Post not yet marked as solved
2 Replies
710 Views
I was hopeful that I would be able to record video from an external action camera such as the DJI Action Cam 3. The DJI action cam has a webcam mode that can be enabled as soon as one plugs it to a device, such as a macbook or an iPad. On the Macbook, the DJI shows up as an external camera for use in facetime or quicktime. But when I plug it into the iPad and use the AVCam sample from here, I notice that the camera preview comes up when the AVCam app is in photo mode but as soon as I switch the video mode, the preview layer hangs. No error message or AVCaptureSession errors that I could see. The same code works when using the Apple studio as an external camera. Curious if anyone has had any luck figuring this out? So near yet so far.
Posted
by krissb78.
Last updated
.
Post marked as solved
1 Replies
638 Views
Configuration: iPad Pro (10.5-inch) iPadOS 17 beta 4 USB USV Camera Nexigo N940P 2K Apple Lightning to USB 3 Camera Adapter Attaching the adapter to the iPad caused it to update driver software - so far ok Next attached USB Camera to adapter and iPad complained "Not Enough Power ...". Attached power to lighting port of adapter. Above warning cleared. FaceTime didn't recognize the External Camera. I went through the usual unplug routine with no luck. Xcode sees the iPad so I executed the Objective-C version of AVCam from the presentation and added breakpoints at "AVCaptureDeviceDiscoverySession *externalVideoDeviceDiscoverySession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:@[AVCaptureDeviceTypeExternal] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];" The externalVideoDeviceDiscoverySession shows no attached camera. Does anyone have a suggestion for debugging this? Or share your working setup? Thanks!
Posted
by fmcclain.
Last updated
.
Post not yet marked as solved
3 Replies
922 Views
Hi, I saw a presentation / demonstration of AVCam app being modified to use any external USB camera in this video (https://developer.apple.com/videos/play/wwdc2023/10106/). The presenter mentions that the sample code will be available for download, however I am unable to find the same. Can someone point me to the mentioned sample code? Thanks!
Posted
by usbapps.
Last updated
.
Post not yet marked as solved
3 Replies
592 Views
Great to have this new capability. I downloaded the sample App but none of the code from the presentation was in the code. It appears to be the older version from 2019 or 2020. Will the code from the presentation be made available? Thanks, Chris
Posted Last updated
.
Post not yet marked as solved
0 Replies
828 Views
In session wwdc2023-10106, it was explained that "iPads with USB-C connectors support external cameras." I’m working on an iPadOS App for only iPads that support these features. I would like to give a requirement using the UIRequiredDeviceCapabilities key so that users with unsupported iPads do not accidentally download the app from the App Store. I have picked out a few candidates from the existing keys that could be used to accomplish this purpose. driverkit This key is a good choice, but it cannot support iPad (10th gen.), iPad mini (6th gen.), iPad Air (4th gen.), 11-in. iPad Pro (1st and 2nd gen.) and 12.9-in. iPad Pro (3rd and 4th gen.), even though these iPads have a USB-C connector. iphone-ipad-minimum-performance-a12 This is a very close choice for this key. This includes all iPads with a USB-C connector. However, this also includes iPads with a Lightning connector: iPad (9th gen.), iPad Air (3rd gen.), and iPad mini (5th gen.). Is there a more appropriate UIRequiredDeviceCapabilities key that resolves the above two issues? Also, is it possible to use external cameras on an iPad with a Lightning connector by using a "Lightning to USB 3 Camera Adapter" or "Lightning to USB Camera Adapter"?
Posted Last updated
.