Skip to content

Conversation

@bsorrentino
Copy link

In version 1.0.0 of gem xcodeproj the module PlistHelper no longer exists and it has been replaced by Plist

/// String description of the enum value
public var description: String {
guard let value = Self.get(self) else { return "nil" }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

UserDefaults.standard.set(false, forKey: Settings.EnableAnalytics.identifier)

Settings.subscribe(.EnableAnalytics) { (newValue) -> Void in
Settings.subscribe(setting: .EnableAnalytics) { (newValue) -> Void in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused Closure Parameter Violation: Unused parameter "newValue" in a closure should be replaced with _. (unused_closure_parameter)

UserDefaults.standard.set(value, forKey: identifier)

let result = Settings.get(.ApiEnvironment) as! String
let result = Settings.get(setting: .ApiEnvironment) as! String

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)

UserDefaults.standard.set(value, forKey: identifier)

let result = Settings.get(.LuckyNumber) as! Int
let result = Settings.get(setting: .LuckyNumber) as! Int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)

UserDefaults.standard.set(value, forKey: identifier)

let result = Settings.get(.CityState) as! [ String: String ]
let result = Settings.get(setting: .CityState) as! [ String: String ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)

UserDefaults.standard.set(value, forKey: identifier)

let result = Settings.get(.DateOfBirth) as! NSDate
let result = Settings.get(setting: .DateOfBirth) as! NSDate

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)

Settings.set(setting: .DateOfBirth, value)

let result = NSUserDefaults.standardUserDefaults().objectForKey(identifier) as! NSDate
let result = UserDefaults.standard.object(forKey: identifier) as! NSDate

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)

Settings.set(setting: .EncodedString, value)

let result = NSUserDefaults.standardUserDefaults().objectForKey(identifier) as! NSData
let result = UserDefaults.standard.object(forKey: identifier) as! NSData

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)

it("can store data") {
let identifier = Settings.EncodedString.identifier
let value = NSData(base64EncodedString: "SGVsbG8gV29ybGQ=", options: []) as NSData!
let value = NSData(base64Encoded: "SGVsbG8gV29ybGQ=", options: []) as! NSData

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)

Settings.set(setting: .SocialNetworks, value)

let result = NSUserDefaults.standardUserDefaults().arrayForKey(identifier) as! [String]
let result = UserDefaults.standard.array(forKey: identifier) as! [String]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)

center.addObserverForName(NSUserDefaultsDidChangeNotification, object: defaults, queue: nil) { (notif) -> Void in
if let defaults = notif.object as? NSUserDefaults {
onChange(newValue: defaults.objectForKey(self.identifier))
center.addObserver(forName: UserDefaults.didChangeNotification, object: defaults, queue: nil) { (notif) -> Void in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discarded Notification Center Observer Violation: When registering for a notification using a block, the opaque observer that is returned should be stored so it can be removed later. (discarded_notification_center_observer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants