Build failed after Firebase Analytics added - Invalid bitcode version

I added Firebase Analytics to the game and now I can build it in xcode.
I get an error:
could not reparse object file in bitcode bundle: ‘Invalid bitcode version (Producer: ‘1316.0.21.2.3_0’ Reader: ‘1300.0.29.30_0’)’, using libLTO version ‘LLVM version 13.0.0, (clang-1300.0.29.30)’ for architecture arm64

I tried to set to NO the Enable Bitcode. After it the build was success, but then I could not uploaded to the app store.

How can I solve the problem?

There was an update to xcode, so I updated it, and finally it works. Magic things… :smile:

Oh it builds, but now I can’t upload it to the App Store Connect…
ERROR ITMS-90206: “Invalid Bundle. The bundle at ‘Game.app/Frameworks/UnityFramework.framework’ contains disallowed file ‘Frameworks’.”

I’m getting the same error. Any luck?

Edit: I got you boys, I found a temporary fix:

under your build settings, set “always embed swift standard libraries” to yes for your app target, and no for your unity framework target.

firebase 8.10 works fine.
so we have downgraded firebase sdk from 9.0 to 8.1

1 Like

You are genius! Thx! It works with 8.1

Downgraded to 8.1 and it works perfectly!

1 Like

As it says in Firebase release notes, version 9+ requires AT LEAST Xcode 13.3.1. If you don’t have at least Xcode 13.3.1, use 8.10:

https://firebase.google.com/support/release-notes/ios#version_900_-_may_3_2022

2 Likes

Yes.

I was using Unity Cloud Build and just realized that the configuration was using Xcode 13.2.1 since I had selected “latest compatible version.” My local builds on my machine were working for I have installed Xcode 13.4.1. Right now Unity Cloud Build marks version 13.3.1 as experimental (see screenshot), but after selecting 13.3.1 my builds started working again.

And yes, all this happened after integrating Firebase (push notifications).

Unity Cloud Build logs when using “latest compatible version” for Xcode:

8679669--1169955--upload_2022-12-21_19-56-15.png

Configuration options for Unity Cloud Build iOS (13.3.1 is still experimental):
8679669--1169958--upload_2022-12-21_19-58-46.png

The logs when Unity Cloud Build was using Xcode 13.2.1:
8679669--1169961--upload_2022-12-21_20-1-32.png

358: [2022-12-22T01:33:04.101Z] - 7.2.4.2.4.2 - INFO: ❌; ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1316.0.21.2.3_0' Reader: '1300.0.29.30_0')', using libLTO version 'LLVM version 13.0.0, (clang-1300.0.29.30)' for architecture arm64
359: [2022-12-22T01:33:04.101Z] - 7.2.4.2.4.2 - INFO: ❌; clang: error: linker command failed with exit code 1 (use -v to see invocation)
360: [2022-12-22T01:33:04.102Z] - 7.2.4.2.4.2 - INFO: ▸ clang: error: linker command failed with exit code 1 (use -v to see invocation)
361: [2022-12-22T01:33:04.126Z] - 7.2.4.2.4.2 - ERROR: xcode build failed
362: RuntimeError (Build Failure):
363: Finished: FAILURE

The logs when Unity Cloud Build was using Xcode 13.3.1:
8679669--1169967--upload_2022-12-21_20-17-10.png