File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ elseif(TARGET_PLATFORM STREQUAL "macos")
54
54
set (TARGET_PLATFORM_SPEC "macos-arm64_x86_64" )
55
55
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTARGET_PLATFORM_MACOS" )
56
56
57
+ # Force dSYM generation for macOS (by default, they're embedded into the
58
+ # binary itself, giving us a 14,981,336 byte / 15 MB binary)
59
+ # set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym")
60
+ # set(CMAKE_XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
57
61
else ()
58
62
message (FATAL_ERROR "Unknown target platform: ${TARGET_PLATFORM} " )
59
63
return ()
@@ -302,7 +306,7 @@ if(TARGET_PLATFORM_MACOS)
302
306
# Convert the Info.plist from binary format to XML format.
303
307
# This seemed to unblock a build error when using in React Native.
304
308
add_custom_command (TARGET ${NAME} POST_BUILD
305
- COMMAND plutil -convert xml1 $<TARGET_FILE_DIR:${NAME} >/Info.plist
309
+ COMMAND plutil -convert xml1 $<TARGET_FILE_DIR:${NAME} >/Resources/ Info.plist
306
310
)
307
311
set (METADATA_FILE "metadata.macos.nsmd" )
308
312
elseif (TARGET_PLATFORM_IOS)
Original file line number Diff line number Diff line change @@ -105,8 +105,6 @@ checkpoint "Building NativeScript for macOS"
105
105
106
106
cmake_build macos x86_64 arm64
107
107
108
- cp " $DIST /intermediates/macos/$CONFIG_BUILD /libNativeScript.dylib" " $DIST /../packages/macos/dist/macos/NativeScript.node"
109
-
110
108
fi
111
109
112
110
if $BUILD_VISION ; then
@@ -145,11 +143,6 @@ if $BUILD_IPHONE; then
145
143
-debug-symbols " $DIST /intermediates/ios/$CONFIG_BUILD -iphoneos/NativeScript.framework.dSYM" )
146
144
fi
147
145
148
- if $BUILD_MACOS ; then
149
- XCFRAMEWORKS+=( -framework " $DIST /intermediates/macos/$CONFIG_BUILD /NativeScript.framework"
150
- -debug-symbols " $DIST /intermediates/macos/$CONFIG_BUILD /NativeScript.framework.dSYM" )
151
- fi
152
-
153
146
if $BUILD_VISION ; then
154
147
XCFRAMEWORKS+=( -framework " $DIST /intermediates/visionos/$CONFIG_BUILD -xros/NativeScript.framework"
155
148
-debug-symbols " $DIST /intermediates/visionos/$CONFIG_BUILD -xros/NativeScript.framework.dSYM" )
@@ -176,7 +169,15 @@ if [[ -n "${XCFRAMEWORKS[@]}" ]]; then
176
169
fi
177
170
fi
178
171
172
+ # We're currently distributing two separate packages:
173
+ # 1. UIKit-based (@nativescript/ios-node-api)
174
+ # 2. AppKit-based (@nativescript/macos-node-api)
175
+ # As such, there's no point bundling both UIKit-based and AppKit-based into a
176
+ # single XCFramework.
179
177
if $BUILD_MACOS ; then
178
+ XCFRAMEWORKS=( -framework " $DIST /intermediates/macos/$CONFIG_BUILD /NativeScript.framework"
179
+ -debug-symbols " $DIST /intermediates/macos/$CONFIG_BUILD /NativeScript.framework.dSYM" )
180
+
180
181
if [[ " $TARGET_ENGINE " == " none" ]]; then
181
182
checkpoint " Creating the XCFramework for macOS (NativeScript.apple.node)"
182
183
You can’t perform that action at this time.
0 commit comments