Driversnote-Dev / react-native-kontaktio

React Native (iOS and Android) library for Kontakt.io beacons (and all other beacons)
MIT License
112 stars 48 forks source link

Support cocoapods #42

Closed jdegger closed 5 years ago

jdegger commented 5 years ago

I now had to manually edit the Podspec to this:

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

Pod::Spec.new do |s|
  s.name         = "KontaktBeacons"
  s.version      = package['version']
  s.summary      = "KontaktBeacons"
  s.description  = <<-DESC
                   Cross-platform React Native module for detecting beacons with Android and iOS devices.
                   DESC
  s.homepage     = ""
  s.license      = "MIT"
  s.homepage      = "https://github.com/Artirigo/react-native-kontaktio"
  s.author             = { "author" => "author@domain.cn" }
  s.platform     = :ios, "7.0"
  s.source       = { :git => "https://github.com/Artirigo/react-native-kontaktio.git", :tag => "master" }
  s.source_files  = "ios/**/*.{h,m}"
  s.requires_arc = true

  s.dependency "React"

end

This seems to work, would be great if this could be added to the repo and the pod link script would integrate cocoapods support as well.

andrekovac commented 5 years ago

Thanks for that work! I'm not an expert as far as pods are concerned and thus would be very happy about a PR!

jdegger commented 5 years ago

There were some fields I left to the defaults (homepage, author) etc. Could you specify those? I would happily create an PR then

andrekovac commented 5 years ago

s.homepage is duplicated. You can remove the empty one.

As author you can add s.author = { "Andre Kovac" => "me@andrekovac.com" }

The rest looks fine to I'd say. Thanks again for your efforts!

andrekovac commented 5 years ago

Issues should now be solved with the new release

izaa commented 4 years ago

@jdegger how did you install using cocoapods? I have added

pod 'KontaktBeacons', path: '../node_modules/react-native-kontaktio/ios'

to Podfile but I cannot see KontaktBeacons in Pods directory and not in NativeModules. Any help thanks? :)

AleksandrZhukov commented 4 years ago

got the same issue