Fix cli for compatibility with xcodeproj 1.0.0#10
Fix cli for compatibility with xcodeproj 1.0.0#10bsorrentino wants to merge 12 commits intodtrenz:developfrom
Conversation
| /// String description of the enum value | ||
| public var description: String { | ||
| guard let value = Self.get(self) else { return "nil" } | ||
|
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ] |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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)
In version 1.0.0 of gem
xcodeprojthe modulePlistHelperno longer exists and it has been replaced byPlist