forked from Artificial-Pancreas/iAPS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve a type error (Artificial-Pancreas#935)
Resolves a Preferences type error. CAVE! This will reset Preferences.json to defaults, but if you have backup of settings enabled (sharing) you will have the option to restore the settings with just a tap in a confirmation dialogue, no key needed.
- Loading branch information
Showing
13 changed files
with
278 additions
and
85 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Foundation | ||
|
||
final class Token { | ||
func getIdentifier() -> String { | ||
let keychain = BaseKeychain() | ||
var identfier = keychain.getValue(String.self, forKey: IAPSconfig.id) ?? "" | ||
guard identfier.count > 1 else { | ||
identfier = UUID().uuidString | ||
keychain.setValue(identfier, forKey: IAPSconfig.id) | ||
return identfier | ||
} | ||
return identfier | ||
} | ||
} |
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
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
Oops, something went wrong.