Skip to content

Instantly share code, notes, and snippets.

@satoshin2071
Last active May 30, 2016 09:24
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 satoshin2071/b3c209fbf7c1de7ff6b8837ee203c760 to your computer and use it in GitHub Desktop.
Save satoshin2071/b3c209fbf7c1de7ff6b8837ee203c760 to your computer and use it in GitHub Desktop.
CommonCryptoをSwiftで利用する

素直にIDZSwiftCommonCryptoを使おう

## 必要なこと

1. Security.frameworkを追加 2. bridgin-Header.hに#import <CommonCrypto/CommonCryptor.h> 追加

## ProjectName-Bridging-Header.hの設定方法

ファイルの追加 名前は ProjectName-Bridging-Header.h

File > New > File > (iOS, watchOS, tvOS, or OS X) > Source > Header File.

BuildSettingでパスを追加

TARGETS -> Build Settings -> Swift Compiler-Code Generation -> Objective-C Bridging Header

以下のパスを追加

$(SRCROOT)/$(PROJECT)/ProjectName-Bridging-Header.h

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