ios – Is there any limitation/ safety threat through the use of App Group Listing in comparison with Utility Assist Listing to retailer all my app associated knowledge?

[ad_1]

All of the whereas, I’m storing my app associated knowledge (photos, audio recordsdata, zip recordsdata, …) in Utility Assist Listing

static func getUserDataDirectory() -> URL {
    let fm = FileManager.default
    do {
        let userDataDirectory = attempt fm.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
        return userDataDirectory
    } catch {
        print("(error)")
    }
    
    fatalError()
}

One of many fundamental purpose I select Utility Assist Listing, over Doc Listing is that,

  1. I are not looking for third get together app to entry my app content material.
  2. I are not looking for consumer to entry the app knowledge manually, with out going by way of my app.

Now, I need to create 2 extensions for my app

  1. Share extension – In order that consumer can share knowledge from third get together app to my app.
  2. Widget extension – In order that consumer can have my app widget.

I plan emigrate all my present current knowledge in Utility Assist Listing, to App Group Listing, in order that my extensions can have entry to all app knowledge.

static func getUserDataDirectory() -> URL {
    let fm = FileManager.default
    
    let userDataDirectory = fm.containerURL(forSecurityApplicationGroupIdentifier: "group.com.xxx.yyy")
    
    userDataDirectory
}

Nevertheless, I used to be questioning, by doing so, is there any technical limitation, or safety threat concerned?

Will third get together app capable of entry my App Group Listing, or will consumer capable of entry my App Group Listing knowledge with out going by way of my app?

Thanks.

[ad_2]

Leave a Reply