diff --git a/Documentation/iOSInstallation.md b/Documentation/iOSInstallation.md index 1c4f8562f..ff7de698a 100644 --- a/Documentation/iOSInstallation.md +++ b/Documentation/iOSInstallation.md @@ -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 diff --git a/react-native-webrtc.podspec b/react-native-webrtc.podspec new file mode 100644 index 000000000..d3f97be74 --- /dev/null +++ b/react-native-webrtc.podspec @@ -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