下記のプログラムを実機ではなく、macbook上のシミュレーターで実行した場合、
fileNameで指定されたファイルはどこに保存されるのでしょうか?
実機で実行しないとファイルは作られないのでしょうか?
//バイト配列の書き込み
func data2file(data: NSData, fileName: NSString) -> Bool {
var path = NSHomeDirectory().stringByAppendingPathComponent("Documents")
path = path.stringByAppendingPathComponent(fileName)
return data.writeToFile(path, atomically: true)
}