I am creating react native library utilizing react native bob builder for scanning pictures utilizing Google Equipment.
I added pod dependency pod 'GoogleMLKit/BarcodeScanning'
within the .pod
file,
# Resolve react_native_pods.rb with node to permit for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
# In case you are utilizing a `react-native-flipper` your iOS construct will fail when `NO_FLIPPER=1` is ready.
# as a result of `react-native-flipper` relies on (FlipperKit,...) that can be excluded
#
# To repair this you may also exclude `react-native-flipper` utilizing a `react-native.config.js`
# ```js
# module.exports = {
# dependencies: {
# ...(course of.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.places "Configuring Pod with #{linkage}ally linked Frameworks".inexperienced
use_frameworks! :linkage => linkage.to_sym
finish
goal 'IosScannerExample' do
config = use_native_modules!
# Flags change relying on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
#:hermes_enabled => flags[:hermes_enabled],
#:fabric_enabled => flags[:fabric_enabled],
:hermes_enabled => false,
:fabric_enabled => false,
# Allows Flipper.
#
# Observe that when you have use_frameworks! enabled, Flipper is not going to work and
# it is best to disable the following line.
:flipper_configuration => flipper_config,
# An absolute path to your software root.
:app_path => "#{Pod::Config.occasion.installation_root}/.."
)
pod 'GoogleMLKit/BarcodeScanning'
goal 'ScannerExampleTests' do
inherit! :full
# Pods for testing
finish
post_install do |installer|
# https://github.com/fb/react-native/blob/important/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
finish
finish
All google library dependency put in correctly in my code.
Now I importing MLKit framework including in my class,
#import "ScannerViewController.h"
#import <AVFoundation/AVFoundation.h>
#import <CoreVideo/CoreVideo.h>
#import <GoogleMLKit/MLKit.h>
@interface ScannerViewController ()
@finish
When i attempting to construct my software I getting compliler error from MKKit.h file as under,
I attempted to examine all factor required of binding lib’s in XCode settings, all settings are right. Nonetheless i am not capable of finding out why this error coming from pod framework regardless of that MLKitCommon
framework contained in the pod.