TribeBuilder

An iOS app that helps independent music artists create AI-powered content and publish it across TikTok, Instagram, YouTube, and more — all from one place.

iOS App Swift & SwiftUI AI Content Generation Multi-Platform Publishing

How Users Connect Their TikTok Account

TribeBuilder is a native iOS app. Users connect their TikTok account through the standard OAuth 2.0 authorization flow, initiated in-app via Apple's secure ASWebAuthenticationSession browser.

1

Open Platforms Screen

User navigates to the Platforms section and taps "Connect" next to TikTok.

Connect Your Platforms
TikTok Connect
Instagram Connect
YouTube Connect
Facebook
Tap Connect to link your account
2

TikTok OAuth Login

TikTok's official authorization page opens in a secure browser. User logs in and grants permissions.

tiktok.com/v2/auth/authorize
3

Connected — Create & Publish

Account is linked. User creates content with AI and publishes directly to TikTok.

Create Content
TikTok ✓ Connected
AI-GENERATED CAPTION
New track dropping this weekend. This one hits different. Been in the studio non-stop... 🎵🌟
#newmusic #artist #studio
Uses TikTok Content Posting API v2
Technical Details: TribeBuilder uses TikTok's OAuth 2.0 authorization code flow. The app opens https://www.tiktok.com/v2/auth/authorize/ in Apple's ASWebAuthenticationSession (a secure, sandboxed browser). After the user authorizes, TikTok redirects to https://tribebuilder.is-a.dev/callback/ which returns the authorization code to the app. The app then exchanges this code for access and refresh tokens via https://open.tiktokapis.com/v2/oauth/token/. All tokens are stored securely — never exposed to the user.

OAuth Scopes Requested

  • user.info.basic — Basic user identification
  • user.info.profile — Profile display name & avatar
  • user.info.stats — Follower count and engagement stats
  • video.publish — Post content directly to TikTok
  • video.upload — Upload media to TikTok inbox
  • video.list — View published content

Content Posting API Usage

  • Photo publishing via PULL_FROM_URL (proxied through verified domain)
  • Video publishing via FILE_UPLOAD with chunked upload
  • Three-tier fallback: DIRECT_POST → SELF_ONLY → MEDIA_UPLOAD
  • Publish status polling until terminal state
  • Automatic token refresh before every publish attempt

How TribeBuilder Works

A complete content creation and publishing pipeline for independent artists.

1. Build Your Persona

Answer questions about your voice, style, audience, and themes. TribeBuilder learns how you talk so AI-generated content sounds like you, not a robot.

2. Connect Platforms

Link your TikTok, Instagram, YouTube, Facebook, X/Twitter, Threads, Bluesky, Spotify, and Discord accounts through secure OAuth.

3. Create Content

Use AI to generate captions tailored to each platform, or write your own. Add images, videos, and hashtags. Every caption gets an authenticity score.

4. Publish & Schedule

Post to all connected platforms at once, or schedule content for optimal times. Track performance with built-in analytics.

Supported Platforms

TribeBuilder integrates with these platforms through their official APIs. Every connection uses standard OAuth 2.0.

TikTok

Content Posting API v2 — photo (PULL_FROM_URL) and video (FILE_UPLOAD) publishing with three-tier post mode fallback.

Instagram

Graph API — photo and carousel publishing with image hosting via Supabase Storage. Insights API for analytics.

YouTube

Data API v3 — video upload with metadata, privacy settings, and channel management.

X / Twitter

API v2 — tweet posting with media upload and OAuth 2.0 PKCE authentication.

Facebook

Graph API — page posting with photo/video support and Page Insights analytics.

Threads

Threads Publishing API — text and image posts via Meta's content publishing endpoint.

Bluesky

AT Protocol — decentralized posting with image blob upload and app password authentication.

Spotify

Web API — profile display and listening stats for analytics. OAuth 2.0 + PKCE flow.

Architecture

Built as a modular iOS application using modern Swift concurrency, SwiftUI, and SwiftData.

// Unified publisher protocol — every platform implements this
protocol SocialMediaPublisher {
  var platform: SocialPlatform { get }
  func publishText(_ text: String, mediaURLs: [URL]?) async throws -> PublishResult
  func refreshToken(_ tokens: OAuthTokens) async throws -> OAuthTokens
}

AI Content Generation

Multi-provider BYOK support for ChatGPT, Gemini, Grok, DALL-E, and Gemini Vision. Persona-driven prompts with authenticity scoring.

Publishing Pipeline

Three-tier fallback with retry logic, offline queue, and background task scheduling via BGTaskScheduler.

OAuth Management

Unified OAuth 2.0 + PKCE flow for all platforms. Proactive token refresh and Keychain-backed secure storage.

Strategy Engine

AI-powered content strategy planning with persona matching, auto-scheduling, and review queue for generated content.

Swift 5.9 SwiftUI SwiftData iOS 17+ Async/Await WidgetKit BGTaskScheduler OSLog ASWebAuthenticationSession StoreKit 2 Supabase Cloudflare Workers