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 is like a drop-in replacement for realms example swift project enabling encryption using the function getKey(). | |
https://github.com/realm/realm-cocoa/blob/master/examples/ios/swift/Encryption/ViewController.swift | |
The following swift function is a drop in replacement, it documents the painful experience of an issue | |
which has been unsolved for years till crashlytics revealed a very useful hint, which lead to the root cause | |
and fix. | |
Comments included for education on what the symptoms were, the cause and fix and other notes. |
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
// Douglas Hill, December 2018 | |
// Made for https://douglashill.co/reading-app/ | |
// Find the latest version of this file at https://github.com/douglashill/KeyboardKit | |
import UIKit | |
/// A table view that allows navigation and selection using a hardware keyboard. | |
/// Only supports a single section. | |
class KeyboardTableView: UITableView { | |
// These properties may be set or overridden to provide discoverability titles for key commands. |
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
// http://stackoverflow.com/a/40089462 | |
extension Data { | |
func hexEncodedString() -> String { | |
return map { String(format: "%02hhx", $0) }.joined() | |
} | |
} |