react-native-gallery-manager
react-native-gallery-manager copied to clipboard
request: Create a CocoaPod
I have a rather unusual react-native project, and it would be great if there was a pod for this.
what do you mean?
Similar to how other libraries do it ( for example react-native-video: https://github.com/react-native-community/react-native-video/blob/master/react-native-video.podspec)
I need to include my react native app as part of a larger ios app so I'm following these directions: https://facebook.github.io/react-native/docs/integration-with-existing-apps.html
And you'll notice way down the page there is a podfile that is used to import and link external dependencies. I'd like to add the Gallery Manager to my podfile. Something like:
pod 'RNGalleryManager', :podspec => './node_modules/react-native-gallery-manager/react-native-gallery-manager.podspec'
This worked for me though I think you'll have to change the path to node_modules if you include it in your npm packaged version
`require 'json'
pjson = JSON.parse(File.read("./node_modules/react-native-gallery-manager/package.json"))
Pod::Spec.new do |s|
s.name = "RNGalleryManager" s.version = pjson["version"] s.homepage = "https://github.com/VideoSlick/react-native-gallery-manager" s.summary = pjson["description"] s.license = "MIT" s.author = { "Hristo Hristov" => "[email protected]" }
s.ios.deployment_target = '7.0'
s.source = { :git => "https://github.com/VideoSlick/react-native-gallery-manager.git", :tag => "v#{s.version}" } s.source_files = 'ios/*.{h,m}' s.dependency "React" end `
Note that I've forked your repo and created a tag. That's not actually necessary - if you leave that off it just checks out the master branch.
Hello Team @vs-lance @pentarex this solution its worked for me, but please update version in NPM We need a file react-native-gallery-manager.podspec
Close this issue ;)