iOS Code Works on iOS 9 but not on iOS 8? iOS Code Works on iOS 9 but not on iOS 8? swift swift

iOS Code Works on iOS 9 but not on iOS 8?


I'm not sure it will help but it's worth a try:

self.sections = NSKeyedUnarchiver.unarchiveObjectWithData(data) as! Dictionary

In the "saving code" in the above mentioned line, try using NSDictionary instead of Dictionary when running on iOS8.I think I read somewhere, they only introduced Dictionary class quite recently.I'm not certain of this and I'm kind of newbie when it comes to iOS but it's worth a try...it might work. If it works, just put the Dictionary line in a if #available(ios 9.0 *) condition.