Lets say, I have two extensions in a project. And I want to set a variable in one extension and read the updated value of that variable from another extension. I don't want to use Coredata.
Currently, I am using Common cocoa touch framework and imported that framework in both the extensions. I have defined getter and setter for one of the variable in the class defined in common framework. But, the changed value by one extension is not showing to another extension.
Any idea, why its not updating or anyother approach please.
To set value:
NSUserDefaults.standardUserDefaults().setObject(someValue, forKey: "myName") NSUserDefaults.standardUserDefaults().synchronize()
To get value:(in another extension)