Created
October 11, 2018 03:18
-
-
Save vialyx/0815f5520b4258fb2c745d048006d560 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class TransportStorage { | |
weak var output: NSObject? | |
let database: Any // <----- Constant | |
var token: String? | |
init(database: Any) { | |
self.database = database | |
} | |
} | |
let storage = TransportStorage(database: UserDefaults.standard) | |
storage.token = UUID().uuidString | |
print("storage token is \(storage.token ?? "")") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment