Im in the process of pre populating a sql file and would like to know where Xcode keeps its folders for apps for the devic开发者_如何学Pythone. For example, the folders to get the apps on the simulator is /username/library/application support/simulator. Can someone please tell me where these folders are for the device? Any help is appreciated.
It's in the build folder inside the project folder under release. So projectFolder/build/appName.build/release
. The name of the actual folder on the end may change depending on targets and what not.
However, if you have some idea of putting a file directly into to the build forget it. Only items put inside the app bundle by the properly signed compiler will work. The code signing mechanism will not allow you to add anything post compile.
Instead, add the SQL file to the project itself and add it to the release target. When you build the release, the SQL file will be included inside the app bundle. I do this rather a lot.
Using CoreData plus SQLite i see that the sqlite store file is put into the /Documents directory of my App in the iPhoneSimulator, if you want to get that path precisely you can use this method:
NSString * documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)
objectAtIndex:0];
精彩评论