From 2cf1c912b2a8d705dfb56949a9266ad66b3df065 Mon Sep 17 00:00:00 2001 From: Jiri Spac Date: Mon, 5 Jun 2023 09:51:18 +0200 Subject: [PATCH] add necessary podfile workaround to readme --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eafd2fc..a65e68e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ import 'react-native-reanimated' Add this to your `babel.config.js` -``` +```js [ 'react-native-reanimated/plugin', { @@ -25,6 +25,22 @@ Add this to your `babel.config.js` ] ``` +## Ios podfile workaround + +On ios if you have `use_frameworks` in your podfile, you must use this workaround to compile your project: +```rb +pre_install do |installer| + installer.pod_targets.each do |pod| + if pod.name.eql?('vision-camera-code-scanner') || pod.name.eql?('VisionCamera') + def pod.build_type + Pod::BuildType.static_library + end + end + end +end +``` +Make sure to put this just above `use_react_native!` as advised in https://github.com/rodgomesc/vision-camera-code-scanner/issues/62#issuecomment-1272598027 + ## Usage Simply call the `useScanBarcodes()` hook or call `scanBarcodes()` inside of the `useFrameProcessor()` hook. In both cases you will need to pass an array of `BarcodeFormat` to specify the kind of barcode you want to detect.