Bläddra i källkod

Readme with installation instruction

Marcin Krzyżanowski 11 år sedan
förälder
incheckning
bc161def14
2 ändrade filer med 32 tillägg och 11 borttagningar
  1. 2 3
      CryptoSwift.podspec
  2. 30 8
      README.md

+ 2 - 3
CryptoSwift.podspec

@@ -11,8 +11,7 @@ Pod::Spec.new do |s|
   s.platform     = :ios
   s.ios.deployment_target = '7.0'
   s.source       = { :git => "https://github.com/krzyzanowskim/CryptoSwift.git", :tag => "0.0.1" }
-  s.source_files = "CryptoSwift/*"
-  s.dependency   = "OpenSSL-Universal"
+  s.source_files = ["CryptoSwift/*", "CryptoSwift-Bridging-Header.h"]
+  s.dependency   "OpenSSL-Universal"
   s.requires_arc = true
-  s.dependa
 end

+ 30 - 8
README.md

@@ -1,15 +1,37 @@
-CryptoSwift
-===========
+#CryptoSwift
 
 Crypto related helpers for Swift.
 
-Requirements
-============
+##Requirements
 For now CryptoSwift depends on OpenSSL
 
-Usage
-=====
 
-Use cocoapods, add this to Podfile
+##Usage
+
+	import CryptoSwift
+
+    var data:NSData = NSData(bytes: [49, 50, 51] as Byte[], length: 3)
+    let md5:NSData = CryptoHash.md5.hash(data)
+    
+	// Printout MD5 as String
+    NSLog(md5.toHexString())
+
+####Cocoapods
+
+*Caution*: Podspec support for Swift is not yet ready, however some fixes has been made see: https://github.com/CocoaPods/CocoaPods/pull/2222
+
+so... you need to do some manual work
+
+1. Setup Podfile
+
+```
+    platform :ios, '7.0'
+    link_with 'CryptoSwift', 'CryptoSwiftTests'
+    pod 'OpenSSL-Universal'
+```
+2. Setup binding header:
+
+Copy and header file [CryptoSwift-Bridging-Header.h](https://github.com/krzyzanowskim/CryptoSwift/blob/master/CryptoSwift-Bridging-Header.h) to you project and setup `Objective-C Bridging Header` in `Builds Settings` of you project with name of this header file.
+
+Done.
 
-`pod 'CryptoSwift', :git => 'https://github.com/krzyzanowskim/CryptoSwift.git', :branch => :master`