<div class="meta" robots="noindex">

</div>

Class

# iOSSharingPanel

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `MobileSharingPanel</api/user_interface/mobile/mobilesharingpanel>` as a replacement.

</div>

## Description

An <span class="title-ref">iOSSharingPanel</span> allows the application to share a piece of text, a URL, or a picture with any registered system service or app.

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                         | Parameters                                                                                                                                                                                         | Returns | Shared |
|----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------|
| `SharePicture<iossharingpanel.sharepicture>` | pic As `Picture</api/graphics/picture>`, parentView As `MobileScreen</api/user_interface/mobile/mobilescreen>`, parentControl As `MobileControl</api/user_interface/mobile/mobilecontrol>`         |         |        |
| `ShareText<iossharingpanel.sharetext>`       | textToShare As `String</api/data_types/string>`, parentView As `MobileScreen</api/user_interface/mobile/mobilescreen>`, parentControl As `MobileControl</api/user_interface/mobile/mobilecontrol>` |         |        |
| `ShareURL<iossharingpanel.shareurl>`         | url As `String</api/data_types/string>`, parentView As `MobileScreen</api/user_interface/mobile/mobilescreen>`, parentControl As `MobileControl</api/user_interface/mobile/mobilecontrol>`         |         |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                   | Parameters | Returns |
|----------------------------------------|------------|---------|
| `Cancelled<iossharingpanel.cancelled>` |            |         |
| `Completed<iossharingpanel.completed>` |            |         |

## Method descriptions

<div id="iossharingpanel.sharepicture">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSSharingPanel.SharePicture

**SharePicture**(pic As `Picture</api/graphics/picture>`, parentView As `MobileScreen</api/user_interface/mobile/mobilescreen>`, parentControl As `MobileControl</api/user_interface/mobile/mobilecontrol>`)

Displays the sharing panel to the user, allowing them to share the passed picture.

A `NilObjectException</api/exceptions/nilobjectexception>` is raised if pic is Nil.

Share a picture:

``` xojo
MySharingPanel.SharePicture(myPic, Self, Me)
```

<div id="iossharingpanel.sharetext">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSSharingPanel.ShareText

**ShareText**(textToShare As `String</api/data_types/string>`, parentView As `MobileScreen</api/user_interface/mobile/mobilescreen>`, parentControl As `MobileControl</api/user_interface/mobile/mobilecontrol>`)

Displays the sharing panel to the user, allowing them to share the passed text.

Share text from a Text Area:

``` xojo
MySharingPanel.ShareText(DescArea.Text, Self, Me)
```

<div id="iossharingpanel.shareurl">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSSharingPanel.ShareURL

**ShareURL**(url As `String</api/data_types/string>`, parentView As `MobileScreen</api/user_interface/mobile/mobilescreen>`, parentControl As `MobileControl</api/user_interface/mobile/mobilecontrol>`)

Displays the sharing panel to the user, allowing them to share the passed URL.

An InvalidArgumentException is raised if the url parameter is not a valid URL construct.

Share a URL:

``` xojo
MySharingPanel.ShareURL("http://www.wikipedia.org", Self, Me)
```

## Event descriptions

<div id="iossharingpanel.cancelled">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSSharingPanel.Cancelled

**Cancelled**

Called when the sharing panel has been cancelled.

<div id="iossharingpanel.completed">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSSharingPanel.Completed

**Completed**

Called when a sharing panel has been used.

## Notes

By default, Xojo provides a default message that will appear will appear when the user is asked for permission to access their photo library. If you wish to customize this message, look for the NSPhotoLibraryAddUsageDescription key in the plist of your built app.

## Compatibility

iOS projects on the iOS operating system.

## See also

`Object</api/data_types/additional_types/object>` parent class; `Picture</api/graphics/picture>`
