Solution for How to resolve Objective-C compatibility header conflict between two Pods?
is Given Below:
I have two cocoapods in my Xcode project that have a conflict in the generated Objective C header file, resulting in this error:
InputBarAccessoryView/InputBarAccessoryView.framework/Headers/InputBarAccessoryView-Swift.h:413:58: 'InputTextView' has different definitions in different modules; first difference is definition in module 'InputBarAccessoryView.Swift' found property
I am able to resolve this conflict by going into the build settings for the given pod and setting Install Objective-C compatibility header to No
Is there a way for me to specify this setting in the podfile or somewhere else so everyone working on this project will not have to go to their build settings in order to resolve this conflict?
In order to toggle post install build settings for pods do the following
build_setting name by holding Option and double clicking the name of the setting in Pods.xcodeproj
To specify settings for all pods in the project
post_install do |installer| installer.pods_project.build_configuration_list.build_configurations.each do |configuration| configuration.build_settings['Setting you want to toggle'] = 'YES' end end
To specify setting for a specific pod
post_install do |installer| installer.pods_project.targets.each do |target| if target.name === "Specific Pod Name" target.build_configurations.each do |config| config.build_settings['SWIFT_INSTALL_OBJC_HEADER'] = 'NO' end end end end