iOS-Universal-Framework icon indicating copy to clipboard operation
iOS-Universal-Framework copied to clipboard

XCode5 and XCTest

Open piresbruno opened this issue 11 years ago • 3 comments

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: "OBJC_CLASS$_Manager", referenced from: objc-class-ref in MyFramework_Tests.o "OBJC_CLASS$_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

piresbruno avatar Feb 13 '14 20:02 piresbruno

i have the same problem Undefined symbols for architecture i386: "OBJC_CLASS$_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

rockarloz avatar Feb 26 '14 04:02 rockarloz

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

7934345 avatar Mar 17 '14 00:03 7934345

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

Dafenng avatar Apr 25 '14 06:04 Dafenng