public void Present(IosImagePickerPresentArgs presentArgs, Action <IIosImagePickerResult> resultCallback) { #if IOS_IMAGE_PICKER_NATIVE_IMPLEMENTATION_AVAILABLE var requestId = CallbackHandler.AddCallback(payload => { var result = NativePayloadDeserializer.DeserializeIosImagePickerResult(payload); resultCallback.Invoke(result); }); var mediaTypes = this.MediaTypes; if (mediaTypes == null) { mediaTypes = AvailableMediaTypesForSourceType(this.SourceType); } var serializedMediaTypes = string.Join(SerializationSeparator.ToString(), mediaTypes); PInvoke.UnityIosImagePickerController_Present( requestId, this.SourceType, serializedMediaTypes, this.AllowsEditing, this.VideoQuality, this.VideoMaximumDuration.TotalSeconds, this.CameraDevice, this.CameraCaptureMode, this.CameraFlashMode, presentArgs.IpadPopoverPermittedArrowDirections, presentArgs.IpadNormalizedPopoverSourceRect.x, presentArgs.IpadNormalizedPopoverSourceRect.y, presentArgs.IpadNormalizedPopoverSourceRect.width, presentArgs.IpadNormalizedPopoverSourceRect.height, presentArgs.IpadPopoverCanOverlapSourceRect); #else throw new Exception("Ios Image Picker not supported in this platform"); #endif }