Closed CaryTrivett closed 1 year ago
if [ "$PLATFORM_NAME" == "iphoneos" ] then GYP_DEFINES="OS=ios" \ CARGO_BUILD_TARGET="aarch64-apple-ios" \ NODEJS_MOBILE_GYP="~/Downloads/AwesomeProject/node_modules/nodejs-mobile-gyp/bin/node-gyp.js" \ npm_config_node_gyp="~/Downloads/AwesomeProject/node_modules/nodejs-mobile-gyp/bin/node-gyp.js" \ npm_config_nodedir="~/Downloads/AwesomeProject/node_modules/nodejs-mobile-react-native/ios/libnode" \ npm_config_platform="ios" \ npm_config_format="make-ios" \ npm_config_arch="arm64" \ npm --verbose --foreground-scripts rebuild --build-from-source else GYP_DEFINES="OS=ios" \ CARGO_BUILD_TARGET="x86_64-apple-ios" \ NODEJS_MOBILE_GYP="$NODEJS_MOBILE_GYP_BIN_FILE" \ npm_config_node_gyp="$NODEJS_MOBILE_GYP_BIN_FILE" \ npm_config_nodedir="$NODEJS_HEADERS_DIR" \ npm_config_platform="ios" \ npm_config_format="make-ios" \ npm_config_arch="x64" \ npm --verbose --foreground-scripts rebuild --build-from-source fi popd
When PLATFORM_NAME is not iphoneos, npm_config_arch="x64"
Related to this discussion. https://github.com/orgs/nodejs-mobile/discussions/22
When PLATFORM_NAME is not iphoneos, npm_config_arch="x64"