CameraView icon indicating copy to clipboard operation
CameraView copied to clipboard

[BUG]UI Controls disappear after app suspended

Open SpiraMira opened this issue 11 months ago • 3 comments

After I suspended the demo app on my phone, most UI controls/views disappear when resumed (except for the full screen preview).

To rule out the demo app, I replaced it with a simple contentView:

struct ContentView: View {
    @State private var shouldShowCamera: Bool = false

    var body: some View {
        ZStack { if shouldShowCamera {
            MCamera()
                .lockCameraInPortraitOrientation(AppDelegate.self)
                .setCameraOutputType(.photo)
                .setCloseMCameraAction(closeMCameraAction)
                .onImageCaptured(onImageCaptured)
                .onVideoCaptured(onVideoCaptured)
                .startSession()
        }}
        .frame(maxHeight: .infinity)
        .onAppear(perform: onAppear)
    }
}

etc...

The previous framework version handled this correctly.

version: 3.0.1 Xcode 16.2 IOS 18

SpiraMira avatar Feb 10 '25 10:02 SpiraMira

possibly a duplicate of #81

SpiraMira avatar Feb 10 '25 21:02 SpiraMira

Hi - why is this not a bug?

SpiraMira avatar Mar 11 '25 21:03 SpiraMira

I'm also experiencing this. Camera control disappear when returning the app to the foreground. Additionally, if I present the the camera too quickly after launching the app (not simply bringing it to the foreground, but a cold start app launch) the camera controls also disappear.

im-jersh avatar Aug 02 '25 21:08 im-jersh