Issue with fatal error: unexpectedly found nil while unwrapping an Optional value.
let lastupdate = defaults.stringForKey("localdate")
self.lastUpdate.text = "Updated at " + last update! //issues when I use this line
self.lastUpdate.text = lastupdate // If use this line I have no issues.
Works if I pre populate the data. But I would like to allow a nil value.
stringForKey returns an optional, so you can use the nil coalescing operator "??" to return an empty string "" in case of nil:
Try this,