BabylonNative fails to create archive in xCode - how to do a release build?

I’ve ported a project we created in BabylonJS to BabylonNative.
I’m able to build and run it on a iPhone, and the experience works as intended.

We would like to bundle it as an iOS app, but we’re not able to create an archive. Which is needed for this.

When I try to create the archive a release build it seems the linking is not created for release:

clang: error: no such file or directory: '/build/_deps/jsruntimehost-build/Core/AppRuntime/Release-iphoneos/libAppRuntime.a'

How can I create a release build, and use it to create an archive in xCode?

pinging @BabylonNative

Can you please list all the steps from cloning to the commands for archive creation?
I’ll need to repro with BN playground to see what’s wrong.
If you have some sensitive info you don’t want to share publicly, feel free to send me a DM.

I’m glad to hear the experience works as intended with BN.

1 Like

Sure no problem :slight_smile:

As I mention, the issue could be me. I am new to xCode, so could have missed some details.

I can reproduce with the following steps.

  1. Clone the BabylonNative project
  2. Creating a build folder and building with cmake:
    cmake .. -G Xcode -D IOS=ON -D DEPLOYMENT_TARGET=15

After this I’m able to open the project in xCode and run the Playground target on a iPhone.
However I am not able to create an archive (release build) of the Playground.

I change the build to Any iOS Device (arm64) and from the menu I choose product → Archive. This results in issues all related to missing files or directory, as mention above.

When I look in the folder, it’s correct the Release-iphones folder is missing.

$ls _deps/jsruntimehost-build/Core/AppRuntime/  CMakeFiles/           Debug-iphoneos/       EagerLinkingTBDs/     cmake_install.cmake

I could not repro. I’m able to build release for profiling or archive.
The only small issue I had was to change .plist path in build settings. So, not the same as your issue.
Can it be related to provisionning profile? No other warning in the build? Did you try to build for profiling?

1 Like

I was able to create an archive build after doing a profiling build.

Why this works is a mystery!
Thanks for your quick answer and putting me in the correct direction!

1 Like