Skip to content

Commit

Permalink
Add pods support
Browse files Browse the repository at this point in the history
  • Loading branch information
周士杰 authored and Maksym Rusynyk committed Sep 20, 2018
1 parent 12e99e4 commit 12a3530
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -32,6 +32,20 @@ Targets iOS9.0 and above
2. Under your build target general settings, add the library to your Linked Frameworks and Libraries
3. If you run into any issues, confirm that under Build Phases -> Link Binary With Libraries the library is present

##### Using CocoaPods

In your Xcode project directory open Podfile and add the following line:

```
pod 'RNPDF', :path => '../node_modules/react-native-view-pdf'
```

And install:

```
pod install
```

#### Android

1. Open up `android/app/src/main/java/[...]/MainApplication.java`
Expand Down
22 changes: 22 additions & 0 deletions RNPDF.podspec
@@ -0,0 +1,22 @@
require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|

s.name = 'RNPDF'
s.version = package['version'].gsub(/v|-beta/, '')
s.summary = package['description']
s.author = package['author']
s.license = package['license']
s.homepage = package['homepage']
s.source = { :git => 'https://github.com/rumax/react-native-PDFView.git', :tag => "v#{s.version}"}
s.platform = :ios, '7.0'
s.preserve_paths = '*.js'

s.dependency 'React'

s.source_files = 'ReactNativeViewPDF/*.{h,m}'
s.public_header_files = ['ReactNativeViewPDF/*.h']

end

0 comments on commit 12a3530

Please sign in to comment.