Vidya Sagar
Vidya Sagar

Reputation: 180

Build failing on ios generic device but Ok for simulator

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?

Upvotes: 3

Views: 2182

Answers (5)

rubik
rubik

Reputation: 602

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.

Upvotes: 5

Setar
Setar

Reputation: 136

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.

Upvotes: 0

Vinay Kiran
Vinay Kiran

Reputation: 347

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.

Upvotes: 0

Ali Moazenzadeh
Ali Moazenzadeh

Reputation: 624

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

Upvotes: 0

Midhun Narayan
Midhun Narayan

Reputation: 879

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

Upvotes: 3

Related Questions