Bug in MonoTouch/MonoDevelop or something else?
I load up a few XML files with my app in Mono when deploying to iPhone. I edited one of those XML files in Windo开发者_StackOverflowws through a LAN connection to the Mac on which the file resided. After editing the xml file the app seems to refuse the xml file exists anymore. THe properties are still 'copy always' and 'content' where relevant for the XML file, I know it exists and I can even open and edit it MonoDevelop. But in app isolatedstorage.fileexists("filename.xmL") ALWAYS returns false.
I deleted the file and daded it back in, I copy+pasted the file, heck, I even renamed another xml file to the same filename and that xml file stopped being recognized.
Not sure what to do now?
Did you try "File.Exists" ?
Keep in mind that IsolatedStorage's main goal is to isolate the files from outside (the application) usages. As such MonoDevelop will copy to the application folder, but not in the isolated storage. Same is true for desktop applications, MonoMac apps...
FWIW IsolatedStorage API exists in MonoTouch to help you port existing code (from the 'desktop' framework or WP7) but there's no reason (beside portability) to use it. In iOS applications are already isolated (from each other) and so are their files.
精彩评论