alwx / react-native-photo-view

Pinch-to-zoom view for React Native (both iOS and Android)
MIT License
816 stars 435 forks source link

Cocoapods integration #107

Open danieljvdm opened 6 years ago

danieljvdm commented 6 years ago

Could you please include a podspec so that we can use cocoapods with this library? Thanks!

danieljvdm commented 6 years ago

It would probably look something like this:

require "json"

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

Pod::Spec.new do |s|

  s.name           = "react-native-photo-view"
  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/alwx/react-native-photo-view.git', :tag => "v#{s.version}"}
  s.platform       = :ios, '7.0'
  s.source_files  = "ios/*.{h,m}"
  s.dependency "React"

end
danieljvdm commented 6 years ago

As a temporary fix: https://github.com/alwx/react-native-photo-view/pull/111

JensDebergh commented 6 years ago

Temporary fix works fine for standard react-native projects but will fail if you go off the beaten path like we are doing at the company.

Adding a cocoapod file is a must in our case. Did a quick pull request and hope to get it merged:

Fix with cocoapods: https://github.com/alwx/react-native-photo-view/pull/143