I am trying to run unit tests for a static library that is trying to create / write / read a file in the document directory. Since this is a static library, not an iOS app, trying to link to NSDocumentDirectory returns me the directory for the form
"/ Users // Library / Application Support / iPhone Simulator / Documents"
This directory does not exist. When trying to access a directory from a real application, NSDocumentDirectory returns something from the form:
"/ Users // Library / Application Support / iPhone Simulator / 4.2 / FEDBEF5F-1326-4383-A087-CDA1B865E61A / Documents"
(Note the simulator version as well as the application identifier as part of the path)
How can I overcome this shortcoming in the unit test structure for static libraries that implement tests that require specific applications for iOS applications?
Thanks in advance.
Shiun
source share