eddieowens / react-native-boundary

Native implementation of geofencing/region monitoring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Native Module cannot be null on ( "react-native": "0.60.5")

TusharAswal opened this issue · comments

Screen Shot 2019-09-07 at 12 56 38 PM
Works fine on android but as soon as I open it on IOS I get this error.

Same here

This problem can be fixed by setting a correct .podspec configuration. You can use the example below as a reference

require 'json'

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

Pod::Spec.new do |s|
  s.name         = "RNBoundary"
  s.version      = package['version']
  s.summary      = package['description']
  s.license      = package['license']

  s.authors      = package['author']
  s.homepage     = "https://github.com/mikhailperemitko/react-native-boundary#readme"
  s.platform     = :ios, "9.0"

  s.source       = { :git => "https://github.com/eddieowens/react-native-boundary.git", :tag => "#{s.version}" }
  s.source_files  = "*.{h,m}"
  s.requires_arc = true

  s.dependency 'React'
end

require 'json'

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

Pod::Spec.new do |s|
s.name = "RNBoundary"
s.version = package['version']
s.summary = package['description']
s.license = package['license']

s.authors = package['author']
s.homepage = "https://github.com/mikhailperemitko/react-native-boundary#readme"
s.platform = :ios, "9.0"

s.source = { :git => "https://github.com/eddieowens/react-native-boundary.git", :tag => "#{s.version}" }
s.source_files = "*.{h,m}"
s.requires_arc = true

s.dependency 'React'
end

This worked for me

@abhilashfancy Hi Abhilash,
I have mailed you regarding one clarification. can you please check and help me with that?

@abhilashfancy Hi Abhilash,
I have mailed you regarding one clarification. can you please check and help me with that?

ok

I used the following command.
watchman watch-del-all, and react-native start --reset-cache
This worked for me

Any other ideas what to change in podspec file? I have tried everything above and still get the error:

No podspec found for `RNBoundary` in `../node_modules/react-native-boundary`

I can see the file there

Somehow I figured it out by looking at other projects. The podspec file was inside the ios file and so the link is wrong:

pod 'RNBoundary', :path => '../node_modules/react-native-boundary'

should be:

pod 'RNBoundary', :path => '../node_modules/react-native-boundary/ios'

Hope this helps other people