diff --git a/Picker.podspec b/Picker.podspec new file mode 100644 index 0000000000000000000000000000000000000000..b84e2cbfde3226090bad6c0d48ebc2b735de7d09 --- /dev/null +++ b/Picker.podspec @@ -0,0 +1,24 @@ +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) + +Pod::Spec.new do |s| + + s.name = 'Picker' + 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/beefe/react-native-picker.git', :tag => "v#{s.version}"} + s.platform = :ios, '7.0' + s.preserve_paths = '*.js' + + s.dependency 'React' + + s.subspec 'Core' do |ss| + ss.source_files = 'ios/RCTBEEPickerManager/*.{h,m}' + ss.public_header_files = ['ios/RCTBEEPickerManager/*.h'] + end + +end diff --git a/README.md b/README.md index f58648cb7590eff78679258327aae63593bc8fe2..392c437f52ceb0b30b173b9213a7ecb53c83320f 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,23 @@ ``` +### Integration With Existing Apps (`iOS`) +The `Podfile` will like below: +``` ruby +platform :ios, '8.0' +target 'YourTarget' do + pod 'React', :path => '../YOUR_REACT_NATIVE_PROJECT/node_modules/react-native', :subspecs => [ + 'Core', + ... + ] + pod 'Picker', :path => '../YOUR_REACT_NATIVE_PROJECT/node_modules/react-native-picker' +end +``` +After you have updated the `Podfile` of the existing app, you can install `react-native-picker` like below: +``` bash +$ pod install +``` + ### Notice #### support two modes: