TTMSFMXNativeCameraViewController - iPad 5

Hello,


We are using the TTMSFMXNativeCameraViewController in our application, and have just noticed that when we run on the iPad 5 we get the following popup message and then a crash:

CAMERA CONTROLLER
Camera Controller is not initialised, please first call InitializeCamera

The form that contains the TMS component contains this code in its Create procedure:
   TMSFMXNativeCameraViewController1.Visible:=False;
   TMSFMXNativeCameraViewController1.FlashMode:=fmCameraViewControllerCameraFlashModeOff;
   TMSFMXNativeCameraViewController1.InitializeCamera(True);
   TMSFMXNativeCameraViewController1.Stop;

It only appears to happen on the iPad 5 (and perhaps the pro, but not yet tried it) - previous generations work fine, as do iPhones.

We are using ICL version 3.0.4.1

Please can you advise.

Hi, 


Please take a look at the demo, that demonstrates how to properly initialize the camera.

procedure TForm24.TMSFMXNativeUIButton2Click(Sender: TObject);
begin
  if not TMSFMXNativeCameraViewController1.IsInitialized then
    TMSFMXNativeCameraViewController1.InitializeCamera(False)
  else
  begin
    if TMSFMXNativeCameraViewController1.IsRunning then
    begin
      TMSFMXNativeCameraViewController1.Stop;
      TMSFMXNativeUIButton2.Text := 'Start';
    end
    else
    begin
      TMSFMXNativeCameraViewController1.Start;
      TMSFMXNativeUIButton2.Text := 'Stop';
    end;
  end;
end;

It's unclear why you are calling TMSFMXNativeCameraViewController1.Stop; after calling InitializeCamera, you should at least check if the camera is running before stopping it.