You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Project: nodejs-mobile
Version: latest
Mobile device: iPhone 12 Pro Max Simulator
Mobile OS and version: M1 Macbook 13"
Development Node.js: 14.17.5
Development platform: Darwin Nicks-MBP 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec 2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 arm64
When building for iOS Simulator in Xcode on an M1 mac, you cannot link directly against NodeMobile.framework. You will get the error building for ios simulator but the linked framework NodeMobile was built for iOS. So you must link against NodeMobile.xcframework.
However, since the iOS simulator is arm64 on an M1 mac, xcode looks for the ios-arm64-simulator slice inside the xcframework. Unfortunately, for some reason, the generated xcframework only contains ios-x86_64-simulator and ios-arm64. I've tried generating a new arm64 simulator framework by copying this line, changing the sdk to iphonesimulator, and building to a different location, but unfortunately xcode detects the libnode (and libuv etc...) architectures as built for iOS, not iOS simulator. So somehow libnode (and libuv and all the rest), need to be built using arm64, but specifically linked against the iOS Simulator SDK, not the iOS SDK.
I would make the change myself, but I don't know enough about cmake and the rest of the build system to do it. But basically all the dependent libraries and NodeMobile just need another architecture slice in the xcframework. As it stands though, supporting this would seem to require switching to building and linking against an xcframework by default.
The text was updated successfully, but these errors were encountered:
Project: nodejs-mobile
Version: latest
Mobile device: iPhone 12 Pro Max Simulator
Mobile OS and version: M1 Macbook 13"
Development Node.js:
14.17.5
Development platform:
Darwin Nicks-MBP 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec 2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 arm64
When building for iOS Simulator in Xcode on an M1 mac, you cannot link directly against
NodeMobile.framework
. You will get the errorbuilding for ios simulator but the linked framework NodeMobile was built for iOS
. So you must link againstNodeMobile.xcframework
.However, since the iOS simulator is
arm64
on an M1 mac, xcode looks for theios-arm64-simulator
slice inside the xcframework. Unfortunately, for some reason, the generated xcframework only containsios-x86_64-simulator
andios-arm64
. I've tried generating a new arm64 simulator framework by copying this line, changing the sdk toiphonesimulator
, and building to a different location, but unfortunately xcode detects the libnode (and libuv etc...) architectures as built for iOS, not iOS simulator. So somehow libnode (and libuv and all the rest), need to be built usingarm64
, but specifically linked against the iOS Simulator SDK, not the iOS SDK.I would make the change myself, but I don't know enough about cmake and the rest of the build system to do it. But basically all the dependent libraries and NodeMobile just need another architecture slice in the xcframework. As it stands though, supporting this would seem to require switching to building and linking against an
xcframework
by default.The text was updated successfully, but these errors were encountered: