Build an Instagram Clone App in Swift with AI

Updated 6 min read

Short answer

An Instagram clone needs five things to feel real: a photo feed, stories with a progress bar, double-tap likes, comments, and profiles with a post grid. Vibecode's free template, Pixgram, has all five plus an explore grid and direct messages, as a native iPhone app written in Swift with SwiftUI, running on sample data. Remix it, rename it, then ask the AI to add real accounts and photo uploads.

See it running

Pixgram, a Instagram clone built with Vibecode

Template

PixgramiOS

Instagram clone · Swift and SwiftUI

Photo feed, stories, double-tap likes, comments, explore grid, DMs and profiles.

Remix this template

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 page
Pixgram running in the Vibecode iOS simulator

The prompt we used

This is the prompt that built Pixgram in Vibecode. Paste it into a new iOS app project to build your own copy from scratch, or change the details first.

Prompt · 785 words

Build a polished, fully working native iOS app in SwiftUI named Pixgram: an original photo-sharing social app that recreates the core experience of Instagram, but with its own name, its own original logo and its own color palette. Do NOT use the Instagram name, logo, wordmark, app icon or any trademarked asset anywhere in the app. Design an original Pixgram logo mark, drawn with SwiftUI shapes (Path/Canvas) or made as a generated image asset, and use it in the header.

Screens and flows (bottom tab bar: Home, Explore, Create, Activity, Profile; light theme, white background, near-black text, accent gradient for story rings is your own sunset-coral to violet blend):
1. Home feed. Header: Pixgram wordmark in a script-style display font (a bundled .ttf or a drawn wordmark), a heart icon (opens Activity) and a paper-plane icon (opens Messages). Stories row: "Your story" with a + badge, then 9 friends with gradient rings and usernames. Feed of 8 posts: avatar, username, verified tick on two, location line, square or 4:5 photo, actions row (heart, comment, share, bookmark), "Liked by maya.lens and 1,284 others", caption with username bold and "more" expander, "View all 36 comments", "2 hours ago". One post is a 3-photo carousel with swipe and page dots and a "1/3" pill.
2. Likes: double-tap a photo shows a big white heart burst that pops and fades over the photo and likes the post; the heart icon fills red with a bounce, like count updates; tap again to unlike. Bookmark toggles filled.
3. Stories: tap a story ring to open a full-screen story viewer: segmented progress bars at the top that fill over 5 s and auto-advance, avatar + name + time, tap right half for next, left half for previous, it moves on to the next friend's stories at the end, swipe down or X to close, "Send message" reply bar with heart and send. Viewed rings turn grey in the stories row.
4. Comments: the comment icon opens a bottom sheet with 12 comments (avatars, likes on comments, reply links), an emoji quick bar and an input; posting adds your comment at the top with an animation.
5. Explore: search bar, 3-column photo grid with a few 2x2 tiles; tapping a tile opens that post in a scrollable feed. Typing in search shows matching accounts.
6. Create: pick a photo from a fixture gallery grid (12 photos), next to a caption screen, Share puts the new post at the top of Home with a short "Posted" toast.
7. Activity: "Today / This week" sections of likes, follows (Follow button toggles to Following) and comments.
8. Profile (ansh.shoots): avatar with story ring, posts / followers / following counts, name, bio with a link, Edit profile and Share profile buttons, story highlights row, grid / reels / tagged tabs, 3-column grid of 15 posts.
9. Messages: list of 8 chats with online dots; tap opens a thread with bubbles; sending a message appends it and the other person replies after a short typing indicator.

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 Instagram 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.

Instagram clone features

What Pixgram 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.

  • Pixgram, a Instagram clone built with Vibecode: screen 1
  • Pixgram, a Instagram clone built with Vibecode: screen 2
  • Pixgram, a Instagram clone built with Vibecode: screen 3
  • Pixgram, a Instagram clone built with Vibecode: screen 4

In the template

  • Home feed

    Photo and carousel posts with captions, like counts, comment previews, locations and timestamps.

  • Stories

    Story rings, a full-screen viewer with segmented progress bars, tap to skip, auto-advance and seen state.

  • Double-tap to like

    Heart burst over the photo, a bouncing like button, live like counts and bookmarks.

  • Comments

    Bottom sheet with replies, comment likes, an emoji bar and posting your own comment.

  • Explore and search

    Photo grid with large tiles that opens posts in a feed, plus account search as you type.

  • Create a post

    Pick a photo, write a caption and share it to the top of the feed.

  • Activity

    Likes, comments and new followers grouped by Today and This week, with Follow back.

  • Profile

    Post, follower and following counts, bio with a link, story highlights and a post grid.

  • Direct messages

    Chat list with online dots and threads where the other person replies after a typing indicator.

Add with a prompt

  • Reels

    A full-screen vertical video feed, added as its own tab.

  • Sign-up and real uploads

    Accounts and photo library uploads need a backend and photo permissions.

  • Push notifications

    Alerts for likes, comments and follows.

How to build an Instagram clone with Vibecode

  1. 1

    Remix the template

    Open the Pixgram 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. 2

    Make it yours by chatting

    Tell the agent what to change in plain English, for example: “Rename the app to Trailgram, make it a feed for hikers, and add a trail difficulty tag under every post.” Each change rebuilds the app and runs it in Vibecode's cloud iOS simulator, right in your browser.

  3. 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 Instagram clone

Screens are the quick part. These are what take the time once real people use it.

Serving photos fast

Instagram never sends the original photo to the feed. Each upload is resized into a few widths and the app asks for the one that fits the screen, with a placeholder while it loads. A feed of full-size 12-megapixel photos stalls on mobile data, so resize on upload from day one.

Stories that expire

A story is a post with a 24-hour lifetime and a per-viewer seen list. The server has to drop expired stories when it reads them, and the app should preload the next story's image so the progress bar never runs over a blank frame.

Feed order and paging

A chronological feed is one query; a ranked feed is a scoring job. Either way, page with a cursor (the last post's time and id) rather than page numbers, or new posts shift the list and people see duplicates while scrolling.

Moderation is a store requirement

Apple's App Review Guideline 1.2 requires apps with user posts to filter objectionable content, let people report posts and block users, and publish contact details. Ship report and block with the first real users, not after a rejection.

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. 1

    Real accounts

    Vibecode Cloud adds email sign-in and a database with one prompt. Once people can sign up, Apple also requires a way to delete the account inside the app.

    Prompt

    Add Vibecode Cloud. Let people sign up with email, pick a username and avatar, and delete their account from Settings.

  2. 2

    Photo uploads

    Swap the sample gallery for the photo library, resize before upload and keep the files in Vibecode Cloud storage.

    Prompt

    Let users pick a photo from their library, resize it to 1080 px wide, upload it to cloud storage and save the post with its caption.

  3. 3

    Follows and a real feed

    Store follows and build the home feed from the people you follow, loaded a page at a time.

    Prompt

    Store follows in the database and build Home from posts by people I follow, newest first, 10 at a time with infinite scroll.

  4. 4

    Push and subscriptions

    Push notifications bring people back for likes and follows. For paid extras, RevenueCat handles App Store subscriptions.

    Prompt

    Send a push notification when someone likes, comments on or follows me. Add a RevenueCat monthly subscription that unlocks subscriber-only stories.

What an Instagram clone costs

Instagram clone scripts sell you source code and an admin panel that you host, configure and rebrand yourself. The Vibecode template is a native Swift iPhone app on sample data, which you own and change by chatting. You add the backend when you need it, with one prompt.

Ways to get a Instagram clone, by cost and what you get
OptionTypical costWhat you getStill on you
Clone script$299–$5,000 one-time licenseSource code for the apps, usually with an admin panelServers, setup, rebranding, store accounts and future updates
FreelancerHourly or a fixed bid, set by scopeCustom code built to your specWriting the spec, reviewing the work, hosting and store submission
Development agencyCustom quote per projectDesign, build, testing and launch handled for youA budget and timeline fixed by contract; every change goes through the agency
VibecodeThis templateFree to remix; plans from $20 a monthA native Swift Instagram-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 make an Instagram clone?

Yes. A photo feed, stories and double-tap likes are common patterns that many social apps use. What you can't use is Instagram's name, logo, icons, screenshots or other brand assets, or anything that suggests Meta made or endorses your app. That is why the template is called Pixgram and has its own logo and colors. Apple's App Review Guideline 4.1 also rejects apps that impersonate another app.

Can I publish an Instagram clone to the App Store?

Yes, if it is your own product built on the pattern: a photo app for a niche, a club or a brand. Apple rejects straight copies (Guideline 4.1) and apps that add nothing new (4.3). Social apps also need reporting, blocking and content filtering (1.2), and in-app account deletion once people can sign up. Vibecode publishes to the App Store on the Plus plan and up, with your Apple Developer account.

Does the Instagram clone work on Android?

No. Pixgram 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 Instagram clone?

Yes. Pixgram 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, posts, follows, likes, comments and photo files. It is on the Plus plan and up. You can also connect Supabase, Firebase or your own API.

Can people upload their own photos?

Not in the template. It posts from a fixed gallery of sample photos so it runs without asking for any permissions. Ask the agent to add photo library access and Vibecode Cloud storage, and it adds the permission prompt, resizing and upload.

Does the Instagram clone include Reels?

No. It covers the feed, stories, explore, messages and profiles. Ask the agent to add a Reels tab: a full-screen vertical video pager with likes and comments on each video.

Is the Pixgram 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 cloneNetflix cloneSpotify cloneTinder cloneCash App clone

Browse all app templates. Choosing a builder? Read the best AI mobile app builders guide or compare Vibecode with other app builders.

Start from a working Instagram clone

Remix Pixgram for free, then change it by chatting.

Remix this template