firebase-unity-sdk icon indicating copy to clipboard operation
firebase-unity-sdk copied to clipboard

[Bug] cannot take iOS build

Open RamjiRajendran opened this issue 1 month ago • 6 comments

Description

When the Vuforia SDK is included in a Unity project along with Firebase Crashlytics or Firebase Analytics, the iOS build fails:

Reproducing the issue

  1. Create a new unity project
  2. Import vuforia latest version
  3. import firebase analytics
  4. Switch the platform to iOS in build settings
  5. Press Build in build settings
  6. Open the xcode project from the created workspace
  7. Try building

Firebase Unity SDK Version

13.6.0

Unity editor version

6000.0.63f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

Analytics, Crashlytics

Other Firebase Component(s) in use

No response

Additional SDKs you are using

No response

Targeted Platform(s)

Apple Platforms

Unity editor platform

Mac

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5196.

If using CocoaPods for Apple platforms, the project's Podfile.lock

`PODS: - Firebase/Core (12.6.0): - Firebase/CoreOnly - FirebaseAnalytics (~> 12.6.0) - Firebase/CoreOnly (12.6.0): - FirebaseCore (~> 12.6.0) - Firebase/Crashlytics (12.6.0): - Firebase/CoreOnly - FirebaseCrashlytics (~> 12.6.0) - FirebaseAnalytics (12.6.0): - FirebaseAnalytics/Default (= 12.6.0) - FirebaseCore (~> 12.6.0) - FirebaseInstallations (~> 12.6.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.1) - GoogleUtilities/MethodSwizzler (~> 8.1) - GoogleUtilities/Network (~> 8.1) - "GoogleUtilities/NSData+zlib (~> 8.1)" - nanopb (~> 3.30910.0) - FirebaseAnalytics/Default (12.6.0): - FirebaseCore (~> 12.6.0) - FirebaseInstallations (~> 12.6.0) - GoogleAppMeasurement/Default (= 12.6.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.1) - GoogleUtilities/MethodSwizzler (~> 8.1) - GoogleUtilities/Network (~> 8.1) - "GoogleUtilities/NSData+zlib (~> 8.1)" - nanopb (~> 3.30910.0) - FirebaseCore (12.6.0): - FirebaseCoreInternal (~> 12.6.0) - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/Logger (~> 8.1) - FirebaseCoreExtension (12.6.0): - FirebaseCore (~> 12.6.0) - FirebaseCoreInternal (12.6.0): - "GoogleUtilities/NSData+zlib (~> 8.1)" - FirebaseCrashlytics (12.6.0): - FirebaseCore (~> 12.6.0) - FirebaseInstallations (~> 12.6.0) - FirebaseRemoteConfigInterop (~> 12.6.0) - FirebaseSessions (~> 12.6.0) - GoogleDataTransport (~> 10.1) - GoogleUtilities/Environment (~> 8.1) - nanopb (~> 3.30910.0) - PromisesObjC (~> 2.4) - FirebaseInstallations (12.6.0): - FirebaseCore (~> 12.6.0) - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/UserDefaults (~> 8.1) - PromisesObjC (~> 2.4) - FirebaseRemoteConfigInterop (12.6.0) - FirebaseSessions (12.6.0): - FirebaseCore (~> 12.6.0) - FirebaseCoreExtension (~> 12.6.0) - FirebaseInstallations (~> 12.6.0) - GoogleDataTransport (~> 10.1) - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/UserDefaults (~> 8.1) - nanopb (~> 3.30910.0) - PromisesSwift (~> 2.1) - GoogleAdsOnDeviceConversion (3.2.0): - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/Logger (~> 8.1) - GoogleUtilities/Network (~> 8.1) - nanopb (~> 3.30910.0) - GoogleAppMeasurement/Core (12.6.0): - GoogleUtilities/AppDelegateSwizzler (~> 8.1) - GoogleUtilities/MethodSwizzler (~> 8.1) - GoogleUtilities/Network (~> 8.1) - "GoogleUtilities/NSData+zlib (~> 8.1)" - nanopb (~> 3.30910.0) - GoogleAppMeasurement/Default (12.6.0): - GoogleAdsOnDeviceConversion (~> 3.2.0) - GoogleAppMeasurement/Core (= 12.6.0) - GoogleAppMeasurement/IdentitySupport (= 12.6.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.1) - GoogleUtilities/MethodSwizzler (~> 8.1) - GoogleUtilities/Network (~> 8.1) - "GoogleUtilities/NSData+zlib (~> 8.1)" - nanopb (~> 3.30910.0) - GoogleAppMeasurement/IdentitySupport (12.6.0): - GoogleAppMeasurement/Core (= 12.6.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.1) - GoogleUtilities/MethodSwizzler (~> 8.1) - GoogleUtilities/Network (~> 8.1) - "GoogleUtilities/NSData+zlib (~> 8.1)" - nanopb (~> 3.30910.0) - GoogleDataTransport (10.1.0): - nanopb (~> 3.30910.0) - PromisesObjC (~> 2.4) - GoogleUtilities/AppDelegateSwizzler (8.1.0): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - GoogleUtilities/Privacy - GoogleUtilities/Environment (8.1.0): - GoogleUtilities/Privacy - GoogleUtilities/Logger (8.1.0): - GoogleUtilities/Environment - GoogleUtilities/Privacy - GoogleUtilities/MethodSwizzler (8.1.0): - GoogleUtilities/Logger - GoogleUtilities/Privacy - GoogleUtilities/Network (8.1.0): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Privacy - GoogleUtilities/Reachability - "GoogleUtilities/NSData+zlib (8.1.0)": - GoogleUtilities/Privacy - GoogleUtilities/Privacy (8.1.0) - GoogleUtilities/Reachability (8.1.0): - GoogleUtilities/Logger - GoogleUtilities/Privacy - GoogleUtilities/UserDefaults (8.1.0): - GoogleUtilities/Logger - GoogleUtilities/Privacy - nanopb (3.30910.0): - nanopb/decode (= 3.30910.0) - nanopb/encode (= 3.30910.0) - nanopb/decode (3.30910.0) - nanopb/encode (3.30910.0) - PromisesObjC (2.4.0) - PromisesSwift (2.4.0): - PromisesObjC (= 2.4.0)

DEPENDENCIES:

  • Firebase/Core (= 12.6.0)
  • Firebase/Crashlytics (= 12.6.0)

SPEC REPOS: trunk: - Firebase - FirebaseAnalytics - FirebaseCore - FirebaseCoreExtension - FirebaseCoreInternal - FirebaseCrashlytics - FirebaseInstallations - FirebaseRemoteConfigInterop - FirebaseSessions - GoogleAdsOnDeviceConversion - GoogleAppMeasurement - GoogleDataTransport - GoogleUtilities - nanopb - PromisesObjC - PromisesSwift

SPEC CHECKSUMS: Firebase: a451a7b61536298fd5cbfe3a746fd40443a50679 FirebaseAnalytics: d0a97a0db6425e5a5d966340b87f92ca7b13a557 FirebaseCore: 0e38ad5d62d980a47a64b8e9301ffa311457be04 FirebaseCoreExtension: 032fd6f8509e591fda8cb76f6651f20d926b121f FirebaseCoreInternal: 69bf1306a05b8ac43004f6cc1f804bb7b05b229e FirebaseCrashlytics: 3d6248c50726ee7832aef0e53cb84c9e64d9fa7e FirebaseInstallations: 631b38da2e11a83daa4bfb482f79d286a5dfa7ad FirebaseRemoteConfigInterop: 3443b8cb8fffd76bb3e03b2a84bfd3db952fcda4 FirebaseSessions: 2e8f808347e665dff3e5843f275715f07045297d GoogleAdsOnDeviceConversion: d68c69dd9581a0f5da02617b6f377e5be483970f GoogleAppMeasurement: 3bf40aff49a601af5da1c3345702fcb4991d35ee GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851

PODFILE CHECKSUM: bcae7c50aaf3fae8b624ae0a7f2de85fe78980a4

COCOAPODS: 1.16.2 `

RamjiRajendran avatar Dec 16 '25 14:12 RamjiRajendran

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Dec 16 '25 14:12 google-oss-bot

Hi @RamjiRajendran, thanks for reaching out. I downloaded the Vuforia Engine SDK from the asset store (here), then used our sample project for Google Analytics on v6000.2.6f2 of the Unity Editor. Though I only imported the Vuforia Engine SDK and did not set up any code for it, I was able to build for iOS with no errors.

Could you confirm if this is the correct one or if I'm missing any additional steps?

niccolo-hare avatar Dec 16 '25 19:12 niccolo-hare

Hi @niccolo-hare , I can also take build, but it is not actually building in xcode from the created xcworkspace and throwing error like "Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5196". Please let me know if need of anything. Cocoapods version 1.16.2

RamjiRajendran avatar Dec 17 '25 05:12 RamjiRajendran

@niccolo-hare POV : in the firebase document, it is mentioned cocoapods version should be downgrade to 1.10.2 here, so I downgrade to 1.10.2 and the xcworkspace file is not generated even though, the cocoapod version is detected by giving ios resolve using external dependency manager. And I tried with cocoapods new version 1.16.2, then the xcworkspace file is generated, unfornately it is not building in the xcode, throwing the error as mentioned above.

RamjiRajendran avatar Dec 17 '25 05:12 RamjiRajendran

Sorry for the wait, @RamjiRajendran. I'm still having some trouble reproducing the behavior you encountered. I'm able to successfully build on Xcode while using Cocoapods version 1.16.2.

I'm thinking this error might be related to the Xcode version you're using, similar to this post from the Unity Discussions forum. For my testing, I was using Xcode version 16.4.

To help us investigate further, could you please confirm which version of Xcode you were using when you encountered this error?

niccolo-hare avatar Dec 19 '25 15:12 niccolo-hare

you are right, it happens in the xcode version 26.2

RamjiRajendran avatar Dec 22 '25 05:12 RamjiRajendran

Thanks for confirming @RamjiRajendran. I tried another round of testing with Xcode V26.2 this time, and I was able to reproduce the exact same build failure and error. Though I also tried running a sample project with just the Analytics SDK and no Vuforia, and this seemed to succeed without issues.

I'm thinking this might be leaning more towards an issue with how build settings are handled on Xcode 26 than an issue with the Unity SDK. It's likely due to some old linkers that Xcode uses, but these don't seem to work well with Unity. If so, you could try the solution shared by the user "osmanahsanofficial" on this post and see if it helps resolve the issue. From my testing, the error went away and I was able to successfully build my sample project after applying their solution.

Hope that helps. I'll be closing this issue for now since the error doesn't appear to have been caused by the Unity SDK. But feel free to re-open this issue or file a new one at any time if you have other questions or clarifications.

niccolo-hare avatar Dec 22 '25 14:12 niccolo-hare

$(Iweaksystem) $(IdClassic)

  • Remove this above flags in xcode > unityframeowork > Build settings > Other Linker Flags

Unforturnately the issue has not solved by following at this this post

I found the solution in some other git hub ad-mob thread here

Thanks for the help @niccolo-hare

RamjiRajendran avatar Dec 22 '25 14:12 RamjiRajendran