NativeScript / ios

NativeScript for iOS and visionOS using V8
https://docs.nativescript.org/guide/ios-marshalling
131 stars 33 forks source link

feat(visionos): support for xros platform #235

Closed NathanWalker closed 8 months ago

NathanWalker commented 10 months ago
  1. set build.xcconfig:
NS_SWIFTUI_BOOT  = 1
  1. Add App_Resources/iOS/src/NativeScriptApp.swift with the following:
import SwiftUI

@main
struct NativeScriptApp: App {

    var body: some Scene {
        NativeScriptMainWindow()
    }
}
  1. Enable embedded flag on boot, for example in Angular apps it can be enabled with:
runNativeScriptAngularApp({
  embedded: true, // <-- this enables embedded mode
  appModuleBootstrap: () => platformNativeScript().bootstrapModule(AppModule),
});