From dc7dda939e3b7eb3688efdb04dc8e16bcf5ee095 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Mon, 1 Apr 2024 11:01:40 -0700 Subject: [PATCH] feat: provide ability to set NS_SWIFTUI_BOOT macro if desired Users can disable Obj-C bootstrapping by defining: MACROS = NS_SWIFTUI_BOOT in their project's build.xcconfig file. This requires a NativeScriptApp.swift setup in the project and embedding enabled in @nativescript/core bootstrap --- project-template-ios/internal/main.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/project-template-ios/internal/main.m b/project-template-ios/internal/main.m index 04df522a..757dad94 100644 --- a/project-template-ios/internal/main.m +++ b/project-template-ios/internal/main.m @@ -10,6 +10,9 @@ #include "macros.h" #endif +#ifndef NS_SWIFTUI_BOOT +// Users can disable Obj-C bootstrapping by defining MACROS = NS_SWIFTUI_BOOT in their project's build.xcconfig file +// This requires a NativeScriptApp.swift to be setup in the project and embedding enabled in @nativescript/core bootstrap extern char startOfMetadataSection __asm("section$start$__DATA$__TNSMetadata"); NativeScript* nativescript; @@ -60,3 +63,5 @@ int main(int argc, char *argv[]) { return 0; } } + +#endif \ No newline at end of file