I downloaded latest LinkedIn SDK and added to my project but building failed
duplicate symbol _OBJC_METACLASS_$_PodsDummy_Pods in: /linkedin-sdk.framework/linkedin-sdk(Pods-dummy.o) /Build/Products/Debug-iphonesimulator/libPods.a(Pods-dummy.o) duplicate symbol _OBJC_CLASS_$_PodsDummy_Pods in: /linkedin-sdk.framework/linkedin-sdk(Pods-dummy.o) /Build/Products/Debug-iphonesimulator/libPods.a(Pods-dummy.o) ld: 2 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know how to fix it?
I had the same issue, and found a workaround until the LinkedIn SDK is 'fixed'.
Simply update the Pods-dummy.m file in the Pods Xcode project from:
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods : NSObject
@end
@implementation PodsDummy_Pods
@end
to
#import <Foundation/Foundation.h>
@interface PodsDummy_Podsxx : NSObject
@end
@implementation PodsDummy_Podsxx
@end
and it will then link.
Note: you will need to patch this each time you update your Pods via the command line, e.g. "pod install" or update etc.
I can't comment so I will leave this as a reply to @rinat , I didn't need to change the other pods name, just add:
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
to the pod file. Anyways the SDK linkedIn didn't work at all for me. I haven't been able to make it work, it simply doesn't work when authenticating with the app ready. No logs, nothing... I ended implementing a normal OAuth2 web login.
Hey no need to change PodsDummy_Pods name to PodsDummy_Podsxx each time you update your Pods via the command line, e.g. "pod install" or update etc.
Paste below code in Podfile. linkedIn SDK working cool......
post_install do |installer_representation|
installer_representation.pods_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
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