Vue NativeVue Native
Guide
Components
Composables
Navigation
Architecture
  • iOS
  • Android
  • macOS
GitHub
Guide
Components
Composables
Navigation
Architecture
  • iOS
  • Android
  • macOS
GitHub
  • Getting Started

    • Introduction
    • Installation
    • Your First App
    • Project Structure
  • Core Concepts

    • Components
    • Styling
    • Theming
    • TypeScript
    • Navigation
    • Navigation Components
    • Native Modules
    • Native Code Blocks
    • Hot Reload
  • UI Patterns

    • Forms and v-model
    • Shared Element Transitions
    • Teleport
    • Custom Native Components (escape hatch)
  • Quality & Debugging

    • Testing
    • Debugging
    • Error Handling
  • Platform Hardening

    • Security
    • Accessibility
    • Performance
  • Integration Guides

    • State Management
    • Deep Linking & Universal Links
    • State Persistence
    • Push Notifications
    • Error Reporting & Monitoring
  • Tooling

    • Managed Workflow
    • VS Code Extension
    • Neovim Plugin
  • Building & Releasing

    • Building Native Apps
    • Deployment & App Store Submission
  • Reference

    • Upgrade Guide
    • Migrating from React Native
    • Known Limitations & Platform Differences
    • Troubleshooting

Project Structure

my-app/
├── app/
│   ├── main.ts          # Entry point — creates and mounts the Vue app
│   ├── App.vue          # Root component
│   └── views/           # Screen components
├── ios/                 # Xcode project
│   ├── Sources/
│   │   ├── AppDelegate.swift
│   │   ├── SceneDelegate.swift  (or subclass VueNativeViewController)
│   │   └── Info.plist
│   └── project.yml      # XcodeGen project definition
├── android/             # Android Gradle project
│   └── app/
│       └── src/main/
│           ├── kotlin/…/MainActivity.kt  (extends VueNativeActivity)
│           └── AndroidManifest.xml
├── dist/                # Built JS bundle (auto-generated, do not commit)
│   └── vue-native-bundle.js
├── vite.config.ts
└── package.json

Key files

app/main.ts

Creates the Vue app and starts the native renderer:

import { createApp } from '@thelacanians/vue-native-runtime'
import App from './App.vue'

createApp(App).start()

vite.config.ts

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueNative from '@thelacanians/vue-native-vite-plugin'

export default defineConfig({
  plugins: [vue(), vueNative()],
})

The CLI passes the selected run, build, or targeted dev platform through VUE_NATIVE_PLATFORM. That target overrides the plugin option. An explicit platform still acts as the target for direct Vite commands and untargeted vue-native dev when the environment variable is absent.

iOS: SceneDelegate.swift

The simplest setup uses VueNativeViewController:

import UIKit
import VueNativeCore

class MyAppViewController: VueNativeViewController {
    override var bundleName: String { "vue-native-bundle" }
    // For hot reload during development:
    // override var devServerURL: URL? { URL(string: "ws://localhost:8174") }
}

Android: MainActivity.kt

import com.vuenative.core.VueNativeActivity

class MainActivity : VueNativeActivity() {
    override fun getBundleAssetPath() = "vue-native-bundle.js"
    // For hot reload during development:
    // override fun getDevServerUrl() = "ws://10.0.2.2:8174"
}
Edit this page
Last Updated: 7/28/26, 4:10 PM
Contributors: github-actions[bot]
Prev
Your First App