Create, view, and manage ephemeral story content with rich multimedia and engagement features
UIKit Component: Story components are built on top of the social.plus SDK, providing ready-to-use story creation and viewing UI with full data management handled automatically.
The Story feature in social.plus UIKit v4 enables users to create, share, and view ephemeral content, enhancing engagement and fostering community interaction. This suite of components provides a seamless experience for users to capture moments, share multimedia content, and engage with their communities through time-limited stories that disappear after 24 hours.
Story ring display and navigation componentThe Story Target Tab Component enables users to view and navigate story collections through circular ring indicators. This component provides seamless story discovery and creation workflows for both community and global feeds.
The Story Target Tab Component is a dynamic feature that enhances the application page by allowing users to discover, view, and create stories. This component provides visual indicators for story availability and enables quick access to story creation and viewing workflows.
class CustomStoryTabComponentBehaviour: AmityStoryTabComponentBehaviour { override init() { super.init() } override func goToViewStoryPage(context: AmityStoryTabComponentBehaviour.Context) { // Navigate to story viewing page let viewStoryPage = AmityViewStoryPage(type: .communityFeed(context.targetId)) let viewController = AmitySwiftUIHostingController(rootView: viewStoryPage) navigationController?.pushViewController(viewController, animated: true) } override func goToCreateStoryPage(context: AmityStoryTabComponentBehaviour.Context) { // Navigate to story creation page let createStoryPage = AmityCreateStoryPage(targetId: context.targetId, targetType: context.targetType) let viewController = AmitySwiftUIHostingController(rootView: createStoryPage) navigationController?.pushViewController(viewController, animated: true) }}// Setup custom behaviorfunc setStoryTabComponentBehaviour() { let customStoryTabComponentBehaviour = CustomStoryTabComponentBehaviour() AmityUIKit4Manager.behaviour.storyTabComponentBehaviour = customStoryTabComponentBehaviour}
Story creation and multimedia captureStory Creation components enable users to create rich multimedia stories with camera integration, media selection, and content editing capabilities before publishing to their selected audience.
The Story Creation Page provides comprehensive camera functionality and media selection capabilities for creating engaging story content. Users can capture new content or select from existing media to create stories with customizable features and targeting options.
The Story Draft Page enables users to preview, edit, and customize their story content before publishing. This component provides comprehensive editing tools including hyperlink addition, aspect ratio adjustment, and content finalization.
class CustomCreateStoryPageBehaviour: AmityCreateStoryPageBehaviour { override init() { super.init() } override func goToDraftStoryPage(context: AmityCreateStoryPageBehaviour.Context) { // Navigate to story draft page let draftPage = AmityDraftStoryPage( targetId: context.targetId, targetType: context.targetType, mediaType: context.mediaType ) let viewController = AmitySwiftUIHostingController(rootView: draftPage) navigationController?.pushViewController(viewController, animated: true) }}// Setup custom behaviorfunc setCreateStoryPageBehaviour() { let customCreateStoryPageBehaviour = CustomCreateStoryPageBehaviour() AmityUIKit4Manager.behaviour.createStoryPageBehaviour = customCreateStoryPageBehaviour}
Story viewing and engagement interfaceStory Viewing components provide immersive full-screen story consumption with navigation controls, engagement features, and seamless story progression for enhanced user experience.
The Story Viewing Page provides an immersive full-screen interface for consuming story content. Users can navigate through story collections, engage with content through reactions and comments, and seamlessly progress through multiple stories with intuitive controls.
// Community Feed Story Viewinglet viewStoryPage = AmityViewStoryPage(type: .communityFeed("<community-id>"))let viewController = AmitySwiftUIHostingController(rootView: viewStoryPage)navigationController?.pushViewController(viewController, animated: true)// Global Feed Story Viewing// Specify communityId to start from specific community in global feedlet globalViewStoryPage = AmityViewStoryPage(type: .globalFeed("<start-community-id>"))let globalViewController = AmitySwiftUIHostingController(rootView: globalViewStoryPage)navigationController?.pushViewController(globalViewController, animated: true)
class CustomViewStoryPageBehaviour: AmityViewStoryPageBehaviour { override init() { super.init() } override func goToCreateStoryPage(context: AmityViewStoryPageBehaviour.Context) { // Navigate to story creation let createStoryPage = AmityCreateStoryPage( targetId: context.targetId, targetType: context.targetType ) let viewController = AmitySwiftUIHostingController(rootView: createStoryPage) navigationController?.pushViewController(viewController, animated: true) } func handleStoryEnd() { // Handle story viewing completion navigationController?.popViewController(animated: true) } func handleStoryError(error: Error) { // Handle story viewing errors showErrorAlert(error: error) }}// Setup custom behaviorfunc setViewStoryPageBehaviour() { let customViewStoryPageBehaviour = CustomViewStoryPageBehaviour() AmityUIKit4Manager.behaviour.viewStoryPageBehaviour = customViewStoryPageBehaviour}
Audience and target selection for story distributionStory Target Selection components provide users with flexible options to choose where their stories will be visible, enabling precise audience control and content distribution.
The Story Target Selection Page streamlines the process of choosing target audiences for story sharing. Users can select specific communities, target their personal timeline, or broadcast to multiple audiences with comprehensive visibility controls.
Implementation Strategy: Begin with the Story Target Tab Component to establish story discovery workflows, then implement Story Creation for capturing and drafting content. Add Story Viewing for consumption experiences and ensure proper target selection with the Selection Page. Remember that stories are ephemeral content with 24-hour expiration - implement proper cleanup mechanisms and user notifications. Focus on smooth media transitions, responsive controls, and seamless navigation between story creation, viewing, and engagement features.