Skip to content

Commit f1ce5db

Browse files
authored
Merge pull request #11 from awaseem/master
added pod spec for CocoaPods support
2 parents 4d4cdc3 + 955e193 commit f1ce5db

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ yarn add react-native-sha256
1111
react-native link
1212
```
1313

14+
## Adding with CocoaPods
15+
16+
Add the RNSha256 pod to your list of application pods in your Podfile, using the path from the Podfile to the installed module:
17+
18+
```
19+
pod 'RNSha256', :path => '../node_modules/react-native-sha256'
20+
```
21+
22+
Install pods as usual:
23+
```
24+
pod install
25+
```
26+
1427
# Usage
1528

1629
Import the lib into your project:

RNSha256.podspec

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
require "json"
2+
3+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4+
5+
Pod::Spec.new do |s|
6+
s.name = 'RNSha256'
7+
s.version = package["version"]
8+
s.summary = package["description"]
9+
s.author = package["author"]
10+
11+
s.homepage = package["homepage"]
12+
13+
s.license = package["license"]
14+
s.platform = :ios, "8.0"
15+
16+
s.source = { :git => "https://github.com/itinance/react-native-sha256.git", :tag => "#{s.version}" }
17+
s.source_files = "ios/**/*.{h,m,swift}"
18+
s.preserve_paths = "**/*.js"
19+
20+
s.dependency 'React'
21+
end

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"flow": "flow; test $? -eq 0 -o $? -eq 2"
99
},
10+
"homepage": "https://github.com/itinance/react-native-sha256",
1011
"repository": {
1112
"type": "git",
1213
"url": "git@github.com:itinance/react-native-sha256.git"

0 commit comments

Comments
 (0)