Top "Nscoding" questions

NSCoding is a protocol from Apple Foundation framework.

Why NSUserDefaults failed to save NSMutableDictionary in iOS?

I'd like to save an NSMutableDictionary object in NSUserDefaults. The key type in NSMutableDictionary is NSString, the value type is …

ios objective-c cocoa-touch nsuserdefaults nscoding
Xcode 9 GM - WKWebView NSCoding support was broken in previous versions

Does anyone know how to fix this error with Xcode 9 GM? I'm working on an app made with Xcode 8.3, the …

ios xcode wkwebview nscoding
Swift 3 saving and retrieving custom object from userDefaults

I have this in Playground using Swift 3, Xcode 8.0: import Foundation class Person: NSObject, NSCoding { var name: String var age: Int …

ios swift xcode swift3 nscoding
Saving custom Swift class with NSCoding to UserDefaults

I am currently trying to save a custom Swift class to NSUserDefaults. Here is the code from my Playground: import …

swift nsuserdefaults sigabrt nscoding
Attempt to insert non-property list object when trying to save a custom object in Swift 3

I have a simple object which conforms to the NSCoding protocol. import Foundation class JobCategory: NSObject, NSCoding { var id: Int …

ios swift swift3 nsuserdefaults nscoding
Type Has No Subscript Members?

I get the error "Type 'Ship' has no subscript members when I try to do: var coor = ship[index] I …

ios swift optional nscoding subscript
cast NSString! to String in swift

I have a instance variable name in String var name: String My class implements the NSCoding protocol. So for name …

string casting swift nsstring nscoding
Got Unrecognized selector -replacementObjectForKeyedArchiver: crash when implementing NSCoding in Swift

I created a Swift class that conforms to NSCoding. (Xcode 6 GM, Swift 1.0) import Foundation private var nextNonce = 1000 class Command: NSCoding { …

ios swift xcode6 nscoding
NSCoding VS Core data

I've been searching for an article that explains NSCoding (NSKeyedArchiver...) advantages and disadvantages over use of CoreData (SQLite....). There's a …

ios core-data persistence nscoding data-management
Save struct in class to NSUserDefaults using Swift

I have a class and inside the class is a (swift) array, based on a global struct. I want to …

ios uiimageview swift nsuserdefaults nscoding