0

I am using Xcode 8.2.1, Swift 3, and IOS 10.2 (for iphone simulator). I am trying to follow this tutorial https://www.raywenderlich.com/139322/firebase-tutorial-getting-started-2

I have not gotten to the Firebase stuff. Right now I am just trying to build and compile the starter code (should run fine). When I do this, however, I get the following error:

ld: library not found for -lPods-Grocr
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How do I fix this? PS. I have done a pod install successfully.

kevin_b
  • 641
  • 3
  • 12
  • 32
  • are you working on the .xcworkspace or the .xcodeproj file? – user3581248 Feb 22 '17 at 19:48
  • After you ran pod install, did you open Grocr.xcodeproj or Grocr.xcworkspace ? You can no longer build from Grocr.xcodeproj once you have installed pods – Kayla Galway Feb 22 '17 at 19:49
  • I indeed opened xcodeproj, @KaylaGalway since when can I not build from .xcodeproj and must do it from xcworkspace? – kevin_b Feb 22 '17 at 19:54
  • Since pod install – Kamil.S Feb 22 '17 at 19:57
  • @jebmarcus xcworkspaces are used to manage projects and dependencies. When you decide to use pods, an xcworkspace is created and Grocr will then rely on that file to build. More info on the specifics of why that is here: http://stackoverflow.com/questions/21631313/xcode-project-vs-xcode-workspace-differences – Kayla Galway Feb 22 '17 at 20:05
  • @KaylaGalway thanks! So when I code, I should stil do it in xcodeproj but when I build and run I should do it in workspace? – kevin_b Feb 22 '17 at 20:30
  • Code in workspace from now on. As long as you're using pods, just disregard the xcodeproj – Kayla Galway Feb 22 '17 at 20:49

1 Answers1

0

When I first began working with Firebase I encountered many issues like this and for a while wondered if scrapping the whole Application and restarting was the best option. In the end the fix was simply, getting rid of the modules inside my app and uninstalling the pods then going back through the process of installing them. Sometimes a file will be place in the wrong directory so when the app goes to build it is looking for something that cannot be found and it fails. Good luck let me know if you have any more questions or issues.