Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Failed while running Xcode

ansrthy opened this issue · comments

Encountering two problems: 1. Undefined symbols, 2. Linker command failed with exit code 1. I'm using simulators to execute the project; could this be causing the issues? Seeking assistance to resolve these issues.

Apple does not support ARKit in the iOS Simulator. It's impossible to run ARKit apps in the simulator, so this is expected to fail.

Thank you for the information. Can I use an iPad instead of an iPhone, and are there any specific configurations, such as the iOS version and XCode version, that I need to consider?

I also encountered the same issue. The build for the real device fails with the error mentioned above.

The versions I'm using are as follows:
MacBook Pro M2 Venture 13.5
Unity: 2023.2.2f1 Apple Silicon
XCode: 15.2

I just opened the cloned repo with a freshly installed Unity 2023.2.2f1, then build it.

We have reproduced the linker error on Xcode 15.2 with Apple Silicon. We're not sure why yet, but investigation has begun.

Ok after our team has looked at this, it appears that the issue is that Apple has broken forward compatibility in Xcode 15.2 with binaries that were compiled on Xcode 14.3. Our next patch release of 6.0 will contain recompiled binaries on a newer version of Xcode, and this is no longer a problem.

For now the recommendation is to use an older version of Xcode. We haven't seen this issue reported on 15.1 or 15.0.

Thank you for the information....
I'm using macOS Sonoma 14.2.1 (Intel Core i3) and Xcode version 15.2. I'm encountering a problem again. Is this version also having problems, or is it only for Silicon?

We didn't test this build with an Intel Mac on Xcode 15.2, but I think it's safe to assume that this is an Xcode 15.2 issue. Same instructions apply for Intel most likely.

Thank you for responding so quickly.

commented

Ok after our team has looked at this, it appears that the issue is that Apple has broken forward compatibility in Xcode 15.2 with binaries that were compiled on Xcode 14.3. Our next patch release of 6.0 will contain recompiled binaries on a newer version of Xcode, and this is no longer a problem.

For now the recommendation is to use an older version of Xcode. We haven't seen this issue reported on 15.1 or 15.0.

is it correct to assume this will(should) be 6.0.0-pre.6 ?

is it correct to assume this will(should) be 6.0.0-pre.6 ?

The next release of 6.0 is actually likely going to be 6.0.0. We are preparing to bring the package out of pre-release.

We didn't test this build with an Intel Mac on Xcode 15.2, but I think it's safe to assume that this is an Xcode 15.2 issue. Same instructions apply for Intel most likely.

I tried the steps on an Intel-based Mac running Xcode 15.0.1, but encountered the same problems(1. Undefined symbols, 2. Linker command failed with exit code 1). Is there an issue specific to Intel Macs, or is there an alternative solution available?

The following worked on my M2 Mac.

  • Install Xcode 15.0.1. xcode-select if you install it at different location
  • Download v5.0.6 zip file, instead of cloning latest git repo
  • Install Unity 2022.3.18f1 instead of the version specified by the repo (older version of Unity has another issue with xcode 15)
  • Start Unity
  • In the Build Setting > iOS > "Run in Xcode", make sure the right Xcode installation is specified if you have multiple Xcode installs
  • Build it on Unity
  • Open the xcodeproject by XCode and make sure Xcode 15.0.1 is used

The following worked on my M2 Mac.

  • Install Xcode 15.0.1. xcode-select if you install it at different location
  • Download v5.0.6 zip file, instead of cloning latest git repo
  • Install Unity 2022.3.18f1 instead of the version specified by the repo (older version of Unity has another issue with xcode 15)
  • Start Unity
  • In the Build Setting > iOS > "Run in Xcode", make sure the right Xcode installation is specified if you have multiple Xcode installs
  • Build it on Unity
  • Open the xcodeproject by XCode and make sure Xcode 15.0.1 is used

Thank you so much! Let me give it a try.

I tried, but it shows version problems.

The following worked on my M2 Mac.

  • Install Xcode 15.0.1. xcode-select if you install it at different location
  • Download v5.0.6 zip file, instead of cloning latest git repo
  • Install Unity 2022.3.18f1 instead of the version specified by the repo (older version of Unity has another issue with xcode 15)
  • Start Unity
  • In the Build Setting > iOS > "Run in Xcode", make sure the right Xcode installation is specified if you have multiple Xcode installs
  • Build it on Unity
  • Open the xcodeproject by XCode and make sure Xcode 15.0.1 is used

Thank you so much! Let me give it a try.

@ansrthy We just released 6.0.0-pre.6. Let us know how it goes for you. Note that we have changed the minimum Unity version of AR Foundation 6 from 2023.2 to 2023.3 due to significant changes in URP and plugin serialization in 2023.3 that are not backwards-compatible.

@andyb-unity Yes , it worked for me. Thank you so much for sharing such valuable content on AR Foundation With Unity3d! and also for being so quick to respond and support . Your dedication to helping us learn is truly appreciated!. Keep up the great work!