Xcode Duplicate Symbols for Architecture Error After Updating Cocoa Pods

xcode duplicate symbols for architecture error after updating cocoa pods

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

Error of 48 duplicate symbols for architecture x86_64

Sometimes that happens with me when I try to update pods. What happens is a duplicate of some files in pods gets added in. It will look something like this:

Firebase.h
Firebase 2.h

You could just go through all the pods you installed and delete the duplicates, or you can deintegrate and install again.

$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod cache clean --all
$ pod install

691 duplicate symbols for architecture x86_64

Change the Podfile to:

pod ‘Firebase/Analytics’
pod 'Google-Mobile-Ads-SDK'

Firebase/AnalyticsWithoutAdIdSupport and Google-Mobile-Ads-SDK is not a supported combination. Google-Mobile-Ads-SDK requires Ad Support.

1188 duplicate symbols for architecture arm64

Thanks for everyone that helped me trying to get this fixed.

I was able to fix it by doing these steps:

  • I removed some librarys I had referenced in my target, by going to project view -> target -> general and then here I removed some duplicated librarys I had.
  • After that I closed XCode and then went to my project folder in finder and deleted, pods folder, podfile.lock, .xcworkspace file.
  • I also added a line in my podfile use_frameworks!
  • Open terminal, go into project folder, and did the following commands:

pod deintegrate

pod install

  • After that opened the newly created .xcworkspace file, clean project and then build.

I think the problem I had is that I had these frameworks in my project targets and they were the same as in the pods so that's why I had the issue of duplicate symbols.

duplicate symbols for architecture x86_64 framework included twice

You are correct about the Pod import of AFNetworking clashing with the 3rd party library which happens to contain the same symbols. There are are couple of ways to resolve it, the best and most sensible one would be to specify use_frameworks! in your Podfile:

platform :ios, '9.0'
use_frameworks!
target 'Saveto' do
pod 'SWTableViewCell', '~> 0.3.7'
pod 'CocoaLumberjack', '~> 2'
pod 'AFNetworking' , '~> 2'
pod 'SDWebImage', '~>3.7'
pod 'MMDrawerController', '~> 0.6.0'
pod 'iRate'
pod 'XLForm'
pod 'SwipeView', '~>1.3.2'
pod 'DAAlertController'
pod 'Mantle' , '~>2.0.4'
pod 'pop', '~> 1.0'
pod 'GoogleMaps', '~> 1.12'
pod 'SVProgressHUD'
pod 'FXBlurView'
pod 'Fabric'
pod 'Crashlytics'
end

I suppose you could also rename the symbols with a post_install method, although that might not resolve everything; there shouldn't be any issues after using the method above though.



Related Topics



Leave a reply



Submit