Overview
TikTok Share Kit shares images and videos from your Unity game to TikTok, on Android and iOS. Share one file or several at once. One static C# class does it. There is no TikTok SDK to install, no TikTok developer app, no login and nothing to add to your manifest, Gradle files or Info.plist.
On Android the files go straight to TikTok's share screen. iOS only allows direct sharing through TikTok's OpenSDK, which needs a TikTok developer app and an approved client key, so on iOS the kit opens the system share sheet with your files and the player picks TikTok there.
The kit shares files you already have: a screenshot, a recording, a picture made by the player. It does not capture screenshots or record video itself.
Share in one line
Pass your file paths: TikTok opens with them.
Images and videos
One file or several at once, as a photo post or a set of clips.
Zero setup
The plugin brings its own FileProvider, manifest queries, androidx dependency and Info.plist entries.
Ready-to-run demo
Every share call on one screen, with sample images and a video.
Requirements
| Item | Version | Notes |
|---|---|---|
| Unity | 6000.0+ | Android and/or iOS build support installed |
com.unity.ugui | 2.0+ | The demo's UI only |
| TikTok app | current | Installed on the player's device. On Android the share calls do nothing without it and IsTikTokInstalled() returns false. |
Quick start
- Import the package The plugin lands in
Assets/hardartcore/TikTokShareand the demo media inAssets/StreamingAssets/TikTokShare. - Save your files Write the images or videos to
Application.persistentDataPathorApplication.temporaryCachePath. - Share them Call
ShareImagesorShareVideoswith the files' absolute paths. Build to an Android or iOS device with TikTok installed.
using hardartcore.TikTok;
using UnityEngine;
public class ShareButton : MonoBehaviour
{
public void Share()
{
var video = Application.persistentDataPath + "/clip.mp4";
if (TikTokShareHelper.IsTikTokInstalled())
{
TikTokShareHelper.ShareVideos("Share to TikTok", new[] { video });
}
}
}
Every call is a safe no-op in the Editor and on other platforms, and IsTikTokInstalled() returns false there. Test sharing on a device.
The demo
Open Demo/DemoScene. It copies four sample images and a video out of
StreamingAssets/TikTokShare into Application.persistentDataPath (TikTok needs real
files), shows a game screenshot in the preview, and has one button per share call: one image, four images, one
video and three clips. The status chip shows whether TikTok is installed; without it the buttons are disabled on a
device. The layout adapts to portrait and landscape.
API reference
Everything is on the static class hardartcore.TikTok.TikTokShareHelper. Paths are absolute file paths.
- IsTikTokInstalled()
bool. True when TikTok is on the device (on Android, TikTok or the TikTok app of some Asian markets).- ShareImages(title, imagePaths)
- One or more images (JPEG or PNG).
titleis the share screen's title on Android, when Android shows one; TikTok does not take a pre-filled caption. - ShareVideos(title, videoPaths)
- One or more videos (MP4), the same way.
- SetFileProvider(suffix)
- Android Not needed: the plugin has its own provider. Use it only to share through a
FileProvideryou declared yourself, passing its authority suffix with a leading dot. - CopyFile(name)
- Android Copies
StreamingAssets/nameto the app-specific external files folder. The demo shows a cross-platform way withUnityWebRequest.
How it works
Android
The kit sends an ACTION_SEND intent (or ACTION_SEND_MULTIPLE for several files) to the
installed TikTok app. File paths become content:// URIs through the plugin's
FileProvider, and TikTok is granted read access to them. The Android library
Plugins/Android/TikTokShare.androidlib adds to your build:
- FileProvider
com.hardartcore.tiktokShare.TikTokFileProviderwith the authority<your application id>.hardartcore.tiktok. Its own class name, so it never clashes with another plugin's or your ownFileProvider.- Shared folders
- External storage, the app's files folder and cache folder:
Application.persistentDataPathandApplication.temporaryCachePathwork whether they are external or internal. No storage permission is needed. - Queries
com.zhiliaoapp.musicallyandcom.ss.android.ugc.trill(TikTok in some Asian markets), so Android 11+ lets the app see TikTok.- Dependency
androidx.core:core:1.9.0in the library'sbuild.gradle, downloaded by Gradle from Google's Maven repository.- ProGuard
proguard-rules.prokeepscom.hardartcore.tiktokShare.**, which C# calls by name, when you enable minification.
iOS
The kit opens the system share sheet with your files and the player picks TikTok. IsTikTokInstalled()
checks the URL schemes the TikTok app registers (snssdk1233, snssdk1180).
Scripts/Editor/TikTokShareIOSPostProcess.cs adds them to LSApplicationQueriesSchemes after
every iOS build, plus a NSPhotoLibraryAddUsageDescription text (kept if you already have one), because
the share sheet offers "Save Image / Save Video" and iOS closes apps that save to Photos without one.
Folder layout
Assets/ ├── hardartcore/TikTokShare/ │ ├── Documentation.html this documentation │ ├── Scripts/ │ │ ├── TikTokShareHelper.cs the C# API │ │ └── Editor/ Info.plist build step, Help menu items │ ├── Plugins/ │ │ ├── Android/TikTokShare.androidlib/ │ │ │ ├── build.gradle androidx.core dependency, ProGuard rules │ │ │ └── src/main/ manifest, Java helper and FileProvider, shared paths │ │ └── iOS/TikTokShare.mm share sheet bridge │ └── Demo/ DemoScene, its scripts, Nunito font, icons └── StreamingAssets/TikTokShare/ the demo's images and video
The demo and StreamingAssets/TikTokShare can be deleted; the plugin does not use them.
Upgrading from 1.x
- Delete the old library Remove
Plugins/Android/library-release.aarandEditor/AndroidDependencies.xmlif they are still in the project: importing an update does not delete files. - Remove the old provider Delete the
<provider>you added toAssets/Plugins/Android/AndroidManifest.xmlfor this asset (the one pointing at@xml/file_paths), or the build fails with a missing resource. The<queries>entry,READ_EXTERNAL_STORAGEandrequestLegacyExternalStorageare no longer needed either. - Drop SetFileProvider Remove
SetFileProvider(...)calls, unless you keep sharing through your own provider.
Troubleshooting
- Nothing happens on share
- TikTok is not installed (check
IsTikTokInstalled()), or the files do not exist. - Failed to find configured root
- Android: a file is outside the shared folders. Save it under
Application.persistentDataPathorApplication.temporaryCachePath. - Duplicate class androidx.core...
- Another plugin copied
androidx.coreAAR files intoAssets/Plugins/Android(External Dependency Manager without Gradle templates). Turn on EDM's Patch mainTemplate.gradle option and resolve again. - Resource xml/file_paths not found
- The provider added for version 1.x is still in your manifest. See Upgrading.
- TikTok is missing from the iOS share sheet
- TikTok shows up for the media types it accepts once installed; the player may need to scroll the app row or enable it under More.
Third-party notices
The demo includes two third-party components. Everything else in the package is original work by HardArtcore. TikTok is a trademark of ByteDance Ltd.; this package is not affiliated with or endorsed by TikTok or ByteDance.
| Component | Location | License |
|---|---|---|
| Nunito font Copyright 2014 The Nunito Project Authors (github.com/googlefonts/nunito) | Demo/UI/Fonts/ | SIL Open Font License 1.1 |
| Material Symbols icons Copyright Google LLC (github.com/google/material-design-icons) | Demo/UI/Icons/ | Apache License 2.0 |
The full licence texts ship in the package's Documentation.html, and online: SIL Open Font License 1.1, Apache License 2.0.
Release notes
2.0.0
- iOS support through the system share sheet, with the Info.plist entries added on build.
IsTikTokInstalled(), and support for the TikTok app of some Asian markets.- Zero setup on Android: an Android library with its own FileProvider, the TikTok
<queries>entries, theandroidx.coredependency and ProGuard rules. No AAR, no manifest edits, no Gradle templates, no External Dependency Manager. - A new demo in portrait and landscape; its media now ships in StreamingAssets.
- Unity 6 or newer.
1.3
- TikTokShareHelper is a static class: no need to add it to a scene.
1.2
- Support for the
<queries>tag in AndroidManifest.xml.
Need help?
Questions, bug reports or feature requests: I usually reply within a day.
Last updated November 4, 2026.