I just starting using CocoaPods and I am getting the following errors when I pod install from the terminal (My project is called babyMilestones and I'm trying to use CocoaPods for the ShipLib Framework). :
The babyMilestones [Release] target overrides the FRAMEWORK_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the$(inherited)` flag, or
- Remove the build settings from the target.
I'm getting this error for Header Search Paths and Framework Search Paths.
When I try to build my project I get an error on the #import line saying the ShipLib/ShipLib.h file cannot be found. In my project navigator my Pods project is showing properly, and the ShipLib framework is visible.
I never set any of these search paths explicitly, I just let XCode 6 do it's thing. I found this answer : The target ... overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig
I have tried the following :
Deleted all the Framework Search Paths in Build Settings. This did not fix the issue
I then added $(inherited) to the Framework Search Path. I did Clean then Build. This gave new errors of the following type:
ld: warning: directory not found for option '-L/Users/billpaystation/Documents/iOS/babyMilestones/babyMilestones/Pods/build/Debug-iphoneos'
ld: warning: directory not found for option '-F'
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ActionSheetDatePicker", referenced from:
objc-class-ref in EditItemViewController.o
"_OBJC_CLASS_$_SYSincerelyController", referenced from:
objc-class-ref in EditItemViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Action Sheet Picker and Sincerely Controller are the libraries I'm trying to add with Pods.
I noticed that libPods.a is red under Frameworks in my file inspector. So I went to Scheme ->Edit Scheme-> and added Pods to the Build.
I don't really understand the whole target/build settings and I may have made it worse trying so many different things. Any help would be appreciated!
You should add $(inherited) to the Framework Search Path. For the new errors you should go:
TargetSettings->Build Phases->Compile Sources->(+) ActionSheetDatePicker.m, and SYSincerelyController.m classes and then Build and Run.
Here's my problem and solution from yesterday.
target overrides the FRAMEWORK_SEARCH_PATHS build settings
Hope this helps.
In my case it was not an Xcode issue, plus I think that fixing it by hand is a bad idea. I tried to use a different (earlier version) of Cocoapods and it worked fine!
gem install cocoapods -v 0.33.1
Related
I am trying to Call Firebase Analytics in my iOS app ,i am getting error while compiling project .
I have created one framework and from that framework calling firebase analytics but I don’t understand getting below error.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FIRAnalytics", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing Recent Errors Only
:-1: Undefined symbol: _OBJC_CLASS_$_FIRAnalytics
Below is my app structure
iOS App
MyCustom Framework
Viewcontroller
I had a similar issue when added Firebase using Carthage.
So after running a command
carthage update --platform iOS
you need to copy files from Carthage/Build/iOS/ into your project
Actually it just copied references to Firebase files, but files were still in Carthage/Build/iOS/ folder
After updating of Xcode and therefore Swift - I needed to update my dependencies - and after that, I got such an error
The reason was that after update an additional PromisesObjC.framework was introduced, and it, of course, was not included in the project.
So the complete removal of all Firebase-related frameworks and adding them again - fixed the problem.
P.S. and don't forget to delete Firebase.framework from the Link Binary With Libraries Build Phase in Xcode not to run in another error after update :)
Error: Firebase.framework does not contain bitcode.
Please make sure you import the PromisesObjc.framework after deleting your old Firebase libraries. I tried all the other steps but this one was also required.
In my case this was solved by updating the 'tag' in the following line in ios/Podfile to the most recent tag (based on the github repository):
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.1.0'
I added a pod to my Podfile and got compiler errors when building:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_CLLocation", referenced from:
objc-class-ref in MoPubAdapter(GADMAdapterMoPub.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I then went to Build Settings > Target > Debug > Other Linker Files and manually added -framework and "CoreLocation".
The compiler did not complain anymore. I assume they were forgotten in as prerequisites for the pod.
Now I don't like the fact that I manually changed this value. I might forget to do this if Cocoapods i.e. overwrites this value again. Is there a way for me do add the CoreLocation framework to the Podfile so that Cocoapods takes care of including it?
Thanks
I am afraid there is no way to do that. Apple does not provide dependency of it's core frameworks on Cocoapods. As a test, you can search for any core library on Cocoapods. You won't find that. As a brief test, here is the result if you try to set pod CoreLocation in Podfile.
Sadly, fixing this manually is the only workaround.
You could add a dependency in your Podfile to a minimal CocoaPod that only adds a dependency to CoreLocation. See here for creating a podspec and here for referencing a podspec from a local path.
A better solution would be to update the offending pod's podspec to add CoreLocation as a framework.
Xcode: Version 7.2
OS X: 10.10.5
I'm a newbie into iOS and trying to use SDWebImage in Objective-C by following the official installation guide, but I get this error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SDWebImageManager", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I downloaded the zip file and unzip-ed it, and added the file to my project.
Also, added a dependency "ImageIO.framework" and Linker Flag "-ObjC".
Screenshot
I've already read these questions:
How to install SDWebImage
Undefined symbols for architecture arm64: “_OBJC_CLASS_$_PayTabCardReaderViewController”, referenced from: objc-class-ref in ViewController.o
Don't download and unzip. This is really the most horrible way to do things. Use CocoaPods, Carthage or at least git submodules. The "unzip way" makes code harder to maintain: you cannot know which version you imported (when you go back to this project in a year), noone knows where is the reference. People will manually change the source files, so later you won't be able to update to the newer version without losing these changes. You also have to setup your project manually, which as it seems, is troublesome for you (and many others, don't worry). Easiest way to fix it? Use CocoaPods.
To do it, open console and type:
$ sudo gem install cocoapods
Close your project in Xcode. Open the path to your .xcodeproj in console. Type:
$ pod init
Open .podfile. Paste there pod 'SDWebImage', '~> 3.7'. In console type:
$ pod install
When it completes, open .xcodeworkspace. Everything should be working fine now.
This might happen due to framework not linked up correctly into the app.
Simply try this steps:
Go to Targets -> Build Phases -> Link Binary with Libraries
Click on + symbol & add it from the project
Clean App & build again
Hope it will help to you.
pod deintegrate + pod install fixed it for me !!!
I've upgraded to cocoapods 0.32.1 today and I get the linker error above. I've tried virtually any advice I could find and nothing works.
I've run pod install, which created a workspace which I'm using to build the project.
What seems weird to me is that the Pods project generated by default contains i386 and x86_64 architectures instead of arm ones.
Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'x86_64' didn't contain all required architectures 'i386 x86_64'
Then I changed Architectures of the Pods project to Universal and Build Active Architecture Only to No for both Debug and Release.
And I still get the same linker error, but with no warnings now.
I'm totally clueless now, any help is appreciated.
I'm getting a error from cocoa pods that I've never seen before. I've had it working with several dependencies just fine. I recently added the TestFlightSDK as a dependency through pods and I'm unable to Archive the project. It builds just fine to devices but refuses to Archive. Has anyone else experienced this issue?
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My Library Search Paths looks like this (for both debug and release):
$(SRCROOT) recursive
$(PODS_ROOT) recursive
$(inherited) recursive
Ok so I found the answer (that worked for me) using some suggestions from this post
I was actually getting a different Warning that I hadn't noticed.
Pods was rejected as an implicit dependency for 'libPods.a' because its
architectures 'armv7 armv7s' didn't contain all required architectures
'armv7 armv7s arm64'
It was actually related to the Pods target not having the correct architectures. It turned out to be a xCode bug after all. In my Pods Target I had all the correct acrhitectures selected, armv7, armv7s, and arm64.
THE SOLUTION:
Update cocoapods to the newest version that supports 64 arch.
sudo gem update cocoapods
Delete all Valid Architectures and do a project clean (which fails alot..)
Re-Add the architectures that you just removed and voilà!
my fault was an old cocoa pods integration. had to delete the pod-.a files in "/Frameworks" folder and pod-.xcconfig in "/Pods".
-> run 'pod install'
everything fine
Other solution is if you update your pods with new target, you will check libpods.a, maybe was deleted and system not found it. Make sure that libpods is in your Linked Framework and libraries in General information (where you change version, bundle identifier and build).
In my case problem was with Scheme.
go to Product -> Scheme -> Edit Scheme
click on Build
add the Pods static library, and make sure it's at the top of the list
clean and build again
You can fix this issue if this belongs to libraries by selecting your Target, then going to "Build Phases" in "Link Binary With Libraries", and removing ".a" file of that library. After this Clean and Build.
Hope this helps.