I'm prototyping a simple C++ addon that will run on iOS devices and simulators (as well as Android devices) as part of a Node application using Node.js for Mobile Apps. When building my addon for iOS with prebuild-for-nodejs-mobile, the tool produces some output that confuses me. Here's an example:
% npx prebuild-for-nodejs-mobile ios-arm64-simulator
Minimum iOS version supported is incorrect (14.0), patching it with "vtool" to become 13.0
BUILT prebuilds/ios-arm64-simulator/dummyaddon.node
% tree prebuilds
prebuilds
└── ios-arm64-simulator
└── dummyaddon.node
└── dummyaddon
3 directories, 1 file
I have two questions. First, what is the cause of the "Minimum iOS version" warning and should this concern me?
Second, why does the tool place the final addon inside a directory with a ".node" extension, but the addon itself has no ".node" extension? I tried loading the addon in my Node app (running within an iOS simulator) using variations of the following:
I was then able to successfully call my C++ code from JavaScript.
Why does the tool produce this strange directory structure for iOS builds, rather than a simple .node file as it does for Android builds? Additionally, is there some method to package multiple iOS-related build targets together?
I'm prototyping a simple C++ addon that will run on iOS devices and simulators (as well as Android devices) as part of a Node application using Node.js for Mobile Apps. When building my addon for iOS with prebuild-for-nodejs-mobile, the tool produces some output that confuses me. Here's an example:
I have two questions. First, what is the cause of the "Minimum iOS version" warning and should this concern me?
Second, why does the tool place the final addon inside a directory with a ".node" extension, but the addon itself has no ".node" extension? I tried loading the addon in my Node app (running within an iOS simulator) using variations of the following:
All of these attempts failed until I finally renamed the inner-most file from "dummyaddon" to "dummyaddon.node" as follows:
I was then able to successfully call my C++ code from JavaScript.
Why does the tool produce this strange directory structure for iOS builds, rather than a simple .node file as it does for Android builds? Additionally, is there some method to package multiple iOS-related build targets together?
Thanks in advance for any help you can provide!