Code Monkey home page Code Monkey logo

fddkeychainkit's Introduction

FDDKeyChainKit

FDDKeyChainKit

要使用FDDKeyChainKit 首先默认你有开发经验,准备工作如下

要使用Keychain来操作,前期的准备还是有点麻烦的,因为不是直接可以拿来用的,而需要在工程中额外添加一些东西: 1)导入secutity.framework 先在左侧文件列表中选中项目名称,然后选中TARGETS,中间界面选中Build Phases,在Link Binary With Libraries中点击加号, 搜索找到secutity.framework导入即可:

2)、添加KeychainItemWrapper.h/.m文件 除了secutity.framework,我们还要添加一个东西到工程中,就是KeychainItemWrapper.h和KeychainItemWrapper.m文件, 这两个也需要额外引入才能在我们自己的代码中引用,就当成是引用第三方类库一样吧,这两个文件直接复制进工程里面就好了,可以在我的示例工程中复制。

3)、禁用KeychainItemWrapper.h/.m文件的ARC 现在已经流行ARC机制,我们创建工程也是默认的全局使用ARC,但是这两个文件因为年代久远吧,还不是ARC而是MRC, 可以在其代码中看到大量MRC的内容比如release之类的,如果不加修改,直接运行会报很多错误,所以有两个解决办法, 第一个把所有报错的地方由MRC方式改成ARC方式,这种方法太麻烦,第二种就是直接禁用这个文件的ARC就好了,方法如下: 先在左侧文件列表中选中项目名称,然后选中TARGETS,中间界面选中Build Phases,然后在Compile Sources中找到要禁用的文件, 这里是KeychainItemWrapper.m,然后双击修改其Compiler Flags值为 -fno-objc-arc,如下

fddkeychainkit's People

Contributors

donyfang avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.