シミュレーターで Documents dir を NSLog すると、ファイルが表示されます
2013-01-02 17:02:02.398 ForPlayAtl[2113:1a903] docs check (
"biz.plist",
"sched.plist",
"ver.plist",
)
2013-01-02 17:02:02.400 ForPlayAtl[2113:1a903] docs path check /Users/Dude/Library/Application Support/iPhone Simulator/6.0/Applications/
デバイスで同じことをすると、
2013-01-02 16:56:01.896 ForPlayAtl[2253:907] docs check (
)
2013-01-02 16:56:01.900 ForPlayAtl[2253:907] docs path check /var/mobile/Applications/A7B36683-C41B-4DF5-A9C3-1FDF0F0DCBDD/Documents
私の関数は次のようになります
-(NSString *) dataFilePath
{
NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDirectory = [path objectAtIndex:0];
return [documentDirectory stringByAppendingPathComponent:@"sched.plist"];
}
大文字と小文字の区別がチェックされました。私の作業前提は、.plists が /Documents dir からデバイスにコピーされることですか? いいえ ?最初に .plist を初期化する必要がありますか?
何が欠けていますか...助けてくれてありがとう。非常に感謝しています