当前位置: 代码迷 >> Iphone >> debugging unit test for iphone-在iphone上调试单元测试
  详细解决方案

debugging unit test for iphone-在iphone上调试单元测试

热度:261   发布时间:2016-04-25 06:22:27.0
debugging unit test for iphone-在iphone下调试单元测试
1.在xcode菜单Project->New Customer Executable..
取名如“otest",Path填”Developer/user/bin/otest”



2.右键Executables下新建的otest,选择“Get Info”,在Arguments下

加参数
-SenTest self
UnitTests.octest

UnitTests.octest为单元测试的bundle

再加环境变量
Name Value
DYLD_ROOT_PATH  $(SDKROOT)
DYLD_FRAMEWORK_PATH{BUILD_PRODUCTS_DIR}:${SDK_ROOT}:${DYLD_FRAMEWORK_PATH}
IPHONE_SIMULATOR_ROOT $(SDKROOT)
CFFIXED_USER_HOME $(HOME)/Library/Application Support/iPhone Simulator/User/
OBJC_DISABLE_GC YES
DYLD_LIBRARY_PATH${BUILD_PRODUCTS_DIR}:${SDK_ROOT}:${DYLD_LIBRARY_PATH}
DYLD_NEW_LOCAL_SHARED_REGIONS  YES
DYLD_NO_FIX_PREBINDING  YES




3.debug时选择otest,右键“Start otest With BreakPoint”
  相关解决方案