BabylonJS / BabylonReactNative

Build React Native applications with the power of Babylon Native
MIT License
372 stars 59 forks source link

Can't build Babylon React Native Playground on iOS #653

Open okwasniewski opened 1 month ago

okwasniewski commented 1 month ago

Hey,

I just wanted to make sure I did everything right, because I can't get RNTA based Test App to run on iOS.

This is the error that I'm getting:

CleanShot 2024-08-28 at 13 07 54@2x

Steps:

  1. cd Apps/BRNPlayground && npm install
  2. cd Package && npm install
  3. npx gulp buildIOSRNTA
  4. In theory the https://github.com/BabylonJS/BabylonReactNative/blob/master/Apps/BRNPlayground/postinstall.js file should do all the setup but it still wasn't working :(

Just wanted to make sure I didn't miss an important step. If not Im going to try to fix it

okwasniewski commented 1 month ago

It would be great if you could confirm if you are also running into this issue cc: @CedricGuillemet, @ryantrem

CedricGuillemet commented 1 month ago

IIRC this is linked to CMake version. try with 3.26.4 or < Did you try to build to build the legacy Playground?

okwasniewski commented 1 month ago

@CedricGuillemet Unfortunately, no luck with downgrading CMake. I didn't try legacy Playground because I need RNTA to get visionOS working. I'm going to investigate it further.

okwasniewski commented 1 month ago

I finally got it to build with CMake 3.24.0

By looking at the changelog it appears that a default behaviour for adding library search paths has been removed which may break the example.

CleanShot 2024-08-29 at 14 11 38@2x

I think we can bring back the old behaviour for newer CMake versions

okwasniewski commented 1 month ago

I think I found the solution,

When you set LIBRARY_SEARCH_PATHS of the main target to "$(PODS_ROOT)/../../../Modules/@babylonjs/Build/iOS/build"/** it works!

Im in touch with @tido64 to discuss what's the proper way of setting this up inside of React Native Test App.