3

I have downloaded an app template from codecanyon.

When I am running on a simulator, it's running good. But when I am trying to build on a real device or iOS generic device, it's failing with the following error:

> duplicate symbol l123 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFAppLinkReturnToRefererView.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFTask.o)
>     duplicate symbol l028 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFTaskCompletionSource.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFMeasurementEvent.o)
>     duplicate symbol l029 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFTaskCompletionSource.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFExecutor.o)
>     duplicate symbol l152 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFWebViewAppLinkResolver.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDAuthentication.o)
>     duplicate symbol l153 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFWebViewAppLinkResolver.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDAuthentication.o)
>     duplicate symbol l154 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFWebViewAppLinkResolver.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDAuthentication.o)
>     duplicate symbol l155 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFWebViewAppLinkResolver.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDAuthentication.o)
>     .....

ld: 91 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using Xcode 10. Any idea how to solve it?

Romain
  • 3,718
  • 3
  • 32
  • 48
Vidya Sagar
  • 170
  • 1
  • 16
  • did you tried tu clean / remove derived data folder? – CZ54 Aug 10 '18 at 08:07
  • I have deleted derived data folder, set No common blocks to NO and enable testability to NO. I even updated my cocoapods version and deintegrated it and installed again, updated it. Still the problem persists. I dont know what else I can do – Vidya Sagar Aug 10 '18 at 17:21
  • How about using a non-beta version of Xcode, something like Xcode 9.4.1? – ekscrypto Aug 13 '18 at 14:07
  • 1
    try locating if bolts framework is used by some other framework or not. If not, there might be some framework which might be duplicated. I had similar issue where bolts and svprogressHUD both were duplicated in project. – iOS_MIB Aug 13 '18 at 14:11
  • looks like same problem, check this out: https://stackoverflow.com/a/26303957/3824808 – Akshay Sunderwani Aug 13 '18 at 19:44
  • Are you using provisioning profile? If yes, is that a development/distribution profile? – caffieneToCode Aug 14 '18 at 14:07

5 Answers5

5

I have the same issue with Xcode 10 beta 5. Try to install newest beta 6, make clean, pod deintegrate then pod install and then try to build at device. In my case error is gone.

AnthoPak
  • 4,191
  • 3
  • 23
  • 41
rubik
  • 572
  • 4
  • 15
3

Remove all pod files from your project by hard cleaning then reinstall

 sudo gem install cocoapods-deintegrate cocoapods-clean
 pod deintegrate
 pod clean
 pod install
Midhun Narayan
  • 829
  • 2
  • 9
  • 26
0

There is a bug with Xcode 10 beta 5 that causes to build error on real devices, and it seems fixed in Xcode 10 beta 6, upgrade and bug should be fixed

Ali Moazenzadeh
  • 584
  • 4
  • 13
0

From the errors, it would appear that the GoogleSign.framework already includes the Bolts.framework classes. Try removing the additional Bolts.framework from the project.

Vinay Kiran
  • 349
  • 5
  • 16
0

Maybe you need to make a hardClean, Go to Product, press 'Alt' and select clean build folder. Then open Terminal and run :

rm -rf ~/Library/Developer/Xcode/DerivedData/

Open Xcode everything will be recompiled.

Other option is to remove the framework and adding it again as its possible there is duplicated references to it or something like that.

Setar
  • 140
  • 10