简体   繁体   中英

How to store a UIImage into iPhone's App Folder with Xamarin iOS?

For android, there will be an application folder exist in File Manager -> Phone Storage -> data-> App Package Name where I can save some images inside and it is very easy to find and view from outside without opening the app. I can easily view the images save inside the folder by browsing through File Manager. However, it seems like iPhone didn't provide such function to let user store images into the Application Folder. I can't even find the similar app like File Manager provided by Android in iPhone. Any iPhone user here? Please tell me the what is the correct path to save image in iPhone and I can view it from outside. Normally, I will set the image path as "storage/emulated/0/data/AppPackageName/AppImage" for android. How about iPhone? Thanks in advance for any help. And the most important is where can I browse through the saved image in iPhone?

Here is a doc about File system access in Xamarin.iOS .

Normally, I will set the image path as "storage/emulated/0/data/AppPackageName/AppImage" for android. How about iPhone?

iOS has sandbox in Application , it's the same as Android with path ' storage/emulated/0/data/AppPackageName/AppImage ' . However it can not be detected outside the Application, only exposed inside App .

Your application's access to the file system (and other resources such as the network and hardware features) is limited for security reasons. This restriction is known as the Application Sandbox . In terms of the file system, your application is limited to creating and deleting files and directories in its home directory.

And the most important is where can I browse through the saved image in iPhone?

If you need to browse the saved file in iPhone , maybe you need Sharing with the Files app .

iOS 11 introduced the Files app - a file browser for iOS that allows the user to see and interact with their files in iCloud and also stored by any application that supports it.

You can refer to above doc to know how to implement it in iOS .I think it's not conveniently to do the same thing as Android in iOS .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM