Table of Contents

Class IOSInterop

Interface for the native iOS plugin.

public static class IOSInterop
Inheritance
object
IOSInterop

Methods

ushare_ios_share_files(int, string[], int, string?, string?, ActivityFinishedCallback)

Shares files using UIActivityViewController.

public static extern bool ushare_ios_share_files(int id, string[] paths, int count, string? text, string? title, IOSInterop.ActivityFinishedCallback callback)

Parameters

id int

The ID of this event, to be returned in callback.

paths string[]

The paths to the files being shared.

count int

Length of paths.

text string

Optional additional text to share.

title string

Optional title for the sharesheet.

callback IOSInterop.ActivityFinishedCallback

Callback for when the activity has finished. Note that this is not an indication of the operation being completed.

Returns

bool

true if the view was presented; false otherwise.

Exceptions

PlatformNotSupportedException

Thrown if this method is called on a runtime other than iOS.

ushare_ios_share_images(int, nint[], int[], int, string?, string?, ActivityFinishedCallback)

Shares images using UIActivityViewController.

public static extern bool ushare_ios_share_images(int id, nint[] images, int[] sizes, int count, string? text, string? title, IOSInterop.ActivityFinishedCallback callback)

Parameters

id int

The ID of this event, to be returned in callback.

images nint[]

The images being shared.

sizes int[]

The size of each image in images, in bytes.

count int

Length of images and sizes.

text string

Optional additional text to share.

title string

Optional title for the sharesheet.

callback IOSInterop.ActivityFinishedCallback

Callback for when the activity has finished. Note that this is not an indication of the operation being completed.

Returns

bool

true if the view was presented; false otherwise.

Exceptions

PlatformNotSupportedException

Thrown if this method is called on a runtime other than iOS.

ushare_ios_share_text(int, string, string?, ActivityFinishedCallback)

Shares text data using UIActivityViewController.

public static extern bool ushare_ios_share_text(int id, string text, string? title, IOSInterop.ActivityFinishedCallback callback)

Parameters

id int

The ID of this event, to be returned in callback.

text string

The text to share.

title string

Optional title for the sharesheet.

callback IOSInterop.ActivityFinishedCallback

Callback for when the activity has finished. Note that this is not an indication of the operation being completed.

Returns

bool

true if the view was presented; false otherwise.

Exceptions

PlatformNotSupportedException

Thrown if this method is called on a runtime other than iOS.