iosswiftparse-platformfacebook-ios-sdkparsefacebookutils

ParseFacebookUtilsV4 duplicate symbols for architecture armv7


I cannot compile my Xcode project, it has problems with duplicate ParseFacebookUtilsV4

this is my apple Mach-O Linker Error:

duplicate symbol _llvm.cmdline in:
/directory/Pods/ParseFacebookUtilsV4/libParseFacebookUtilsV4Lib.a(PFFacebookAuthenticationProvider.o)
/directory/Pods/ParseFacebookUtilsV4/libParseFacebookUtilsV4Lib.a(PFFacebookUtils.o)
duplicate symbol _llvm.embedded.module in:
/directory/Pods/ParseFacebookUtilsV4/libParseFacebookUtilsV4Lib.a(PFFacebookAuthenticationProvider.o)
/directory/Pods/ParseFacebookUtilsV4/libParseFacebookUtilsV4Lib.a(PFFacebookUtils.o)
ld: 2 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've imported ParseFacebookUtilsV4 with cocoapods, here is my Podfile:

# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
use_frameworks!

target 'ZZZ' do

pod 'Parse'
pod 'FBSDKCoreKit',  '4.3.0'
pod 'FBSDKLoginKit', '4.3.0'
pod 'ParseFacebookUtilsV4'


end

target 'ZZZTests' do

end

And here is my bridging header:

#ifndef FarThings_FarThings_Bridging_Header_h
#define FarThings_FarThings_Bridging_Header_h

#import <Parse/Parse.h>
#import <ParseFacebookUtilsV4/PFFacebookUtilsV4.h>
#import "FBSDKCoreKit.h"
#import "FBSDKLoginKit.h"
#import <Bolts/BFTask.h>


#endif

Solution

  • I hit this before, In my case I upgrade from old version and here's how I fix it. (Main idea is cleanup everything before pod)

    1. Remove all old Parse, Bolt and Facebook related (all .framework lookup path and embed .framework) until you end up with unknown class.
    2. Remove all .framework form folder via finder.
    3. Clean up your build folder by 'alt+clean' via Xcode.
    4. Delete all Pod related include all Pod folder via finder.
    5. try pod install one by one (or all at one if you feeling brave) until it look like this.

    pod 'Parse'

    pod 'ParseFacebookUtilsV4'

    pod 'ParseCrashReporting'

    and some other pod you need after that.

    It work for me, just make sure you remove all related. You can this pod with new project to prove this work before trying with real project.