Reputation: 522
I am having a linker error being produced on build and I don't know how to fix it. I have already tried many solutions on stackoverflow and none of them have worked for me. Any help is appreciated.
(summary of error: ld: 44 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error Message:
Upvotes: 0
Views: 819
Reputation: 522
To begin, I had looked through many solutions and tried all of them, but none of them had worked, so I started to go through these steps:
Recreate the project, but keep the important things. I recreated the project by copying the Assets and Main.storyboard files into the new one I had created.
Installing the Pods correctly. I went into terminal, and watched the video carefully, where it explained that the pods needed were only Firebase/Auth and GoogleSignIn. I then used pod init to initialize the pods in my project. Then, I used open Podfile, so that I could install the pods I needed. When I was in the Podfile, I turned off smart quotes because that had created some errors in my project before. I then typed in pod 'Firebase/Auth' and pod 'GoogleSignIn' I then saved the file, and ran pod install. Afterwards, you must open the .xcworkspace file for your project and not the original project file.
Coding the ViewController.swift and AppDelegate files. I went through the tutorial I was using, and inputted the same code that the guy was telling us to code. After carefully coding all of these files, the code ran well and everything worked!
Upvotes: 1
Reputation: 9109
In your "Build Settings" and "Other Linker Flags" make sure all your frameworks from the podfile have -framework
in front of the Pod framework.
Upvotes: 0