Backing up and restoring an app group container

We're in the process of moving our app's storage from the app container to an app group container so that the data can be accessed by app extensions (such as share extensions) as well.

However, we found that Xcode does not backup app group containers via the Devices and Simulators window. How can I include the app group in the backup and restore process?

Similarly, could you confirm that app groups are indeed included in the iCloud backup and restore process?

However, we found that Xcode does not backup app group containers via the Devices and Simulators window.

So, to be clear, you’re referring to the Download Container and Replace Container items on the gear menu in the Installed Apps section of Devices and Simulators, right?

Similarly, could you confirm that app groups are indeed included in the iCloud backup and restore process?

That’s certainly my understanding. And likewise for iTunes Finder backups. However, if you’re concerned about this, it’s easy enough for you to test.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

That’s certainly my understanding. And likewise for iTunes Finder backups. However, if you’re concerned about this, it’s easy enough for you to test.

Good to know.

So, to be clear, you’re referring to the Download Container and Replace Container items on the gear menu in the Installed Apps section of Devices and Simulators, right?

Yes, that's what I'm referring to. Do you have a recommendation on how to download and app replace group containers?

Do you have a recommendation on how to download and app replace group containers?

Not really. This seems like something that Xcode should support and I encourage you to file an enhancement request describing your requirements. Please post your bug number, just for the record.

As to a workaround, it kinda depends on your specific requirements. If you want to do this manually, you could create a second app that also has access to the App Group and have it copy content from a directory in the app’s container to the App Group’s container, and vice versa. You can then:

  • Recover the App Group container by running this app, tapping the button to copy the App Group container to a directory in the app’s container, and then doing the Xcode thing.

  • Set the App Group container by doing the Xcode thing, then running the app, and then tapping the button to copy the directory in the app’s container to the App Group container.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks so much for your reply! The second app is what we went for. It's a tiny bit scary as we have to trust that our backup app doesn't contain any bugs, but it works.

I filed a report: FB9735307

Backing up and restoring an app group container
 
 
Q