Skip to content

Commit

Permalink
ios: add podspec file
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed May 8, 2017
1 parent b08eddb commit eb8680c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Documentation/iOSInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@

![Picture 4](https://github.com/oney/react-native-webrtc/blob/master/Documentation/doc_install_xcode_file_structure.png)

## iOS Podfile

You can use the included podspec in your podfile to take care of all dependencies instead of manually adding files to the project (instead of steps 2 through 5, but you might still have to do step 6 above).

Include in a Podfile in your react-native ios directory:

```
pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
```

## 2. Add Library Search Path

Expand Down
23 changes: 23 additions & 0 deletions react-native-webrtc.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require 'json'

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

Pod::Spec.new do |s|
s.name = package['name']
s.version = package['version']
s.summary = package['description']
s.homepage = 'https://github.com/oney/react-native-webrtc'
s.license = package['license']
s.author = 'https://github.com/oney/react-native-webrtc/graphs/contributors'
s.source = { :git => 'git@github.com:oney/react-native-webrtc.git', :tag => 'release #{s.version}' }
s.requires_arc = true

s.platform = :ios, '9.0'

s.preserve_paths = 'ios/**/*'
s.source_files = 'ios/**/*.{h,m}'
s.libraries = 'c', 'sqlite3', 'stdc++'
s.framework = 'AudioToolbox','AVFoundation', 'CoreAudio', 'CoreGraphics', 'CoreVideo', 'GLKit', 'VideoToolbox'
s.ios.vendored_frameworks = 'ios/WebRTC.framework'
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework WebRTC' }
end

0 comments on commit eb8680c

Please sign in to comment.