Skip to content

Instantly share code, notes, and snippets.

@marklarr
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marklarr/3c61cf4e6c74137012ba to your computer and use it in GitHub Desktop.
Save marklarr/3c61cf4e6c74137012ba to your computer and use it in GitHub Desktop.
NSUserNotificationAction.isEqual sets authenticationRequired
// Playground - noun: a place where people can play
import UIKit
import Foundation
var authRequiredAction = UIMutableUserNotificationAction()
authRequiredAction.authenticationRequired = true
var authNotRequiredAction = UIMutableUserNotificationAction()
authNotRequiredAction.authenticationRequired = false
authRequiredAction.authenticationRequired == true //true
authNotRequiredAction.authenticationRequired == false //true
authNotRequiredAction.isEqual(authRequiredAction)
authRequiredAction.authenticationRequired == true //true
// Fails
authNotRequiredAction.authenticationRequired == false //false
@marklarr
Copy link
Author

@marklarr
Copy link
Author

Looks like someone at Apple accidentally did
obj1.authenticationRequired = obj2.authenticationRequired
rather than
obj1.authenticationRequired == obj2.authenticationRequired

in isEqual

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