FeedConfig() with no arguments produces a working feed.
ShortKit initializer
- Swift
- Kotlin
- Flutter
- React Native
- Web
On initialization, the SDK pre-fetches the first feed page, pre-warms the CDN connection, and begins HLS preroll for the first video. The feed view controller can render immediately without a loading spinner.
FeedConfig
- Swift
- Kotlin
- Flutter
- React Native
- Web
- Swift
- Kotlin
- Flutter
- React Native
- Web
Horizontal feed
SetscrollAxis to .horizontal for a left/right swipe feed instead of the default vertical (up/down) feed. Each cell still fills the full feed container — only the swipe direction changes.
- Swift
- Kotlin
- Flutter
- React Native
- Web
FeedFilter
FeedFilter controls which content the SDK fetches from the server. When set on FeedConfig, all feed requests (initial load, pagination, and pull-to-refresh) automatically apply the filter. When nil, the full unfiltered feed is returned.
Different filter fields are combined with AND logic — content must match all specified fields. Tags use OR logic within the tags array — content matching any of the provided tags is included.
The exclusion fields (excludeTags, excludeSections, excludeAuthors, excludeContentTypes, excludeMetadata) remove content instead: content matching any exclusion is left out, even if it matches every other field. See Excluding content.
- Swift
- Kotlin
- Flutter
- React Native
- Web
- Swift
- Kotlin
- Flutter
- React Native
- Web
Excluding content
Use the exclusion fields to keep specific content out of a feed, for example a viewer’s own posts, authors they’ve blocked, or content rated above an age limit. ShortKit removes excluded content server-side before it builds each page, so pagination and pull-to-refresh never return it.- Content matching any exclusion is left out. Exclusions take priority over the other fields.
- Each exclusion matches the same way as its counterpart:
excludeTagsagainst content tags,excludeSections,excludeAuthors, andexcludeContentTypesby exact match, andexcludeMetadataagainst custom metadata values. - Content that doesn’t carry the field is never excluded. An item with no
authorIdmetadata key stays in a feed that excludesauthorId: ["user_8f3a2c"]. - A filter that sets only exclusion fields doesn’t change how your feed is ordered; excluded items are skipped. Leave the other fields unset rather than empty. An empty list counts as set, and setting any of them returns filtered results instead.
- Exclusions are sent with every feed request. Keep each list to a few hundred values.
customMetadata: {"authorId": "user_8f3a2c"}), then exclude that key for the signed-in viewer.
- Swift
- Kotlin
- Flutter
- React Native
- Web
Changing the filter on a feed that’s already on screen reloads it from the top. Set exclusions you already know about, such as the signed-in viewer’s own posts, on
FeedConfig when you create the feed.Filtering by language
ShortKit automatically detects the spoken language in every video and stores it ascustomMetadata.language using a BCP 47 code. Use this with metadata to serve a language-specific feed without any extra work on upload.
- Swift
- Kotlin
- Flutter
- React Native
- Web
"en" English, "es" Spanish, "fr" French, "de" German, "it" Italian, "pt" Portuguese, "ja" Japanese, "ko" Korean, "zh" Chinese, "ar" Arabic, "hi" Hindi. "und" indicates no detectable speech (music or ambient audio). Language is set asynchronously — it appears on the content object within a few minutes of the video reaching ready status.
Complete example
A full initialization with all configuration options set explicitly.- Swift (SwiftUI)
- Swift (UIKit)
- Kotlin
- Flutter
- React Native
- Web
App.swift