Build a YouTube Clone App in Swift with AI
By the Vibecode teamUpdated 5 min read
Short answer
A YouTube clone is a video catalog with three hard screens: the home feed, the watch page (player, channel, comments, up next) and a mini-player that keeps playing while you browse. Vibecode's template, Vidora, has all three plus Shorts, search and subscriptions, playing real stock videos in a native iPhone app written in Swift. Remix it and add uploads and channels by chatting.
See it running

Template
VidoraiOS
YouTube clone · Swift and SwiftUI
Topic-chip home feed, watch page with up next, draggable mini-player, Shorts, search and subscriptions.
Remix copies the working Swift app into your Vibecode account for free. Or open a new iOS app with the prompt below to build a fresh copy.
Open the template pageThe prompt we used
This is the prompt that built Vidora in Vibecode. Paste it into a new iOS app project to build your own copy from scratch, or change the details first.
Prompt · 762 words
Build a polished, fully working native iOS app in SwiftUI named Vidora: an original video streaming app that recreates the core experience of YouTube, but with its own name, its own original logo and its own color palette. Do NOT use the YouTube name, logo, wordmark, app icon or any trademarked asset anywhere in the app. Design an original Vidora logo mark, drawn with SwiftUI shapes (Path/Canvas) or made as a generated image asset, and use it in the header.
Screens and flows (dark theme #0F0F0F; bottom bar: Home, Shorts, a center "+" create button, Subscriptions, You):
1. Home: top bar with the Vidora logo, cast, notifications bell with a badge, and search. A horizontally scrolling chip row (All, Music, Gaming, Podcasts, Cooking, Travel, Tech, Live, Recently uploaded, New to you) filters the feed. Feed of 12 video cards: full-width 16:9 thumbnail with a duration badge (and a "LIVE" badge on one), channel avatar, two-line title, "Channel name · 1.2M views · 3 days ago", 3-dot menu that opens an action sheet (Save to Watch later, Save to playlist, Share, Not interested). A "Shorts" shelf of 6 vertical thumbnails sits between cards 2 and 3.
2. Videos and thumbnails: use these verified free stock clips with AVPlayer (an AVPlayerLayer in a UIViewRepresentable, aspect-fill, no system controls): https://assets.mixkit.co/videos/<ID>/<ID>-720.mp4 and thumbnails https://assets.mixkit.co/videos/<ID>/<ID>-thumb-720-0.jpg for IDs 47555, 43905, 9286, 44001, 5371, 41576, 4308, 52427, 35540, 51612, 51614, 23282, 1366, 43150, 39912, 36924 (curl-check them; drop any that fail). Give each an invented channel (e.g. "Kitchen Lab", "Wander Weekly", "Byte Size Tech", "Torque Garage") and a realistic title.
3. Watch page: tapping a card opens the player at the top (autoplays) with custom controls on tap: play/pause, 10 s back/forward on double tap, a scrubbable progress bar with current/total time, and a minimize chevron. Below: title, "1.2M views 3 days ago ...more" (expands the description), channel row with avatar, subscriber count and a Subscribe pill that toggles to "Subscribed" with a bell, an action row (like/dislike pill whose count updates, Share, Remix, Download, Save), a comments preview card that opens a comments sheet with an input, and an "Up next" list; tapping an up-next video switches the player.
4. Mini-player: swiping the player down (or the chevron) shrinks it into a mini-player docked above the tab bar with title, play/pause and close, while you keep browsing; tapping it expands back with a smooth animation.
5. Shorts: full-screen vertical pager of the same clips with like, dislike, comments, share and remix buttons on the right and Subscribe next to the channel name.
6. Search: tap search for recent searches and suggestions; typing filters suggestions; submitting shows results.
7. Subscriptions: row of channel avatars with unread dots, then the latest videos. You: avatar, handle, History row (horizontal), Playlists, Watch later, Liked videos. Create: a sheet with Create a Short, Upload a video, Go live, Create a post.
Rules for the whole app:
- Native SwiftUI for iOS 26, the deployment target the Vibecode iOS template already uses (do not change it). iPhone-first layout. SF Symbols are fine for UI icons (never for the YouTube logo or any brand mark).
- Everything runs on-device from realistic, deterministic fixture data in one Swift file (e.g. Fixtures.swift: real-sounding names, handles, numbers, timestamps, captions). No backend (leave the backend/ folder alone and make no network calls except loading images and media), no login, no permissions (no camera, photos, location, contacts, notifications, microphone). Do not persist state (no UserDefaults, @AppStorage, SwiftData or files): every launch starts from the same fixture state, so the demo is repeatable.
- Remote images: load images.unsplash.com photo URLs (with ?w=800&q=80 style params) with AsyncImage (or a small cached image view) and a tasteful placeholder. Verify every image and media URL with `curl -s -o /dev/null -w "%{http_code}" <url>` before you use it and replace any that do not return 200. No broken or blank images anywhere.
- Polish: native-feeling spacing and typography, safe areas, smooth spring animations (.spring/.snappy, most under 350 ms), matchedGeometryEffect for hero and expand/collapse transitions where it helps, .sensoryFeedback haptics on key taps, pressed states, and loading/empty states. Simulated waits stay short (under 3 s). Every button visible on screen does something sensible; nothing is a dead end.
- Keep the compiler happy: small files (under ~300 lines each), big view bodies split into subviews, and no long chained expressions, so nothing hits "unable to type-check this expression in reasonable time".
- It must build with zero errors and run in the iOS simulator with no crash. Walk through every flow above and fix anything broken.YouTube clone features
What Vidora includes today, and what you add next. Everything in the template runs on sample data, with no login and no backend, so it works the moment you open it.
In the template
Home feed
Topic chips that filter 16:9 video cards with duration and LIVE badges, channel, views and age.
Watch page
Player with custom controls, double-tap 10-second seek, scrubber and expandable description.
Channel and actions
Subscribe toggle with bell, like and dislike counts, share, save and download buttons.
Comments and up next
Comments sheet with an input and an Up next list that switches the player.
Mini-player
Swipe the player down to dock it above the tab bar and keep browsing; tap to expand.
Shorts
Vertical pager with like, dislike, comments, share and subscribe.
Search
Recent searches, live suggestions and results.
Subscriptions and library
Channel row with unread dots, history, playlists, Watch later and liked videos.
Add with a prompt
Uploads and channels
Upload, transcode and publish videos to your own channel.
Real view counts
Counting views without double counting refreshes.
Monetization
Memberships or paid courses.
How to build a YouTube clone with Vibecode
- 1
Remix the template
Open the Vidora share page and press Remix. Vibecode copies the whole Swift project into your account, so you start from a working app instead of an empty screen. Remixing is free.
- 2
Make it yours by chatting
Tell the agent what to change in plain English, for example: “Rename the app to Lessonly, make it a video course library for guitar, and add a progress checkmark on watched lessons.” Each change rebuilds the app and runs it in Vibecode's cloud iOS simulator, right in your browser.
- 3
Publish to the App Store
Click Publish, choose Publish to App Store and sign in with your Apple ID. Vibecode builds, signs and uploads the app to Apple, with no Mac and no Xcode. You need an Apple Developer account ($99/year) and the Plus plan or higher.
The hard parts of a real YouTube clone
Screens are the quick part. These are what take the time once real people use it.
Uploads and streaming
A 10-minute phone video is hundreds of megabytes. Upload it in chunks so a dropped connection can resume, then transcode it into adaptive HLS renditions (240p to 1080p) so playback starts fast on any connection. Services like Mux, Cloudflare Stream or api.video handle transcoding and delivery.
A player that survives navigation
The mini-player only works if one shared player lives above the navigation stack, so moving between screens never tears it down. Build it that way from the start; retrofitting it later means rewriting navigation.
Counting views honestly
A view should count once per viewer per period after a few seconds of real playback, not on every page load. Write raw play events, then aggregate them in batches rather than updating a counter on every request.
Copyright and moderation
Hosting other people's videos needs a takedown process for copyright claims and Apple's Guideline 1.2 tools: filtering, reporting and blocking. Apple's Guideline 5.2.3 also rules out downloading videos from YouTube or other services without permission.
Take it from template to real app
Each step is one message to the Vibecode agent. Send them one at a time and test in between.
- 1
Channels and accounts
Vibecode Cloud adds sign-in and a database for channels, subscriptions and comments.
Prompt
Add Vibecode Cloud. Let people sign up, create a channel with a name and avatar, subscribe to channels and post comments.
- 2
Video uploads
Upload to storage, generate a thumbnail and publish to the channel.
Prompt
Let a signed-in user upload a video from their library with a title and description, generate a thumbnail, and publish it to their channel and Home.
- 3
Watch history and views
Record playback events and use them for history, resume and view counts.
Prompt
Record a view after 10 seconds of playback, save watch progress so videos resume where I left off, and show it in History.
- 4
Memberships and push
RevenueCat for channel memberships, push notifications for new uploads.
Prompt
Add a RevenueCat monthly membership that unlocks members-only videos, and send a push notification when a subscribed channel uploads.
What a YouTube clone costs
YouTube clone scripts are usually web platforms (often PHP) with an admin panel, where you provide the server and video storage. The Vibecode template is a native Swift iPhone app with a real player and mini-player you can reshape by chatting.
| Option | Typical cost | What you get | Still on you |
|---|---|---|---|
| Clone script | $299–$5,000 one-time license | Source code for the apps, usually with an admin panel | Servers, setup, rebranding, store accounts and future updates |
| Freelancer | Hourly or a fixed bid, set by scope | Custom code built to your spec | Writing the spec, reviewing the work, hosting and store submission |
| Development agency | Custom quote per project | Design, build, testing and launch handled for you | A budget and timeline fixed by contract; every change goes through the agency |
| VibecodeThis template | Free to remix; plans from $20 a month | A native Swift YouTube-style iPhone app you change by chatting, with App Store publishing (Plus and up) and source code download (Pro and Max) | A backend for real data (one prompt with Vibecode Cloud) and an Apple Developer account ($99/year) |
Clone-script prices are the range listed by script marketplaces and vendors. Vibecode plans and what each includes are on the pricing page.
Frequently asked questions
Is it legal to build a YouTube clone?
Yes. Video catalogs, watch pages and subscriptions are common patterns. You can't use YouTube's name, the play-button logo or its red branding, and you can't show YouTube videos outside YouTube's official embed and API terms. The template is called Vidora and plays free stock clips.
Can I publish a YouTube clone to the App Store?
Yes, as a focused video product: courses, a creator's own library, a sports league, internal training. Apple rejects plain copies (Guideline 4.1), needs moderation tools if users upload (1.2), and does not allow downloading videos from other services without permission (5.2.3). Vibecode publishes to the App Store on the Plus plan and up, with your Apple Developer account.
Does the YouTube clone work on Android?
No. Vidora is a native iPhone app written in Swift, so it runs on iPhone only. For Android, start a Mobile app project in Vibecode, which builds React Native apps for iPhone and Android, and paste the prompt from this page.
Can I add a real backend to the YouTube clone?
Yes. Vidora runs on sample data so it works the moment you remix it. When you need real users, Vibecode Cloud adds a database, sign-in and file storage with one prompt, enough for accounts, channels, video files and thumbnails, subscriptions, comments and view events. It is on the Plus plan and up. You can also connect Supabase, Firebase or your own API.
Is this a website or a mobile app?
A mobile app: a native iPhone app written in Swift with SwiftUI. If you want a YouTube-style website, start a Web app project in Vibecode and describe the same screens.
Can users upload videos?
Not in the template, which streams a fixed set of free stock clips. Ask the agent for uploads with Vibecode Cloud storage. For long videos or heavy traffic, add a video service for adaptive streaming.
Is the Vidora template free?
Remixing it is free with a Vibecode account and gives you your own copy of the Swift project. Changes you ask the agent for use credits. Publishing to the App Store needs a paid plan (Plus and up) and an Apple Developer account ($99/year), and downloading the source code is on the Pro and Max plans. See the pricing page for current plans.
Other guides: Uber cloneAirbnb cloneSpotify cloneTinder cloneCash App cloneDiscord clone
Browse all app templates. Choosing a builder? Read the best AI mobile app builders guide or compare Vibecode with other app builders.











