0

I am trying to add the necessary libraries for Firebase as indicated on the firebase page in the integration section without cocoapods for a swift project, and the steps that come in the read.me file inside the zip with all the libraries.

Once all the steps are done, I build the project after a clean and I get the following error:

Ld /Users/mac/Library/Developer/Xcode/DerivedData/Medusa-fdyksfqolvwsiubuevxzsxcgcays/Build/Products/Debug-iphoneos/Medusa.app/Medusa normal arm64 (in target 'Medusa' from project 'Medusa') cd /Users/mac/Documents/Proyectos/Medusa/ios/desarrollo/branches/v1/Medusa /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios10.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -L/Users/mac/Library/Developer/Xcode/DerivedData/Medusa-fdyksfqolvwsiubuevxzsxcgcays/Build/Products/Debug-iphoneos -F/Users/mac/Library/Developer/Xcode/DerivedData/Medusa-fdyksfqolvwsiubuevxzsxcgcays/Build/Products/Debug-iphoneos -F/Users/mac/Documents/Proyectos/Medusa/ios/desarrollo/branches/v1/Medusa/Firebase -filelist /Users/mac/Library/Developer/Xcode/DerivedData/Medusa-fdyksfqolvwsiubuevxzsxcgcays/Build/Intermediates.noindex/Medusa.build/Debug-iphoneos/Medusa.build/Objects-normal/arm64/Medusa.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/Medusa-fdyksfqolvwsiubuevxzsxcgcays/Build/Intermediates.noindex/Medusa.build/Debug-iphoneos/Medusa.build/Objects-normal/arm64/Medusa_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/Medusa-fdyksfqolvwsiubuevxzsxcgcays/Build/Intermediates.noindex/Medusa.build/Debug-iphoneos/Medusa.build/Objects-normal/arm64/Medusa.swiftmodule -ObjC -framework GoogleUtilities /Users/mac/Library/Developer/Xcode/DerivedData/Medusa-fdyksfqolvwsiubuevxzsxcgcays/Build/Products/Debug-iphoneos/SQLite.framework/SQLite -framework GoogleAppMeasurement -framework CoreGraphics -framework UserNotifications -framework FirebaseMessaging -framework MobileCoreServices -framework FirebaseCore -framework Security -framework Foundation -framework SystemConfiguration -framework FirebaseAnalytics -framework nanopb -framework GoogleDataTransportCCTSupport -framework UIKit -framework FirebaseCoreDiagnostics -framework FIRAnalyticsConnector -framework GoogleDataTransport -framework EventKit -framework AssetsLibrary -framework FirebaseInstanceID -framework Protobuf -Xlinker -dependency_info -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/Medusa-fdyksfqolvwsiubuevxzsxcgcays/Build/Intermediates.noindex/Medusa.build/Debug-iphoneos/Medusa.build/Objects-normal/arm64/Medusa_dependency_info.dat -o /Users/mac/Library/Developer/Xcode/DerivedData/Medusa-fdyksfqolvwsiubuevxzsxcgcays/Build/Products/Debug-iphoneos/Medusa.app/Medusa

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_SKProductsRequest", referenced from: objc-class-ref in GoogleAppMeasurement(APMProductsRequest_9ec051498f83cad93a58cf3f308ab9b6.o) "_OBJC_CLASS_$_SKPaymentQueue", referenced from: objc-class-ref in GoogleAppMeasurement(APMAnalytics_cb405cb8c995318bf496bd8f1041864f.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've been looking for this error and it's related to the library StoreKit.framework but my application does not need in-app purchases.

Then I put some screenshots of how libraries are added

General Configuration

enter image description here

Build Phase Configuration

enter image description here enter image description here

project structure

project structure enter image description here

Any suggestions??

4
  • May I ask why you are trying to not use Cocoapods? Not only is it much, much easier, but it's also cleaner. Whenever Firebase will update their SDK all you have to do is run a pod install and you'll get the updated code. Commented Jan 9, 2020 at 19:55
  • Did you make sure the "In-App Purchase" option in the Capabilities section for your app is showing OFF? Commented Jan 9, 2020 at 19:56
  • Hi @Pierce, thanks for your comments, I have never used coocoapods and I am quite new to iOS development, and I tried this way. On the other hand, the "In-App Purchase" option is not activated in capabilities, but if I add the StoreKit.framework, that option is automatically added to me, and I don't want that option Commented Jan 10, 2020 at 8:26
  • 1
    I am with @Pierce on this. Cocoapods is the way to go unless you have a specific use case preventing it. Even better, cocoapods.app makes setting up and installing pods a snap. Commented Jan 10, 2020 at 19:58

1 Answer 1

1

StoreKit is a dependency of AppMeasurement and should be brought in from the modulemap in the GoogleAppMeasurement.framework that you're installing.

You can work around the issue by explicitly adding StoreKit in the Link Binary with Libraries Build Phase in Xcode.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi @Paul Beusterien , thanks for your answer, I have tried what you recommend and I get other errors related to the provisioning profile, like this: 'Provisioning profile "iOS Team Provisioning Profile: *" doesn't support the In-App Purchase capability.', I don't want that my apps support purchases
Based on github.com/firebase/firebase-ios-sdk/issues/2435, the only current option would be to stop using FirebaseAnalytics and stop linking FirebaseAnalytics and GoogleAppMeasurement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.