eddieowens / react-native-boundary

Native implementation of geofencing/region monitoring
Apache License 2.0
121 stars 72 forks source link

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

Open TusharAswal opened 5 years ago

TusharAswal commented 5 years ago

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.

gusilveiramp commented 4 years ago

Same here

mykhailoperemitko commented 4 years ago

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
abhilash-behera commented 4 years ago

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

rahulmr-rently commented 4 years ago

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

abhilash-behera commented 4 years ago

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

ok

woojong92 commented 4 years ago

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

Sbphillips19 commented 4 years ago

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

Sbphillips19 commented 4 years ago

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