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

**URL:** https://forum.babylonjs.com/t/babylonnative-fails-to-create-archive-in-xcode-how-to-do-a-release-build/51512
**Category:** Questions
**Tags:** babylon-native, ios, xcode
**Created:** [June 21, 2024, 9:56am UTC](https://forum.babylonjs.com/t/babylonnative-fails-to-create-archive-in-xcode-how-to-do-a-release-build/51512 "2024-06-21T09:56:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)
#### Post date: [June 21, 2024, 9:56am UTC](https://forum.babylonjs.com/t/babylonnative-fails-to-create-archive-in-xcode-how-to-do-a-release-build/51512/1 "2024-06-21T09:56:08Z")

</div>

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:

```auto
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?

---

<div class="post-metadata">

### Author: ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)
#### Post date: [June 21, 2024, 11:59am UTC](https://forum.babylonjs.com/t/babylonnative-fails-to-create-archive-in-xcode-how-to-do-a-release-build/51512/2 "2024-06-21T11:59:02Z")

</div>

pinging [@BabylonNative](https://forum.babylonjs.com/groups/babylonnative)

---

<div class="post-metadata">

### Author: ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)
#### Post date: [June 21, 2024, 12:36pm UTC](https://forum.babylonjs.com/t/babylonnative-fails-to-create-archive-in-xcode-how-to-do-a-release-build/51512/3 "2024-06-21T12:36:34Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)
#### Post date: [June 24, 2024, 8:11am UTC](https://forum.babylonjs.com/t/babylonnative-fails-to-create-archive-in-xcode-how-to-do-a-release-build/51512/4 "2024-06-24T08:11:42Z")

</div>

Sure no problem 🙂

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.

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

```

---

<div class="post-metadata">

### Author: ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)
#### Post date: [June 24, 2024, 9:34am UTC](https://forum.babylonjs.com/t/babylonnative-fails-to-create-archive-in-xcode-how-to-do-a-release-build/51512/5 "2024-06-24T09:34:38Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![dnrn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dnrn/32/4723_2.png) [@dnrn](https://forum.babylonjs.com/u/dnrn)
#### Post date: [June 24, 2024, 10:54am UTC](https://forum.babylonjs.com/t/babylonnative-fails-to-create-archive-in-xcode-how-to-do-a-release-build/51512/6 "2024-06-24T10:54:09Z")

</div>

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!
