Replies: 1 comment
-
Thanks for the tip! I'll try this myself, and indeed, I have once used |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been researching how to build nodejs-mobile for running on iOS Simulator for arm64. My first attempt was modifying the ios build scripts so it would only build nodejs with
--dest-os=ios --dest-cpu=arm64
and then build both frameworks (iphoneos
andiphonesimulator
) with-arch arm64
. But my attempt failed atld
command for-arch arm64 -sdk iphonesimulator
with an error that did not make much sense saying that the nodejslib*.a
were built foriOS
instead ofiOS Simulator
.So after more research it turns out we can simply transform the binary built for iphone on arm64 into iphonesimulator arm64. The command was taken from this great article:
Which produces a new binary that will run in iOS Simulator on arm64. I can confirm this is at least working for me (I am building a swift library on top of nodejs mobile)
I can open a PR with the necessary changes. I think we can use
lipo
to build a version of NodeMobile for both x86_64 and arm64.Beta Was this translation helpful? Give feedback.
All reactions