kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 474 forks source link

XCode5 and XCTest #172

Open piresbruno opened 10 years ago

piresbruno commented 10 years ago

I have a fake framework project that i migrated to XCode5 and it's running well with Mk8.

Now i'm trying to create some unit tests, so i've created a new target for the tests, added the dependencies in "build phases" and the "compile sources" has the ".m" files for the tests i've written. Under "build settings" i have for architectures "ARCHS_STANDARD" and the valid architectures are i386,arm7,arm7s.

When i try to run the tests i have the following error:

Undefined symbols for architecture i386: "_OBJCCLASS$_Manager", referenced from: objc-class-ref in MyFramework_Tests.o "_OBJCCLASS$_SkyLab", referenced from: objc-class-ref in MyFramework_Tests.o ld: symbol(s) not found for architecture i386

Does anyone have any idea what could be making this issue to happen?

Thanks, Bruno

rockarloz commented 10 years ago

i have the same problem Undefined symbols for architecture i386: "_OBJCCLASS$_myclass", referenced from: objc-class-ref in ViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

any idea? thanks

7934345 commented 10 years ago

recheck your .m files in your UNIT TEST project(compile sources) and your reference lib(s)

Dafenng commented 10 years ago

I needn't to check .m files in compile sources when writing unit test without iOS Universal Framework, I think it's a bug and can be imporved