iPhone unit test setup problem
iPhone unit test setup problem
- Subject: iPhone unit test setup problem
- From: Anna Hentzel <email@hidden>
- Date: Tue, 26 Jan 2010 01:12:13 -0800
I've been trying to set up application unit tests for my app for an
embarrassingly long time. I followed the directions in apple's
documentation (http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html)
for the initial set up, and was able to successfully execute the
default tests after some fiddling.
After following Apple's directions, I wasn't able to reference my
classes in the unit tests, so I linked the app into the unit test
bundle using the "Bundle Loader" build setting and setting the app
target to export symbols. That resolved the compilation time errors,
and it worked and executed my tests immediately after I changed it.
But once I cleaned and built again, I started getting this error when
I tried to run on the device:
Unable to read symbols for
"/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1
(7C144)/Symbols/Developer/Library/PrivateFrameworks/DevToolsBundleInjection.framework/DevToolsBundleInjection"
(file not found).
It's true that the file doesn't exist. I found the .framework file under:
/Xcode3.1.4/Library/PrivateFrameworks PrivateFrameworks
and made a symbolic link. Then running the app said that it couldn't
link the app's files:
010-01-25 20:19:22.330 SmokeyTheBear[5808:207] Error loading
/private/var/mobile/Applications/26E1F8F4-6444-415B-84CB-BB161DBA29E9/SmokeyTheBear.app/LogicTests.octest/LogicTests:
dlopen(/private/var/mobile/Applications/26E1F8F4-6444-415B-84CB-BB161DBA29E9/SmokeyTheBear.app/LogicTests.octest/LogicTests,
262): Symbol not found: _OBJC_CLASS_$_AppDelegate
Referenced from:
/private/var/mobile/Applications/26E1F8F4-6444-415B-84CB-BB161DBA29E9/SmokeyTheBear.app/LogicTests.octest/LogicTests
Expected in:
/var/mobile/Applications/26E1F8F4-6444-415B-84CB-BB161DBA29E9/SmokeyTheBear.app/UDorse
in /private/var/mobile/Applications/26E1F8F4-6444-415B-84CB-BB161DBA29E9/SmokeyTheBear.app/LogicTests.octest/LogicTests
DevToolsBundleInjection: Error loading bundle
'/private/var/mobile/Applications/26E1F8F4-6444-415B-84CB-BB161DBA29E9/SmokeyTheBear.app/LogicTests.octest'
Then, I switched back to running the normal target for the app, and it
ran all my unit tests and exited! I think this may have been because
both my testing and regular target had the same .app file name. I
changed the testing one to something different. I cleaned again and
built, and then the normal target ran normally. The unit test target
still didn't work with the same error.
Anyone know what I'm doing wrong?
Thanks,
Anna
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden