guard let appGroup = AppGroup("group.com.asmallteapot.ClodKit_Example") else {
fatalError("Nyah! Couldn't get the example app group")
}
// access the app group's shared user defaults
if !self.appGroup.userDefaults.bool(forKey: "ClodKitUsageViewed") {
// get the URL or path for the app group's shared container
print(appGroup.containerPath)
print(appGroup.containerURL)
// update the defaults key
appGroup.userDefaults.set(true, forKey: "ClodKitUsageViewed")
}
Ellen Teapot / @asmallteapot
ClodKit is available under the MIT license. See the LICENSE file for more info.