Skip to content

Commit 34aef64

Browse files
authored
Merge pull request #1 from atvenu/master
Support CocoaPods
2 parents a5e396c + 95ae7b5 commit 34aef64

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ node's [net](https://nodejs.org/api/net.html) API in React Native
1111
```
1212
npm install @staltz/react-native-tcp --save
1313
```
14+
## if using Cocoapods
15+
16+
Update the following line with your path to `node_modules/` and add it to your
17+
podfile:
18+
19+
```ruby
20+
pod 'TcpSockets', :path => '../node_modules/react-native-tcp'
21+
```
1422

1523
## Link in the native dependency
1624

TcpSockets.podspec

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
require 'json'
2+
3+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4+
5+
Pod::Spec.new do |s|
6+
7+
s.name = 'TcpSockets'
8+
s.version = package['version']
9+
s.summary = package['description']
10+
s.homepage = package['repository']['url']
11+
s.license = package['license']
12+
s.author = package['author']
13+
s.source = { :git => s.homepage, :tag => 'v#{s.version}' }
14+
15+
s.requires_arc = true
16+
s.ios.deployment_target = '8.0'
17+
s.tvos.deployment_target = '9.0'
18+
19+
s.preserve_paths = 'README.md', 'package.json', '**/*.js'
20+
s.source_files = 'ios/**/*.{h,m}'
21+
s.dependency 'React'
22+
23+
end

0 commit comments

Comments
 (0)