Skip to content

Missing dependencies specified for SPM #15276

@nostrouh

Description

@nostrouh

Description

We're using Tuist in our project to generate Xcode project for us. Due to structure of our modules we need to integrate several Firebase libraries to be linked dynamically. But we encountered several build errors when making FirebaseSessions, FirebaseRemoteConfigInternal and GoogleAppMeasurement to be linked dynamically.

FirebaseSessions

  "_pb_decode", referenced from:
      FirebaseSessions.SessionStartEvent.encodeDecodeEvent() -> __C._firebase_appquality_sessions_SessionEvent in SessionStartEvent.o
  "_pb_istream_from_buffer", referenced from:
      FirebaseSessions.SessionStartEvent.encodeDecodeEvent() -> __C._firebase_appquality_sessions_SessionEvent in SessionStartEvent.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

FirebaseRemoteConfigInternal

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_GULAppEnvironmentUtil", referenced from:
       in RCNConfigSettings.o
ld: symbol(s) not found for architecture arm64

GoogleAppMeasurement

Undefined symbols for architecture arm64:
 "_GULIsLoggableLevel", referenced from:
-[APMMonitor isLoggableLevel:] in GoogleAppMeasurement[arm64][70](APMMonitor.o)
"_GULOSLogBasic", referenced from:
-[APMASLLogger logMessage:logTag:messageCode:withLogLevel:] in GoogleAppMeasurement[arm64][12](APMASLLogger.o)
 "_GULOSLogError", referenced from:
-[APMPersistentDictionary initWithFileName:] in GoogleAppMeasurement[arm64][287](APMPersistentDictionary.o)
_APMWriteDictionaryToURL in GoogleAppMeasurement[arm64][287](APMPersistentDictionary.o)
-[APMUserDefaults synchronize] in GoogleAppMeasurement[arm64][342](APMUserDefaults.o)
"_GULOSLogInfo", referenced from:
___44+[UIViewController(APMScreenClassName) load]_block_invoke in GoogleAppMeasurement[arm64][361](UIViewController+APMScreenClassName.o)
"_GULOSLogWarning", referenced from:
+[APMMeasurement sharedInstance] in GoogleAppMeasurement[arm64][62](APMMeasurement.o)
-[APMPersistentDictionary objectForKey:] in GoogleAppMeasurement[arm64][287](APMPersistentDictionary.o)
-[APMPersistentDictionary setObject:forKey:] in GoogleAppMeasurement[arm64][287](APMPersistentDictionary.o)
-[APMUserDefaults objectForKey:] in GoogleAppMeasurement[arm64][342](APMUserDefaults.o)
-[APMUserDefaults setObject:forKey:] in GoogleAppMeasurement[arm64][342](APMUserDefaults.o)
-[APMUserDefaults synchronize] in GoogleAppMeasurement[arm64][342](APMUserDefaults.o)
___44+[UIViewController(APMScreenClassName) load]_block_invoke in GoogleAppMeasurement[arm64][361](UIViewController+APMScreenClassName.o)
...
"_GULSetLoggerLevel", referenced from:
-[APMMonitor setDebugModeEnabled:] in GoogleAppMeasurement[arm64][70](APMMonitor.o)
 -[APMMonitor setDebugModeEnabled:] in GoogleAppMeasurement[arm64][70](APMMonitor.o)
-[APMMonitor setSGTMDebugModeEnabled:] in GoogleAppMeasurement[arm64][70](APMMonitor.o)
-[APMMonitor setSGTMDebugModeEnabled:] in GoogleAppMeasurement[arm64][70](APMMonitor.o)
-[APMMonitor setVerboseLoggingEnabled:] in GoogleAppMeasurement[arm64][70](APMMonitor.o)
"_OBJC_CLASS_$_GULAppEnvironmentUtil", referenced from:
  in GoogleAppMeasurement[arm64][5](APMAEU.o)
ld: symbol(s) not found for architecture arm64

This happens because these targets are missing several dependencies in target descriptions in Package.swift:

  1. FirebaseSessions missing nanopb dependency specified.
  2. FirebaseRemoteConfigInternal missing GULEnvironment dependency from GoogleUtilities package.
  3. GoogleAppMeasurement missing GULLogger and GULEnvironment dependencies from GoogleUtilities package.

Can we update Package.swift for Firebase iOS SDK and GoogleAppMeasurement?

Reproducing the issue

Firebase SDK Version

11.15.0

Xcode Version

16.4

Installation Method

Swift Package Manager

Firebase Product(s)

Remote Config

Targeted Platforms

iOS

Relevant Log Output

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions