Launch The Main App from LockedCameraCapture

If the app is launched from LockedCameraCapture and if the settings button is tapped, I need to launch the main app.

CameraViewController:

func settingsButtonTapped() {
  #if isLockedCameraCaptureExtension
  //App is launched from Lock Screen
     
    //Launch main app here...

  #else
  //App is launched from Home Screen
    self.showSettings(animated: true)
  #endif
}

In this document:

https://developer.apple.com/documentation/lockedcameracapture/creating-a-camera-experience-for-the-lock-screen

Apple asks you to use:

func launchApp(with session: LockedCameraCaptureSession, info: String) {
	Task {
		do {
			let activity = NSUserActivityTypeLockedCameraCapture
			activity.userInfo = [UserInfoKey: info]
			try await session.openApplication(for: activity)
		} catch {
			StatusManager.displayError("Unable to open app - \(error.localizedDescription)")
		}
	}
}

However, the documentation states that this should be placed within the extension code - LockedCameraCapture. If I do that, how can I call that all the way down from the main app's CameraViewController?

let activity = NSUserActivityTypeLockedCameraCapture
activity.userInfo = [UserInfoKey: info]

This is also giving an error after being unrecognized, even after minimum target set to iOS 18.

Launch The Main App from LockedCameraCapture
 
 
Q