diff --git a/RippleChat.xcodeproj/project.pbxproj b/RippleChat.xcodeproj/project.pbxproj index 79068ad..d175a68 100644 --- a/RippleChat.xcodeproj/project.pbxproj +++ b/RippleChat.xcodeproj/project.pbxproj @@ -485,7 +485,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"RippleChat/Preview Content\""; - DEVELOPMENT_TEAM = B5S58UWR64; + DEVELOPMENT_TEAM = GN2B48NJ47; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "Allow for bluetooth use"; @@ -500,7 +500,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = unibas.inetsec.RippleChat; + PRODUCT_BUNDLE_IDENTIFIER = unibas.inetsec.RippleChat1; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -516,7 +516,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"RippleChat/Preview Content\""; - DEVELOPMENT_TEAM = B5S58UWR64; + DEVELOPMENT_TEAM = GN2B48NJ47; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "Allow for bluetooth use"; @@ -531,7 +531,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = unibas.inetsec.RippleChat; + PRODUCT_BUNDLE_IDENTIFIER = unibas.inetsec.RippleChat1; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; diff --git a/RippleChat/DataStore.swift b/RippleChat/DataStore.swift index 2a50416..8154909 100644 --- a/RippleChat/DataStore.swift +++ b/RippleChat/DataStore.swift @@ -54,7 +54,9 @@ class DataStore: ObservableObject { func loadPersonalID() async throws { let task = Task { let fileURL = try self.fileURL(for: "personalID") - let data = try Data(contentsOf: fileURL) + guard let data = try? Data(contentsOf: fileURL) else { + return "" + } let personalID = try JSONDecoder().decode(String.self, from: data) return personalID } @@ -65,7 +67,9 @@ class DataStore: ObservableObject { func loadFriends() async throws { let task = Task<[String:Int], Error> { let fileURL = try self.fileURL(for: "friends") - let data = try Data(contentsOf: fileURL) + guard let data = try? Data(contentsOf: fileURL) else { + return [:] + } let friends = try JSONDecoder().decode([String:Int].self, from: data) return friends }