# Post Creation Page

<figure><img src="/files/G2O3bTYOYpa2JSsoln9N" alt=""><figcaption><p>This is the default state of post creation</p></figcaption></figure>

## Text only

<figure><img src="/files/vs0C7MIkn6mOj41z5guU" alt=""><figcaption><p>Example of how it looks for text only post</p></figcaption></figure>

<figure><img src="/files/tk3Tut4a9gMwEMsMdWEL" alt=""><figcaption><p>Example on how the hyperlink appears in creation page and on the post component</p></figcaption></figure>

<figure><img src="/files/kPkXBvsThXwn44k9JkIJ" alt=""><figcaption><p>Mention users in a text post</p></figcaption></figure>

## Text and Images

<figure><img src="/files/amJbXtL2jftBII9xAtA3" alt=""><figcaption><p>After image selected &#x26; displayed in post creation flow</p></figcaption></figure>

{% hint style="info" %}
The user can select images from 2 sources.
{% endhint %}

### Device Camera

<figure><img src="/files/3ZzC0kryIlTPBm1lgaIp" alt=""><figcaption><p>System will launch the device camera view</p></figcaption></figure>

### Device Image Gallery

<figure><img src="/files/Bas1Blyfq74WZS7dS86r" alt=""><figcaption></figcaption></figure>

## Text and Files

<figure><img src="/files/2lrK5lJ218aus5eaF9Z3" alt=""><figcaption><p>System shows the device file picker</p></figcaption></figure>

<figure><img src="/files/HZ7Yh6lYqUgkr8TDrn5g" alt=""><figcaption><p>Once file selected, system displays the upload progress bar</p></figcaption></figure>

## Text and Videos

<figure><img src="/files/DACCZqVbN9tn3ngK8ZF4" alt=""><figcaption></figcaption></figure>

## Polls

You can create a poll post and other users can interact with that poll post by selecting from the poll options.

![Creating a poll post](/files/Hd4HEKjfGdPZCNuz5TMu)

<figure><img src="/files/8Q30iIIcND627gdJOsRS" alt=""><figcaption><p>Mention users in a poll post</p></figcaption></figure>

## Live Stream

<figure><img src="/files/UBITeoiD3tCUXKtZiXKJ" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/csXCDuKORMFeKvhNBZCE" alt=""><figcaption><p>Mention users in a livestream post</p></figcaption></figure>

To create a live stream post and for a detailed discussion on the live stream features, refer to [Livestream Post](/social-plus-uikit/uikit-3/ios/community/components/post-creation/livestream-post.md) documentation.

{% hint style="info" %}
Refer to our [Live Stream](broken://pages/MqFs7e0Fj67nd6HKhAiL) documentation to enable live stream functionalities.
{% endhint %}

## Features <a href="#features" id="features"></a>

| Feature         | Description                                                                                                                                                                                                                                                                     |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Post creation   | <p>Create post by adding content such as text, images, videos, and files.<br><br>Refer to <a href="#supported-types">Supported types</a> for more details.</p>                                                                                                                  |
| Mention in post | <p>Mention users in post by typing @ to activate mention suggestion and selecting their names in the suggestion list. Up to 30 users can be mentioned per post.</p><p>An alert will be shown if character count is greater than 50000 or mentions count is greater than 30.</p> |

### Supported types

* File: All file types are supported
* Image: JPG, JPEG, and PNG
* Video: 3GP, AVI, FLV, MP4 and MPEG-2

{% hint style="info" %}

1. The maximum file, image, or video size that you can upload is 1 GB.
2. Uploaded images or videos whose format is not supported (e.g. HEIC, HEVC) will be automatically converted to PNG for images and MP4 for videos.
   {% endhint %}

## Usage

**Create a view controller**

```swift
// Post to user feed
let viewController = AmityPostCreatorViewController.make(postTarget: .myFeed)

// Post to community feed
let viewController = AmityPostCreatorViewController.make(postTarget: .community(object: postModel))

// Poll post
let viewController = AmityPollCreatorViewController.make(postTarget: <your post target>)
self.present(viewController, animated: true, completion: nil)
```

**Parameter**

| Parameter  | Description                                                                                                                          |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| postTarget | <p>enums to determine where is the target feed<br>consist of <code>myFeed</code> and <code>community(AmityCommunityModel)</code></p> |

{% hint style="info" %}
**AmityCommunityModel** is a wrapper class of **AmityCommunity** which is a live object from [social.plus SDK](/developers/beta-features/real-time-events.md#live-objects).
{% endhint %}

**Attachment options**

By default `AmityPostCreatorViewController` allows all attachments when creating a post. You can optionally choose attachment options when creating the post.

All available attachment options are `image`, `video`, and `file`. These can be found in `AmityPostAttachmentType`.

{% code overflow="wrap" %}

```
// Only allow file attachment in post creator page.
let settings = AmityPostEditorSettings()
settings.allowPostAttachments = [.file]
let postCreator = AmityPostCreatorViewController.make(postTarget: postTarget, settings: settings)
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/post-creation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
