diff --git a/project-template-ios/__PROJECT_NAME__.xcodeproj/project.pbxproj b/project-template-ios/__PROJECT_NAME__.xcodeproj/project.pbxproj index a77371a9..c782d1cb 100644 --- a/project-template-ios/__PROJECT_NAME__.xcodeproj/project.pbxproj +++ b/project-template-ios/__PROJECT_NAME__.xcodeproj/project.pbxproj @@ -434,6 +434,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", "DEBUG=1", + "NS_SWIFTUI_BOOT=$(NS_SWIFTUI_BOOT:default=0)", ); HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -460,6 +461,7 @@ "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "__PROJECT_NAME__/__PROJECT_NAME__-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = "NS_SWIFTUI_BOOT=$(NS_SWIFTUI_BOOT:default=0)"; HEADER_SEARCH_PATHS = ( "$(inherited)", "$SRCROOT/internal/Swift-Modules", diff --git a/project-template-ios/internal/main.m b/project-template-ios/internal/main.m index 757dad94..ae50c27e 100644 --- a/project-template-ios/internal/main.m +++ b/project-template-ios/internal/main.m @@ -10,7 +10,7 @@ #include "macros.h" #endif -#ifndef NS_SWIFTUI_BOOT +#if NS_SWIFTUI_BOOT == 0 // 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 @@ -64,4 +64,4 @@ int main(int argc, char *argv[]) { } } -#endif \ No newline at end of file +#endif