Userdefaults value set in swift module returns nil when accessed from Objecive-c files under the same target.
defaults?.setValue(data["details"]["equipmentLocationRefreshInterval"].intValue, forKey: "equipmentLocationRefreshInterval")
defaults?.setValue(data["details"]["hasEquipmentDeviceLocationConfigured"].boolValue, forKey: "hasEquipmentDeviceLocationConfigured")
defaults?.synchronize()
//data["details"]["equipmentLocationRefreshInterval"] = 30
//data["details"]["hasEquipmentDeviceLocationConfigured"] = TRUE
When accessed from objective-C classes
[[NSUserDefaults standardUserDefaults] valueForKey:@"equipmentLocationRefreshInterval"];
//returns nil
[[NSUserDefaults standardUserDefaults] integerForKey:@"equipmentLocationRefreshInterval"];
//returns <nil>
[[NSUserDefaults standardUserDefaults] boolForKey:@"hasEquipmentDeviceLocationConfigured"];
// returns true when set as true in swift module.
I am failing to understand this behavior of Userdefaults. I am able to access one key's value and not others.