SecCopyErrorMessageString gives “Use of unresolved identifier” in swift

前端 未结 3 375
遇见更好的自我
遇见更好的自我 2021-01-13 12:32

Trying to use SecCopyErrorMessageString to interpret errorCode. in swift :

    var result: OSStatus
    result = SecItemAdd(query as CFDictionary, nil);


          


        
3条回答
  •  半阙折子戏
    2021-01-13 12:50

    It may not be obvious: This API is part of the Security framework. You need to add the framework to your project target's Build Phases > Link Binary With Libraries.

提交回复
热议问题