Documentation Archive Developer
Search

SecurityFoundation Changes for Swift

SecurityFoundation

DeclarationProtocols
From
class SFAuthorization : NSObject, NSCoding {
    class func authorization() -> AnyObject!
    func authorizationRef() -> AuthorizationRef
    class func authorizationWithFlags(_ flags: AuthorizationFlags, rights rights: UnsafePointer<AuthorizationRights>, environment environment: UnsafePointer<AuthorizationEnvironment>) -> AnyObject!
    init!(flags flags: AuthorizationFlags, rights rights: UnsafePointer<AuthorizationRights>, environment environment: UnsafePointer<AuthorizationEnvironment>)
    init!()
    func invalidateCredentials()
    func obtainWithRight(_ rightName: AuthorizationString, flags flags: AuthorizationFlags) throws
    func obtainWithRights(_ rights: UnsafePointer<AuthorizationRights>, flags flags: AuthorizationFlags, environment environment: UnsafePointer<AuthorizationEnvironment>, authorizedRights authorizedRights: UnsafeMutablePointer<UnsafeMutablePointer<AuthorizationRights>>) throws
}
extension SFAuthorization {
    func permitWithRights(_ rights: UnsafePointer<AuthorizationRights>, flags flags: AuthorizationFlags, environment environment: UnsafePointer<AuthorizationEnvironment>, authorizedRights authorizedRights: UnsafeMutablePointer<AuthorizationRights>) -> OSStatus
    func permitWithRight(_ rightName: AuthorizationString, flags flags: AuthorizationFlags) -> OSStatus
}
NSCoding
To
class SFAuthorization : NSObject, NSCoding {
    class func authorization() -> Any!
    func authorizationRef() -> AuthorizationRef!
    class func authorization(with flags: AuthorizationFlags, rights rights: UnsafePointer<AuthorizationRights>!, environment environment: UnsafePointer<AuthorizationEnvironment>!) -> Any!
    init!(flags flags: AuthorizationFlags, rights rights: UnsafePointer<AuthorizationRights>!, environment environment: UnsafePointer<AuthorizationEnvironment>!)
    init!()
    func invalidateCredentials()
    func obtain(withRight rightName: AuthorizationString!, flags flags: AuthorizationFlags) throws
    func obtain(withRights rights: UnsafePointer<AuthorizationRights>!, flags flags: AuthorizationFlags, environment environment: UnsafePointer<AuthorizationEnvironment>!, authorizedRights authorizedRights: UnsafeMutablePointer<UnsafeMutablePointer<AuthorizationRights>?>!) throws
    func permit(withRights rights: UnsafePointer<AuthorizationRights>!, flags flags: AuthorizationFlags, environment environment: UnsafePointer<AuthorizationEnvironment>!, authorizedRights authorizedRights: UnsafeMutablePointer<AuthorizationRights>!) -> OSStatus
    func permit(withRight rightName: AuthorizationString!, flags flags: AuthorizationFlags) -> OSStatus
    func scriptingIsEqual(to object: Any) -> Bool
    func scriptingIsLessThanOrEqual(to object: Any) -> Bool
    func scriptingIsLessThan(_ object: Any) -> Bool
    func scriptingIsGreaterThanOrEqual(to object: Any) -> Bool
    func scriptingIsGreaterThan(_ object: Any) -> Bool
    func scriptingBegins(with object: Any) -> Bool
    func scriptingEnds(with object: Any) -> Bool
    func scriptingContains(_ object: Any) -> Bool
    func isEqual(to object: Any?) -> Bool
    func isLessThanOrEqual(to object: Any?) -> Bool
    func isLessThan(_ object: Any?) -> Bool
    func isGreaterThanOrEqual(to object: Any?) -> Bool
    func isGreaterThan(_ object: Any?) -> Bool
    func isNotEqual(to object: Any?) -> Bool
    func doesContain(_ object: Any) -> Bool
    func isLike(_ object: String) -> Bool
    func isCaseInsensitiveLike(_ object: String) -> Bool
    var objectSpecifier: NSScriptObjectSpecifier? { get }
    func indicesOfObjects(byEvaluatingObjectSpecifier specifier: NSScriptObjectSpecifier) -> [NSNumber]?
    func value(at index: Int, inPropertyWithKey key: String) -> Any?
    func value(withName name: String, inPropertyWithKey key: String) -> Any?
    func value(withUniqueID uniqueID: Any, inPropertyWithKey key: String) -> Any?
    func insertValue(_ value: Any, at index: Int, inPropertyWithKey key: String)
    func removeValue(at index: Int, fromPropertyWithKey key: String)
    func replaceValue(at index: Int, inPropertyWithKey key: String, withValue value: Any)
    func insertValue(_ value: Any, inPropertyWithKey key: String)
    func coerceValue(_ value: Any?, forKey key: String) -> Any?
    var classCode: FourCharCode { get }
    var className: String { get }
    func scriptingValue(for objectSpecifier: NSScriptObjectSpecifier) -> Any?
    var scriptingProperties: [String : Any]?
    func copyScriptingValue(_ value: Any, forKey key: String, withProperties properties: [String : Any]) -> Any?
    func newScriptingObject(of objectClass: AnyClass, forValueForKey key: String, withContentsValue contentsValue: Any?, properties properties: [String : Any]) -> Any?
    @NSCopying var classDescription: NSClassDescription { get }
    var attributeKeys: [String] { get }
    var toOneRelationshipKeys: [String] { get }
    var toManyRelationshipKeys: [String] { get }
    func inverse(forRelationshipKey relationshipKey: String) -> String?
    var classForPortCoder: AnyClass { get }
    func replacementObject(for coder: NSPortCoder) -> Any?
    var classForArchiver: AnyClass? { get }
    func replacementObject(for archiver: NSArchiver) -> Any?
    func performSelector(onMainThread aSelector: Selector, with arg: Any?, waitUntilDone wait: Bool, modes array: [String]?)
    func performSelector(onMainThread aSelector: Selector, with arg: Any?, waitUntilDone wait: Bool)
    func perform(_ aSelector: Selector, on thr: Thread, with arg: Any?, waitUntilDone wait: Bool, modes array: [String]?)
    func perform(_ aSelector: Selector, on thr: Thread, with arg: Any?, waitUntilDone wait: Bool)
    func performSelector(inBackground aSelector: Selector, with arg: Any?)
    class func classForKeyedUnarchiver() -> AnyClass
    var classForKeyedArchiver: AnyClass? { get }
    func replacementObject(for archiver: NSKeyedArchiver) -> Any?
    class func classFallbacksForKeyedArchiver() -> [String]
    class func setKeys(_ keys: [Any], triggerChangeNotificationsForDependentKey dependentKey: String)
    class func keyPathsForValuesAffectingValue(forKey key: String) -> Set<String>
    class func automaticallyNotifiesObservers(forKey key: String) -> Bool
    var observationInfo: UnsafeMutableRawPointer?
    func willChangeValue(forKey key: String)
    func didChangeValue(forKey key: String)
    func willChange(_ changeKind: NSKeyValueChange, valuesAt indexes: IndexSet, forKey key: String)
    func didChange(_ changeKind: NSKeyValueChange, valuesAt indexes: IndexSet, forKey key: String)
    func willChangeValue(forKey key: String, withSetMutation mutationKind: NSKeyValueSetMutationKind, using objects: Set<AnyHashable>)
    func didChangeValue(forKey key: String, withSetMutation mutationKind: NSKeyValueSetMutationKind, using objects: Set<AnyHashable>)
    func addObserver(_ observer: NSObject, forKeyPath keyPath: String, options options: NSKeyValueObservingOptions = [], context context: UnsafeMutableRawPointer?)
    func removeObserver(_ observer: NSObject, forKeyPath keyPath: String, context context: UnsafeMutableRawPointer?)
    func removeObserver(_ observer: NSObject, forKeyPath keyPath: String)
    func observeValue(forKeyPath keyPath: String?, of object: Any?, change change: [NSKeyValueChangeKey : Any]?, context context: UnsafeMutableRawPointer?)
    class func useStoredAccessor() -> Bool
    func storedValue(forKey key: String) -> Any?
    func takeStoredValue(_ value: Any?, forKey key: String)
    func takeValue(_ value: Any?, forKey key: String)
    func takeValue(_ value: Any?, forKeyPath keyPath: String)
    func handleQuery(withUnboundKey key: String) -> Any?
    func handleTakeValue(_ value: Any?, forUnboundKey key: String)
    func unableToSetNil(forKey key: String)
    func values(forKeys keys: [Any]) -> [AnyHashable : Any]
    func takeValues(from properties: [AnyHashable : Any])
    class var accessInstanceVariablesDirectly: Bool { get }
    func value(forKey key: String) -> Any?
    func setValue(_ value: Any?, forKey key: String)
    func validateValue(_ ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, forKey inKey: String) throws
    func mutableArrayValue(forKey key: String) -> NSMutableArray
    func mutableOrderedSetValue(forKey key: String) -> NSMutableOrderedSet
    func mutableSetValue(forKey key: String) -> NSMutableSet
    func value(forKeyPath keyPath: String) -> Any?
    func setValue(_ value: Any?, forKeyPath keyPath: String)
    func validateValue(_ ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, forKeyPath inKeyPath: String) throws
    func mutableArrayValue(forKeyPath keyPath: String) -> NSMutableArray
    func mutableOrderedSetValue(forKeyPath keyPath: String) -> NSMutableOrderedSet
    func mutableSetValue(forKeyPath keyPath: String) -> NSMutableSet
    func value(forUndefinedKey key: String) -> Any?
    func setValue(_ value: Any?, forUndefinedKey key: String)
    func setNilValueForKey(_ key: String)
    func dictionaryWithValues(forKeys keys: [String]) -> [String : Any]
    func setValuesForKeys(_ keyedValues: [String : Any])
    func fileManager(_ fm: FileManager, shouldProceedAfterError errorInfo: [AnyHashable : Any]) -> Bool
    func fileManager(_ fm: FileManager, willProcessPath path: String)
    func perform(_ aSelector: Selector, with anArgument: Any?, afterDelay delay: TimeInterval, inModes modes: [RunLoopMode])
    func perform(_ aSelector: Selector, with anArgument: Any?, afterDelay delay: TimeInterval)
    class func cancelPreviousPerformRequests(withTarget aTarget: Any, selector aSelector: Selector, object anArgument: Any?)
    class func cancelPreviousPerformRequests(withTarget aTarget: Any)
    func attemptRecovery(fromError error: Error, optionIndex recoveryOptionIndex: Int, delegate delegate: Any?, didRecoverSelector didRecoverSelector: Selector?, contextInfo contextInfo: UnsafeMutableRawPointer?)
    func attemptRecovery(fromError error: Error, optionIndex recoveryOptionIndex: Int) -> Bool
    var autoContentAccessingProxy: Any { get }
    class func pose(as aClass: AnyClass)
    class func version() -> Int
    class func setVersion(_ aVersion: Int)
    var classForCoder: AnyClass { get }
    func replacementObject(for aCoder: NSCoder) -> Any?
    func awakeAfter(using aDecoder: NSCoder) -> Any?
}
extension SFAuthorization : CVarArg {
}
extension SFAuthorization : Equatable, Hashable {
    var hashValue: Int { get }
}
extension SFAuthorization {
    func permit(withRights rights: UnsafePointer<AuthorizationRights>!, flags flags: AuthorizationFlags, environment environment: UnsafePointer<AuthorizationEnvironment>!, authorizedRights authorizedRights: UnsafeMutablePointer<AuthorizationRights>!) -> OSStatus
    func permit(withRight rightName: AuthorizationString!, flags flags: AuthorizationFlags) -> OSStatus
}
CVarArg, Equatable, Hashable, NSCoding

Declaration
From
class func authorization() -> AnyObject!
To
class func authorization() -> Any!

Declaration
From
class func authorizationWithFlags(_ flags: AuthorizationFlags, rights rights: UnsafePointer<AuthorizationRights>, environment environment: UnsafePointer<AuthorizationEnvironment>) -> AnyObject!
To
class func authorization(with flags: AuthorizationFlags, rights rights: UnsafePointer<AuthorizationRights>!, environment environment: UnsafePointer<AuthorizationEnvironment>!) -> Any!

Declaration
From
func authorizationRef() -> AuthorizationRef
To
func authorizationRef() -> AuthorizationRef!

Declaration
From
init!(flags flags: AuthorizationFlags, rights rights: UnsafePointer<AuthorizationRights>, environment environment: UnsafePointer<AuthorizationEnvironment>)
To
init!(flags flags: AuthorizationFlags, rights rights: UnsafePointer<AuthorizationRights>!, environment environment: UnsafePointer<AuthorizationEnvironment>!)

Declaration
From
func obtainWithRight(_ rightName: AuthorizationString, flags flags: AuthorizationFlags) throws
To
func obtain(withRight rightName: AuthorizationString!, flags flags: AuthorizationFlags) throws

Declaration
From
func obtainWithRights(_ rights: UnsafePointer<AuthorizationRights>, flags flags: AuthorizationFlags, environment environment: UnsafePointer<AuthorizationEnvironment>, authorizedRights authorizedRights: UnsafeMutablePointer<UnsafeMutablePointer<AuthorizationRights>>) throws
To
func obtain(withRights rights: UnsafePointer<AuthorizationRights>!, flags flags: AuthorizationFlags, environment environment: UnsafePointer<AuthorizationEnvironment>!, authorizedRights authorizedRights: UnsafeMutablePointer<UnsafeMutablePointer<AuthorizationRights>?>!) throws