我有 ios Cordova 项目,我想将 Firebase In-App Messaging 安装到我的项目中,我的 pod 文件如下所示:
platform :ios, '10.0'
target 'Feel Better' do
project 'Feel Better.xcodeproj'
pod 'Firebase/Core', '~> 4.1'
pod 'Firebase/DynamicLinks', '~> 4.1'
pod 'Fabric', '~> 1.7.11'
pod 'Crashlytics', '~> 3.10.7'
end
我按照 firebase 文档中的说明进行操作: https ://firebase.google.com/docs/in-app-messaging/get-started
我删除了 Firebase/Core 和 Firebase/DynamicLinks 库并添加了 Firebase,现在我的 pod 文件如下所示:
platform :ios, '10.0'
target 'Feel Better' do
project 'Feel Better.xcodeproj'
pod 'Fabric', '~> 1.7.11'
pod 'Crashlytics', '~> 3.10.7'
pod 'Firebase'
pod 'Firebase/InAppMessagingDisplay'
end
当我构建应用程序时,我收到了这个错误:
Ld /Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/Feel\ Better.app/Feel\ Better normal arm64
cd /Users/abdullahal-hallak/Desktop/ios_build_feel/ios
export IPHONEOS_DEPLOYMENT_TARGET=10.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -L/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos -L/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/FirebaseCore -L/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/FirebaseInAppMessagingDisplay -L/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/GoogleUtilities -L/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/nanopb -L/Users/abdullahal-hallak/Desktop/ios_build_feel/ios/Feel\ Better/Plugins/cordova-plugin-extension -L/Users/abdullahal-hallak/Desktop/ios_build_feel/ios/Feel\ Better/Plugins/cordova-plugin-google-analytics -F/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos -F/Users/abdullahal-hallak/Desktop/ios_build_feel/ios/Pods/Crashlytics/iOS -F/Users/abdullahal-hallak/Desktop/ios_build_feel/ios/Pods/Fabric/iOS -F/Users/abdullahal-hallak/Desktop/ios_build_feel/ios/Pods/FirebaseAnalytics/Frameworks -F/Users/abdullahal-hallak/Desktop/ios_build_feel/ios/Pods/FirebaseInAppMessaging/Frameworks -F/Users/abdullahal-hallak/Desktop/ios_build_feel/ios/Pods/FirebaseInstanceID/Frameworks -F/Users/abdullahal-hallak/Desktop/ios_build_feel/ios/Pods/GoogleAppMeasurement/Frameworks -FFeel\ Better/Plugins/cordova-plugin-admobpro -FFeel\ Better/Plugins/cordova-plugin-googleplus -FFeel\ Better/Plugins/cordova-plugin-firebase -FFeel\ Better/Plugins/cordova-plugin-facebook4 -filelist /Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Intermediates.noindex/Feel\ Better.build/Debug-iphoneos/Feel\ Better.build/Objects-normal/arm64/Feel\ Better.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=10.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Intermediates.noindex/Feel\ Better.build/Debug-iphoneos/Feel\ Better.build/Objects-normal/arm64/Feel\ Better_lto.o -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -ObjC -lFirebaseCore -lFirebaseInAppMessagingDisplay -lGoogleUtilities -lc++ -lnanopb -lsqlite3 -lz -framework Crashlytics -framework FIRAnalyticsConnector -framework Fabric -framework FirebaseAnalytics -framework FirebaseCoreDiagnostics -framework FirebaseInAppMessaging -framework FirebaseInstanceID -framework Foundation -framework GoogleAppMeasurement -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit /Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/libCordova.a -lCordovaGenericAd -framework CFNetwork -framework GoogleMobileAds -framework AdSupport -framework AudioToolbox -framework AVFoundation -framework CoreBluetooth -framework CoreLocation -framework CoreMedia -framework CoreMotion -framework CoreTelephony -framework CoreVideo -framework EventKit -framework EventKitUI -framework Foundation -framework GLKit -framework MediaPlayer -framework MessageUI -framework OpenGLES -framework SafariServices -framework StoreKit -framework SystemConfiguration -framework UIKit -lz -lGoogleAnalyticsServices -lAdIdAccess -framework CoreData -lz -lsqlite3 -framework GoogleAppUtilities -framework GoogleAuthUtilities -framework GoogleNetworkingUtilities -framework GoogleSignIn -framework GoogleSymbolUtilities -framework GoogleUtilities -weak_framework AddressBook -weak_framework CoreText -weak_framework Security -weak_framework WebKit -weak_framework Social -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework FirebaseNanoPB -framework GoogleToolboxForMac -framework nanopb -framework Protobuf -framework FirebaseMessaging -framework FirebaseCrash -framework FirebaseRemoteConfig -framework FirebaseABTesting -framework FirebaseAuth -framework GTMSessionFetcher -framework FirebasePerformance -framework FirebaseSwizzlingUtilities -framework Bolts -framework FBSDKCoreKit -framework FBSDKLoginKit -framework FBSDKShareKit -lPods-Feel\ Better -Xlinker -dependency_info -Xlinker /Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Intermediates.noindex/Feel\ Better.build/Debug-iphoneos/Feel\ Better.build/Objects-normal/arm64/Feel\ Better_dependency_info.dat -o /Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/Feel\ Better.app/Feel\ Better
duplicate symbol _OBJC_IVAR_$_FIROptions._deepLinkURLScheme in:
/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/FirebaseCore/libFirebaseCore.a(FIROptions.o)
Feel Better/Plugins/cordova-plugin-firebase/FirebaseCore.framework/FirebaseCore(FIROptions_fea8468bc833c6b2fdfc4e3e41e62ab3.o)
duplicate symbol _kServiceInfoFileName in:
/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/FirebaseCore/libFirebaseCore.a(FIROptions.o)
Feel Better/Plugins/cordova-plugin-firebase/FirebaseCore.framework/FirebaseCore(FIROptions_fea8468bc833c6b2fdfc4e3e41e62ab3.o)
duplicate symbol _OBJC_IVAR_$_FIROptions._editingLocked in:
/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/FirebaseCore/libFirebaseCore.a(FIROptions.o)
Feel Better/Plugins/cordova-plugin-firebase/FirebaseCore.framework/FirebaseCore(FIROptions_fea8468bc833c6b2fdfc4e3e41e62ab3.o)
duplicate symbol _kFIRLibraryVersionID in:
/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/FirebaseCore/libFirebaseCore.a(FIROptions.o)
Feel Better/Plugins/cordova-plugin-firebase/FirebaseCore.framework/FirebaseCore(FIROptions_fea8468bc833c6b2fdfc4e3e41e62ab3.o)
duplicate symbol _OBJC_CLASS_$_PodsDummy_nanopb in:
/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/nanopb/libnanopb.a(nanopb-dummy.o)
Feel Better/Plugins/cordova-plugin-firebase/nanopb.framework/nanopb(nanopb-dummy.o)
duplicate symbol _OBJC_METACLASS_$_PodsDummy_nanopb in:
/Users/abdullahal-hallak/Library/Developer/Xcode/DerivedData/Feel_Better-cbsuzdzkqclgrzeouyqnplriftff/Build/Products/Debug-iphoneos/nanopb/libnanopb.a(nanopb-dummy.o)
Feel Better/Plugins/cordova-plugin-firebase/nanopb.framework/nanopb(nanopb-dummy.o)
ld: 108 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)