Last active
August 30, 2020 00:28
-
-
Save laevandus/a4d96b069a9a4360ed96d624823ca623 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension WidgetPlantProvider { | |
static let sharedDataFileURL: URL = { | |
let appGroupIdentifier = "group.com.company.appname.widget" | |
if let url = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroupIdentifier) { | |
return url.appendingPathComponent("Plants.plist") | |
} | |
else { | |
preconditionFailure("Expected a valid app group container") | |
} | |
}() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment