Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invariant Violation: requireNativeComponent: "RNRectangleScanner" was not found in the UIManager. #114

Open
PremangiM opened this issue Jan 19, 2024 · 2 comments

Comments

@PremangiM
Copy link

Working proper in Android. Getting error for the iOS.

"react-native": "0.71.10",
"react": "18.2.0",
"react-native-rectangle-scanner": "^1.0.10",

@ismail-medhat
Copy link

this issue appear with me after upgrade RN version from 0.66.1 to 0.73.2

@tylerforsythe
Copy link

tylerforsythe commented May 3, 2024

For future searchers, the answer is to copy the RNRectangleScanner.podspec file from /node_modules/react-native-rectangle-scanner/ios up one directory to /node_modules/react-native-rectangle-scanner/. Then edit it so that it looks something like below. Note that line 3 the package.json changed from ../package.json. And line 19 the s.source_files value is different.

require 'json'

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

Pod::Spec.new do |s|
  s.name           = 'RNRectangleScanner'
  s.version        = package['version']
  s.summary        = package['description']
  s.description    = package['description']
  s.license        = package['license']
  s.author         = package['author']
  s.homepage       = 'https://github.com/HarvestProfit/react-native-rectangle-scanner'
  s.source         = { git: 'https://github.com/HarvestProfit/react-native-rectangle-scanner.git', tag: s.version }

  s.requires_arc   = true
  s.platform       = :ios, '10.0'

  s.preserve_paths = 'README.md', 'package.json', 'index.js'
  s.source_files   = 'ios/**/*.{h,m}'

  s.dependency 'React'
end

Screenshot 2024-05-03 at 2 45 01 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants