Better os() directives

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander
2019-01-22 04:06:27 +05:30
parent e2b068af1a
commit 273ee04450
4 changed files with 21 additions and 7 deletions
+3 -1
View File
@@ -8,8 +8,10 @@ extension FileManager {
private static var sharedFolderURL: URL? {
#if os(iOS)
let appGroupIdInfoDictionaryKey = "com.wireguard.ios.app_group_id"
#elseif os(OSX)
#elseif os(macOS)
let appGroupIdInfoDictionaryKey = "com.wireguard.macos.app_group_id"
#else
#error("Unimplemented")
#endif
guard let appGroupId = Bundle.main.object(forInfoDictionaryKey: appGroupIdInfoDictionaryKey) as? String else {
os_log("Cannot obtain app group ID from bundle", log: OSLog.default, type: .error)