[+] Create function to get local alarms

This commit is contained in:
Hykilpikonna
2021-01-17 13:00:52 -05:00
parent 04b4798ac3
commit bbd1520f5d
+3
View File
@@ -30,6 +30,9 @@ class JSON
/// Local storage
let localStorage = UserDefaults(suiteName: "group.org.hydev.alarm.clock")!
/// Get alarms from local storage
func getLocalAlarms() -> [Alarm] { return JSON.parse([Alarm].self, localStorage.string(forKey: "alarms")!)! }
/// API class
struct API<T>
{