Skip to content

Commit

Permalink
feat: allow NS_SWIFTUI_BOOT user defined setting
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Apr 2, 2024
1 parent c8b3df3 commit 0de9370
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"DEBUG=1",
"NS_SWIFTUI_BOOT=$(NS_SWIFTUI_BOOT:default=0)",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions project-template-ios/internal/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -64,4 +64,4 @@ int main(int argc, char *argv[]) {
}
}

#endif
#endif

0 comments on commit 0de9370

Please sign in to comment.