Table of Contents

Class IOSNativeCalls

Namespace
Uralstech.UShare

An interface for the native iOS plugin.

public static class IOSNativeCalls
Inheritance
object
IOSNativeCalls

Methods

ushare_interface_share_file(long, string, string?, string?, ShareFileCallback)

Shares a file using iOS's UIActivityViewController.

public static extern bool ushare_interface_share_file(long timestamp, string filePath, string? additionalText, string? title, IOSNativeCalls.ShareFileCallback callback)

Parameters

timestamp long

The timestamp of the request.

filePath string

The path of the file to share.

additionalText string

Optional text to share along with the image.

title string

An optional title for the share sheet.

callback IOSNativeCalls.ShareFileCallback

Called when UIActivityViewController has completed its work.

Returns

bool

If the share request was executed successfully.

ushare_interface_share_files(long, nint[], int, string?, string?, ShareFileCallback)

Shares multiple files using iOS's UIActivityViewController.

public static extern bool ushare_interface_share_files(long timestamp, nint[] filePathPtrs, int count, string? additionalText, string? title, IOSNativeCalls.ShareFileCallback callback)

Parameters

timestamp long

The timestamp of the request.

filePathPtrs nint[]

The pointers to the paths of the files to share.

count int

The total number of files to share.

additionalText string

Optional text to share along with the image.

title string

An optional title for the share sheet.

callback IOSNativeCalls.ShareFileCallback

Called when UIActivityViewController has completed its work.

Returns

bool

If the share request was executed successfully.

ushare_interface_share_image(nint, int, string?, string?)

Shares an image using iOS's UIActivityViewController.

public static extern bool ushare_interface_share_image(nint imagePtr, int size, string? additionalText, string? title)

Parameters

imagePtr nint

A pointer to the image's data.

size int

The size of the image in bytes.

additionalText string

Optional text to share along with the image.

title string

An optional title for the share sheet.

Returns

bool

If the share request was executed successfully.

ushare_interface_share_images(nint[], int[], int, string?, string?)

Shares multiple images using iOS's UIActivityViewController.

public static extern bool ushare_interface_share_images(nint[] imagePtrs, int[] sizes, int count, string? additionalText, string? title)

Parameters

imagePtrs nint[]

An array of pointers to each image's data.

sizes int[]

An array of the sizes of each image's data in bytes.

count int

The total number of images to be shared.

additionalText string

Optional text to share along with the images.

title string

An optional title for the share sheet.

Returns

bool

If the share request was executed successfully.

ushare_interface_share_text(string, string?)

Shares text data using iOS's UIActivityViewController.

public static extern bool ushare_interface_share_text(string text, string? title)

Parameters

text string

The text to share.

title string

An optional title for the share sheet.

Returns

bool

If the share request was executed successfully.