Unity IOS cloud build gives unexpected xcode error

We have a Unity project where the IOS build on a local Mac creates a working build. When running the same build in the Unity cloud we get an unexpected error in the build. The Unity and Xcode version are set the same on both builds.

Unity: 2021.1.20f1
Xcode: 12.5.1

The error for the build is:

Linking UnityFramework
27514: ❌; Undefined symbols for architecture arm64
27515: > Symbol: _UnityARKit_FaceProvider_GetMaximumFaceCount
27516: > Referenced from: _ARKitFaceSubsystem_UnityARKit_FaceProvider_GetMaximumFaceCount_m989B8F9A715B39D93A3B0C23D2CD3B0B0C794CD2 in Unity.XR.ARKit.FaceTracking.o
27517: ❌; ld: symbol(s) not found for architecture arm64
27518: ❌; clang: error: linker command failed with exit code 1 (use -v to see invocation)
27519: ** ARCHIVE FAILED **
27520: The following build commands failed:
27521: Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-cyvbguublwdhmxfoivudhtpbfuol/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/UnityFramework.framework/UnityFramework normal
27522: (1 failure)
27523: Exit status: 65
27524: Maybe the error shown is caused by using the wrong version of Xcode
27525: Found multiple versions of Xcode in '/APPLICATION_PATH/'
27526: Make sure you selected the right version for your project
27527: This build process was executed using '/APPLICATION_PATH/Xcode12_5_1.app'
27528: If you want to update your Xcode path, either
27529: - Specify the Xcode version in your Fastfile
27530: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
27531: - Specify an absolute path to your Xcode installation in your Fastfile
27532: ▸ xcode_select "/APPLICATION_PATH/Xcode8.app"
27533: - Manually update the path using
27534: ▸ sudo xcode-select -s /APPLICATION_PATH/Xcode.app
27535: +-------------+-------------------------------+
27536: | Build environment |
27537: +-------------+-------------------------------+
27538: | xcode_path | /APPLICATION_PATH/Xcode12_5_1.app |
27539: | gym_version | 2.182.0 |
27540: | sdk | iPhoneOS14.5.sdk |
27541: +-------------+-------------------------------+
27542: ▸ _ARKitFaceSubsystem_UnityARKit_FaceProvider_Initialize_mFEFCC10A1D16F6A553EC9480EE070081C8201070 in Unity.XR.ARKit.FaceTracking.o
27543: ▸ _ARKitProvider__ctor_mF8ABBB36CFF4009240926841B45BBACD66DB52D9 in Unity.XR.ARKit.FaceTracking.o
27544: ▸ (maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_Initialize_mFEFCC10A1D16F6A553EC9480EE070081C8201070)
27545: ▸ ld: symbol(s) not found for architecture arm64
27546: ▸ clang: error: linker command failed with exit code 1 (use -v to see invocation)
27547: ⬆️ Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
27548: For the complete and more detailed error log, check the full log at:
27549: /BUILD_PATH/Library/Logs/gym/<Project>-Unity-iPhone.log
27550: Looks like fastlane ran into a build/archive error with your project
27551: It's hard to tell what's causing the error, so we wrote some guides on how
27552: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
27553: Before submitting an issue on GitHub, please follow the guide above and make
27554: sure your project is set up correctly.
27555: fastlane uses `xcodebuild` commands to generate your binary, you can see the
27556: the full commands printed out in yellow in the above log.
27557: Make sure to inspect the output above, as usually you'll find more error information there
27558: +------------------+-----------+
27559: | Lane Context |
27560: +------------------+-----------+
27561: | DEFAULT_PLATFORM | ios |
27562: | PLATFORM_NAME | ios |
27563: | LANE_NAME | ios build |
27564: +------------------+-----------+
27565: Error building the application - see the log above
27566: +------+---------------------------------------------------------------+-------------+
27567: | fastlane summary |
27568: +------+---------------------------------------------------------------+-------------+
27569: | Step | Action | Time (in s) |
27570: +------+---------------------------------------------------------------+-------------+
27571: | 1 | Verifying fastlane version | 0 |
27572: | 2 | default_platform | 0 |
27573: | 3 | set_info_plist_value | 0 |
27574: | 4 | update_project_provisioning | 0 |
27575: | 5 | sed -i '' '/PROVISIONING_PROFILE_SPECIFIER/d;/DEVELOPMENT_TEA | 0 |
27576: | | gym | 1035 |
27577: +------+---------------------------------------------------------------+-------------+
27578: fastlane finished with errors
27579: [!] Error building the application - see the log above
27580: ! build of 'default-ios' failed. ! xcode build failed.
27581: Publishing build 118 of 4034402/3e3834bf-96e9-4566-99a7-97152b63edfb for target 'default-ios'...
27582: Uploading extra_data/artifacts/icon.png ...done
27583: Uploading extra_data/build_report/summary.json ...done
27584: Uploading extra_data/build_report/summary.reflected.json ...done
27585: Uploading extra_data/build_report/steps.reflected.json ...done
27586: Uploading extra_data/build_report/files.reflected.json
27587: ...done

I would expect that the cloud build to have the same result as a local build.

Is there a solution so that the IOS build also works in the cloud build?

Hey @plaarakkers – shared this with the team and they have a few hypotheses for what’s going on. The best next step would be to submit a support ticket so they can look a bit closer at your logs.

Hi @rajivrao , sorry or the late reply, I will create a request from the dashboard.

1 Like

exact same issue here, same log messages. Any update @rajivrao ?
Unity: 2020.3.26f1
Xcode: 12.4.0

Hi,

Could you please try to build with Xcode 13.0 in Cloud Build and let me know if this resolves the issue? Let us know if this doesn’t resolve the issue though and I’ll look into this further

Bumped to Unity 2021.1.28 and Xcode 13.0, same issue.
Also I can’t build with higher Unity version on any target, crash at launch.

8623: ❌;  Undefined symbols for architecture arm64
8624: > Symbol: __RequestGalleryAuthorization
8625: > Referenced from: _iOsUtils__RequestGalleryAuthorization_mBD2C5275062BA53610A50A8F4683B25EB81D3A63 in Assembly-CSharp9.o
8626: ❌;  ld: symbol(s) not found for architecture arm64
8627: ❌;  clang: error: linker command failed with exit code 1 (use -v to see invocation)
8628: ** ARCHIVE FAILED **
8629: The following build commands failed:
8630:     Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-aaspwdisnkseuygsqdpvdylliyqe/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/UnityFramework.framework/UnityFramework normal (in target 'UnityFramework' from project 'Unity-iPhone')
8631: (1 failure)
8632: Exit status: 65
8633: Maybe the error shown is caused by using the wrong version of Xcode
8634: Found multiple versions of Xcode in '/APPLICATION_PATH/'
8635: Make sure you selected the right version for your project
8636: This build process was executed using '/APPLICATION_PATH/Xcode13_0_0.app'
8637: If you want to update your Xcode path, either
8638: - Specify the Xcode version in your Fastfile
8639: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
8640: - Specify an absolute path to your Xcode installation in your Fastfile
8641: ▸ xcode_select "/APPLICATION_PATH/Xcode8.app"
8642: - Manually update the path using
8643: ▸ sudo xcode-select -s /APPLICATION_PATH/Xcode.app
8644: +-------------+-------------------------------+
8645: |              Build environment              |
8646: +-------------+-------------------------------+
8647: | xcode_path  | /APPLICATION_PATH/Xcode13_0_0.app |
8648: | gym_version | 2.182.0                       |
8649: | sdk         | iPhoneOS15.0.sdk              |
8650: +-------------+-------------------------------+
8651: ▸       _iOsUtils__AddImageToGallery_mE6ABA6C00DF9DA06889B7A428DE1AF2F04589641 in Assembly-CSharp9.o
8652: ▸       _iOsUtils_AddImageToGallery_m469B18281B4F123F31685F555708CC3A27F2DD3B in Assembly-CSharp9.o
8653: ▸      (maybe you meant: _iOsUtils__AddImageToGallery_mE6ABA6C00DF9DA06889B7A428DE1AF2F04589641)
8654: ▸ ld: symbol(s) not found for architecture arm64
8655: ▸ clang: error: linker command failed with exit code 1 (use -v to see invocation)
8656: ⬆️  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
8657:   For the complete and more detailed error log, check the full log at:
8658:   /BUILD_PATH/Library/Logs/gym/MyProject-Unity-iPhone.log
8659: Looks like fastlane ran into a build/archive error with your project
8660: It's hard to tell what's causing the error, so we wrote some guides on how
8661: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
8662: Before submitting an issue on GitHub, please follow the guide above and make
8663: sure your project is set up correctly.
8664: fastlane uses `xcodebuild` commands to generate your binary, you can see the
8665: the full commands printed out in yellow in the above log.
8666: Make sure to inspect the output above, as usually you'll find more error information there
8667: +------------------+-----------+
8668: |         Lane Context         |
8669: +------------------+-----------+
8670: | DEFAULT_PLATFORM | ios       |
8671: | PLATFORM_NAME    | ios       |
8672: | LANE_NAME        | ios build |
8673: +------------------+-----------+
8674: Error building the application - see the log above
8675: +------+---------------------------------------------------------------+-------------+
8676: |                                  fastlane summary                                  |
8677: +------+---------------------------------------------------------------+-------------+
8678: | Step | Action                                                        | Time (in s) |
8679: +------+---------------------------------------------------------------+-------------+
8680: | 1    | Verifying fastlane version                                    | 0           |
8681: | 2    | default_platform                                              | 0           |
8682: | 3    | set_info_plist_value                                          | 0           |
8683: | 4    | update_project_provisioning                                   | 0           |
8684: | 5    | sed -i '' '/PROVISIONING_PROFILE_SPECIFIER/d;/DEVELOPMENT_TEA | 0           |
8685: |    | gym                                                           | 181         |
8686: +------+---------------------------------------------------------------+-------------+
8687: fastlane finished with errors
8688: [!] Error building the application - see the log above
8689: ! build of 'default-ios' failed. ! xcode build failed.

Hi,

Thanks! Could you please let me know what Xcode version you’re using to build locally? And what version of Cocoapods are you using locally?

Thanks for your reply, I Don’t build iOS locally because I don’t have access to a Mac, that’s why I rely on Cloud Build.
I have iOS Resolver v1.2.168 with “Add cocoapods to the Xcode project” as part of EDM4U.

Last successful cloud build was builded with Unity 2021.1.20f1 & Xcode 12.4
Thing that changed since is I’ve upgraded Unity version to 2021.2.x and been unable to build so I rolled back to 2020 LTS and 2021.1.28f1, either are building on Android fine but not on iOS cloud build.

Several plugins I use could also be responsible for messing things up (Odin, EasyMobilePro, GameAnalytics…) Kinda hard to find with this log… Even it says “It’s hard to tell what’s causing the error” xD

Hi,

Right, that doesn’t sound good :slight_smile:

Could you please submit a support ticket for further investigation? I’ll be able to grab a ticket and have a look.

Also, please keep in mind that Cloud Build is not meant to be a replacement for a Mac and we always ask to test it locally to see if you run into any issues. But let’s see the log first and see what’s going on :slight_smile: