Post Creation Page

This page provides a form for post creation.

Text only

Text and Images

The user can select images from 2 sources.

Device Camera

Text and Files

Text and Videos

Polls

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

Live Stream

To create a live stream post and for a detailed discussion on the live stream features, refer to Livestream Post documentation.

Refer to our Live Stream documentation to enable live stream functionalities.

Features

Supported types

  • File: All file types are supported

  • Image: JPG, JPEG, and PNG

  • Video: 3GP, AVI, FLV, MP4 and MPEG-2

  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.

Usage

Create a view controller

// 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

AmityCommunityModel is a wrapper class of AmityCommunity which is a live object from AmitySDK

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.

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

Last updated