更新时间:2023-11-17 08:53:46
To solve this, set the value of Bundle Loader within your Unit Test target build settings to:
$(BUILT_PRODUCTS_DIR)/MyAppName.app/MyAppName
and also your Test Host to:
$(BUNDLE_LOADER)
you should then find NSHomeDirectory()
returns the right value.