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

Can Someone please help!

Ok, keep getting an Mach-O Linker Error. This is what the error says:

ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Does anyone know what this means or how to fix it?

Thanks

Are you using the parse framework

Yeah.

1 Answer

Hi, Jack

the error you're getting means that your file tree is missing a file and can't link all the file necessary to execute. Xcode should highlight the missing file in red. so to fix it simply find the missing file and re-add it.

if you need more info let me know or google it.

Best, Kai.

This is the only part that is highlighted. Do you know what I need to add?

linker command failed with exit code 1 (use -v to see invocation)

Hmmm expand all your folders (and take a look at XCTests) to see if anything is red, if not can you show me the whole error message (including the part above the part that says "linker command failed with exit code 1 (use -v to see invocation)").

Thanks for your help.

ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm not too sure but it looks like you're using a mac library in your iOS app (which is a problem), I think the file is at the link in the error (/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest) but I would definetly google "building for iOS Simulator, but linking against dylib built for MacOSX file "