We also faced the issue, any update recently ?
Post
Replies
Boosts
Views
Activity
Hello,
We tried the method in the demo, it works.
I just list our code used before, could you help check this is a iOS or Xcode compatibility issue or we used wrong method.
before we just used following api to make it work:
{
if (@available(iOS 13.0, *)) {
if ([self.mu_captureSession canAddInput:self.front_deviceInput]) {
[self.mu_captureSession addInput:self.front_deviceInput];
}
if ([self.mu_captureSession canAddOutput:self.front_videoDataOutput]) {
[self.mu_captureSession addOutput:self.front_videoDataOutput];
}
if ([self.mu_captureSession canAddInput:self.back_deviceInput]) {
[self.mu_captureSession addInput:self.back_deviceInput];
}
if ([self.mu_captureSession canAddOutput:self.back_videoDataOutput]) {
[self.mu_captureSession addOutput:self.back_videoDataOutput];
}
}
}
Now on xcode 14 with iOS 16, we need use extra API AVCaptureInputPort & addConnection API to make it work (like demo code)
- (void)initCaptureSession
{
if (@available(iOS 13.0, *)) {
if ([self.mu_captureSession canAddInput:self.front_deviceInput]) {
[self.mu_captureSession addInput:self.front_deviceInput];
}
if ([self.mu_captureSession canAddOutput:self.front_videoDataOutput]) {
[self.mu_captureSession addOutput:self.front_videoDataOutput];
}
if ([self.mu_captureSession canAddInput:self.back_deviceInput]) {
[self.mu_captureSession addInputWithNoConnections:self.back_deviceInput];
}
if ([self.mu_captureSession canAddOutput:self.back_videoDataOutput]) {
[self.mu_captureSession addOutputWithNoConnections:self.back_videoDataOutput];
AVCaptureInputPort * backCameraVideoPort = [self.back_deviceInput portsWithMediaType:AVMediaTypeVideo sourceDeviceType:self.back_device.deviceType sourceDevicePosition:self.back_device.position].firstObject;
AVCaptureConnection *backCameraVideoDataOutputConnection = [AVCaptureConnection connectionWithInputPorts:@[backCameraVideoPort] output:self.back_videoDataOutput];
if([self.mu_captureSession canAddConnection:backCameraVideoDataOutputConnection]){
[self.mu_captureSession addConnection:backCameraVideoDataOutputConnection];
}
}
}
}
Hello,
We tried the method in the demo, it works.
I just list our code used before, could you help check this is a iOS or Xcode compatibility issue or we used wrong method.
before we just used following api to make it work:
(void)initCaptureSession
{
if (@available(iOS 13.0, *)) {
if ([self.mu_captureSession canAddInput:self.front_deviceInput]) {
[self.mu_captureSession addInput:self.front_deviceInput];
}
if ([self.mu_captureSession canAddOutput:self.front_videoDataOutput]) {
[self.mu_captureSession addOutput:self.front_videoDataOutput];
}
if ([self.mu_captureSession canAddInput:self.back_deviceInput]) {
[self.mu_captureSession addInput:self.back_deviceInput];
}
if ([self.mu_captureSession canAddOutput:self.back_videoDataOutput]) {
[self.mu_captureSession addOutput:self.back_videoDataOutput];
}
}
}
Now on xcode 14 with iOS 16, we need use extra API AVCaptureInputPort & addConnection API to make it work (like demo code)
(void)initCaptureSession
{
if (@available(iOS 13.0, *)) {
if ([self.mu_captureSession canAddInput:self.front_deviceInput]) {
[self.mu_captureSession addInput:self.front_deviceInput];
}
if ([self.mu_captureSession canAddOutput:self.front_videoDataOutput]) {
[self.mu_captureSession addOutput:self.front_videoDataOutput];
}
if ([self.mu_captureSession canAddInput:self.back_deviceInput]) {
[self.mu_captureSession addInputWithNoConnections:self.back_deviceInput];
}
if ([self.mu_captureSession canAddOutput:self.back_videoDataOutput]) {
[self.mu_captureSession addOutputWithNoConnections:self.back_videoDataOutput];
AVCaptureInputPort * backCameraVideoPort = [self.back_deviceInput portsWithMediaType:AVMediaTypeVideo sourceDeviceType:self.back_device.deviceType sourceDevicePosition:self.back_device.position].firstObject;
AVCaptureConnection *backCameraVideoDataOutputConnection = [AVCaptureConnection connectionWithInputPorts:@[backCameraVideoPort] output:self.back_videoDataOutput];
if([self.mu_captureSession canAddConnection:backCameraVideoDataOutputConnection]){
[self.mu_captureSession addConnection:backCameraVideoDataOutputConnection];
}
}
}
}
The issue is already fixed by apple.
We also have same issue.
we got same issue, commit two release to test flight, all was rejected by apple