开发者

Possible to store file on iPhone?

开发者 https://www.devze.com 2023-03-31 01:59 出处:网络
My application needs to download files and store on local file system for future use. I have just 2 questions:

My application needs to download files and store on local file system for future use. I have just 2 questions:

  1. Is it possible to write files on iPhone file system?

  2. Anyone know how to do it with Unity3D? I tried use the common way to do it (using System.IO), it works both on Windows and Ma开发者_开发百科c but doesn't work on iPhone.


You can use Objective-C in Unity3D:

http://www.tinytimgames.com/2010/01/10/the-unityobjective-c-divide/

And here is a tutorial on file IO for iPhone:

http://servin.com/iphone/iPhone-File-IO.html


1 - Yes, you can use the writeToFile... atomically... method in order to write the file to a directory for later use.


  1. Yes, you can. Be sure to check out iOS5 (which is coming soon), you might want to store into the cloud, rather than the device :D

2.I have not tried with Unity3D.

0

精彩评论

暂无评论...
验证码 换一张
取 消