Here is my podFile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'AFNetworking'
pod 'ODSAccordionView', '0.4.4'
pod 'IQKeyboardManager'
pod 'NYXImagesKit', :git => 'https://github.com/Nyx0uf/NYXImagesKit.git'
pod 'PEPhotoCropEditor'
pod 'CocoaAsyncSocket'
pod 'PKRevealController'
pod 'Haneke', '~> 1.0'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'RadioButton'
Everythig has been working fine for a long time, but now, when I update my pods (pod update
) these 3 pods get uptated:
AFNetworking
CocoaAsyncSocket
IQKeyboardManager
After that, nothing works anymore.
I get more than 600 duplicate symbols for architecture i386
errors, like this one:
duplicate symbol _OBJC_IVAR_$_AFHTTPRequestOperation._responseSerializer in:
/Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-emjexnnjljambodthokzwpwcddhz/Build/Products/Debug-iphonesimulator/libPods-AFNetworking.a(AFHTTPRequestOperation.o)
/Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-emjexnnjljambodthokzwpwcddhz/Build/Products/Debug-iphonesimulator/libAFNetworking.a(AFHTTPRequestOperation.o)
... (661 times the same error but pointing to different duplicated files)
ld: 661 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas?
EDITED: After doing the solution shown below, my project only compiles for iPad Air
and I can not Archive
anymore, i still get the same error...
I use the 'Manually Rename All of the Symbols' approach. I was experiencing the duplicate symbol _OBJC_METACLASS_$_PodsDummy_Pods
and so i added the post_install
in the Podfile
to avoid the duplicate symbol.
Replace your pod file content with this to 'Manually Rename All of the Symbols'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited), PodsDummy_Pods=SomeOtherNamePodsDummy_Pods'
end
end
end
pod 'AFNetworking'
pod 'ODSAccordionView', '0.4.4'
pod 'IQKeyboardManager'
pod 'NYXImagesKit', :git => 'https://github.com/Nyx0uf/NYXImagesKit.git'
pod 'PEPhotoCropEditor'
pod 'CocoaAsyncSocket'
pod 'PKRevealController'
pod 'Haneke', '~> 1.0'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'RadioButton'
Edited : Delete the following pod item's from your project
1.Pods Folder
2.Podfile.lock
3.ProjectName.xcworkspace
And then install the pods again
This hook allows you to make any last changes to the generated Xcode project before it is written to disk or any other tasks you might want to perform.
Reference -
1. https://developerinsider.co/cocoapods-remove-duplicate-symbols-errors/
2. http://guides.cocoapods.org/syntax/podfile.html#post_install
Even after deleting my pods and reinstalling them, I had always the same problem.
I finally found the solution by comparing with another project. The issue was in the parameter "Other Linker Flags" (OTHER_LDFLAGS) in the Build Settings of the project. The pods were referenced not just by their name, but by adding the prefix "Pods-myProject"
"-l\"Pods-myProject-AMSlideMenu\"",
"-l\"Pods-myProject-CocoaLumberjack\"",
"-l\"Pods-myProject-DLAlertView\""
So I just removed the prefix and all was right
"-l\"AMSlideMenu\"",
"-l\"CocoaLumberjack\"",
"-l\"DLAlertView\""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With