firebase-ios-sdk
firebase-ios-sdk copied to clipboard
compile error:Could not find or use auto-linked library 'swiftCompatibility50': library 'swiftCompatibility50' not found
Description
Hello, I manually updated the relevant SDK in the Objective-c project, and the compilation error is as follows:
ld: warning: Could not find or use auto-linked library 'swiftCompatibility50': library 'swiftCompatibility50' not found
ld: warning: Could not find or use auto-linked library 'swiftCompatibility51': library 'swiftCompatibility51' not found
ld: warning: Could not find or use auto-linked library 'swiftCompatibilityConcurrency': library 'swiftCompatibilityConcurrency' not found
ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements': library 'swiftCompatibilityDynamicReplacements' not found
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
_OBJC_CLASS_$_FIRHeartbeatController, referenced from:
in FirebaseCore[13](FIRHeartbeatLogger.o)
__swift_FORCE_LOAD_$_swiftCompatibility50, referenced from:
__swift_FORCE_LOAD_$_swiftCompatibility50_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o)
__swift_FORCE_LOAD_$_swiftCompatibility51, referenced from:
__swift_FORCE_LOAD_$_swiftCompatibility51_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o)
__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency, referenced from:
__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o)
__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements, referenced from:
__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What can I do to solve this problem?Thank you for your help!
上图是更新的相关SDK。
Reproducing the issue
No response
Firebase SDK Version
10.23.0
Xcode Version
15.2
Installation Method
Zip
Firebase Product(s)
Analytics, Crashlytics
Targeted Platforms
iOS
Relevant Log Output
ld: warning: Could not find or use auto-linked library 'swiftCompatibility50': library 'swiftCompatibility50' not found
ld: warning: Could not find or use auto-linked library 'swiftCompatibility51': library 'swiftCompatibility51' not found
ld: warning: Could not find or use auto-linked library 'swiftCompatibilityConcurrency': library 'swiftCompatibilityConcurrency' not found
ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements': library 'swiftCompatibilityDynamicReplacements' not found
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
_OBJC_CLASS_$_FIRHeartbeatController, referenced from:
in FirebaseCore[13](FIRHeartbeatLogger.o)
__swift_FORCE_LOAD_$_swiftCompatibility50, referenced from:
__swift_FORCE_LOAD_$_swiftCompatibility50_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o)
__swift_FORCE_LOAD_$_swiftCompatibility51, referenced from:
__swift_FORCE_LOAD_$_swiftCompatibility51_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o)
__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency, referenced from:
__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o)
__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements, referenced from:
__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
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!
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Make sure you follow the zip distribution's README instructions. It looks like FirebaseCoreInternal
is missing from the Analytics folder.
AutoPlay
@ibabyblue
You can try as commented below.
(https://github.com/facebookarchive/react-native-fbsdk/issues/755#issuecomment-644528297)
@paulb777 @TranTrieuLamQuynh Thank you very much for your reply, I have done it again according to README, but there is still one error, that is:
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
To solve this problem, deleting '-ObjC' from Other Linker Flags in Build Settings will compile, but in my project '-ObjC' is required. How do I deal with this? Thank you!
After I removed "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)" from LIBRARY_SEARCH_PATHS, the compilation was successful, which is to prevent loss of Swift system libraries Added when the symbolic linker was wrong, now it must be deleted to work... On the one hand to add, on the other hand to delete, dizzy, but still want to thank the reply ~