Skip to content

Commit

Permalink
feat: provide ability to set NS_SWIFTUI_BOOT macro if desired
Browse files Browse the repository at this point in the history
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
  • Loading branch information
NathanWalker committed Apr 1, 2024
1 parent b492b2c commit dc7dda9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions project-template-ios/internal/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -60,3 +63,5 @@ int main(int argc, char *argv[]) {
return 0;
}
}

#endif

0 comments on commit dc7dda9

Please sign in to comment.