Getting iPhone Documents Directory in TestCases
问题 I'm running test cases which uses sqlite database to test my code on iPhone simulator using default SenTestingkit, when i try to get the home directory using either of the following ways NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docsPath = [paths objectAtIndex:0]; or NSString *home = NSHomeDirectory(); i got a wrong path that points to the following bath /Users/{user}/Library/Application Support/iPhone Simulator/5.1 and i