From 95ae7b5c81dab0d8b0e9c2f0136cc5fe5756b3a9 Mon Sep 17 00:00:00 2001 From: Andy Hiew Date: Fri, 1 Dec 2017 15:47:39 -0700 Subject: [PATCH] Support CocoaPods --- README.md | 8 ++++++++ TcpSockets.podspec | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 TcpSockets.podspec diff --git a/README.md b/README.md index abf8200..15e771d 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,14 @@ __Note for iOS:__ If your react-native version < 0.40 install with this tag inst ``` npm install react-native-tcp@3.1.0 --save ``` +## if using Cocoapods + +Update the following line with your path to `node_modules/` and add it to your +podfile: + +```ruby +pod 'TcpSockets', :path => '../node_modules/react-native-tcp' +``` ## Link in the native dependency diff --git a/TcpSockets.podspec b/TcpSockets.podspec new file mode 100644 index 0000000..43ce35d --- /dev/null +++ b/TcpSockets.podspec @@ -0,0 +1,23 @@ +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) + +Pod::Spec.new do |s| + + s.name = 'TcpSockets' + s.version = package['version'] + s.summary = package['description'] + s.homepage = package['repository']['url'] + s.license = package['license'] + s.author = package['author'] + s.source = { :git => s.homepage, :tag => 'v#{s.version}' } + + s.requires_arc = true + s.ios.deployment_target = '8.0' + s.tvos.deployment_target = '9.0' + + s.preserve_paths = 'README.md', 'package.json', '**/*.js' + s.source_files = 'ios/**/*.{h,m}' + s.dependency 'React' + +end