Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Photo Bombers refactoring networking code issue

After going through the video, the app will fail to run. The error is Apple Mach-O Linker error. I made a copy of my app before I started this video. It worked fine before the video. Now even the copy fails to compile and throws this error. I ran the Diary app and it compiles just fine.

Whats the deal?

10 Answers

I've had that with some of my projects, and the way I solved it was as follows:

1) Click on the project target

2) Go to Build Phases

3) Locate Compile Sources

4) remove/replace any file written in red if there are any

Didn't work. There weren't any red flags

hmm, Usually Mach-O Linker Error means you have not included a header file for a function you are using in your code. Could that be the problem?

could you screenshot the error also please?

Is there a way to share the project folder on here?

BTW, I downloaded the project files from the end of section 4. It also causes the same error. Its only on this app that this problem is occurring. Treehouse's project files are failing just like my project. Its only this project. What a pain in the...!

hmm, I downloaded the project myself and no errors. Have you tried to clean the project and/or restarted xcode?

Yep tried those too. I even used time machine and reverted back to this morning before started and it still does it

mabe Amit Bijlani or Sam Soffes can help us? Could you either way provide a screenshot of the error?

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

You might want to go to that project folder in Terminal and run pod which will analyze and update all the dependencies in that project. One thing of about using Cocoapods is that there is no visual indicator if your project is out of sync.