I'm developing ios apps on the ipad playground 4, and trying to create files but they're saved in the path:
var/mobile/Containers/Data/Application
how to Access to this path ? And How many paths my app can Access to? and what is it?
I'm developing ios apps on the ipad playground 4, and trying to create files but they're saved in the path:
var/mobile/Containers/Data/Application
how to Access to this path ? And How many paths my app can Access to? and what is it?
When you install an app on an iOS device, the system creates a container for that app. The container is a directory and, within that directory, that’s a hierarchy of other directories with specific purposes. You can find specific locations within that container using FileManager
. For example, the Documents directory is a common place for your app to store files:
let url = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
// -> file:///var/mobile/Containers/Data/Application/22D03872-95A4-48AB-9B16-08F9474B8ED1/Documents/
The other files you have access to by default are the resources in your app’s bundle. Locate those using Bundle
APIs. For example, if you add a config.plist
file to your app, locate it like so:
let url = Bundle.main.url(forResource: "config", withExtension: "plist")!
// -> file:///private/var/containers/Bundle/Application/70189312-B9DE-4F7E-A043-2AB7783FCB74/Test700772.app/config.plist
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
hi i have this error Message when try to test my app on a device
'/private/var/containers/Bundle/Application/1372BFA2-90C5-4F48-B671-33860246FC58
need your help to fix this