barcode_scan2 icon indicating copy to clipboard operation
barcode_scan2 copied to clipboard

Module 'barcode_scan2' not found iOS

Open s2yed opened this issue 3 years ago • 9 comments

#import <barcode_scan2/BarcodeScanPlugin.h> #else @import barcode_scan2; #endif

s2yed avatar Jun 22 '21 13:06 s2yed

/Volumes/files/projecFlutter/ezee_click_report/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'barcode_scan2' not found @import barcode_scan2; ~~~~~~~^~~~~~~~~~~~~ 1 error generated. /Volumes/files/projecFlutter/ezee_click_report/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'barcode_scan2' not found @import barcode_scan2; ~~~~~~~^~~~~~~~~~~~~

s2yed avatar Jun 22 '21 15:06 s2yed

I found this error too.

hirunsr avatar Jun 25 '21 08:06 hirunsr

I also ran into this error, was anyone able to resolve it?

mbokinala avatar Jul 14 '21 19:07 mbokinala

+1, Any updates?

hhstore avatar Aug 06 '21 11:08 hhstore

  • this is not a bug.
  • just xcode's shit.
  • ref: https://github.com/flutter/flutter/issues/18305
  • I have tested the following 2 solutions, both working fine.

solution1:

  • use xcode, open ios/Runner.xcworkspace # not Runner.xcodeproj
  • check this file: contents.xcworkspacedata, if miss group:Pods/Pods.xcodeproj, add it.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "group:Runner.xcodeproj">
   </FileRef>
   <FileRef
      location = "group:Pods/Pods.xcodeproj">
   </FileRef>
</Workspace>

image

solution2:

open ios/Runner.xcodeproj

I checked Runner/Pods is empty in Xcode sidebar.

drop Pods/Pods.xcodeproj into Runner/Pods.

"Valid architectures" to only "arm64" (I removed armv7 armv7s)

  • shit here:

image

@mbokinala @hirunsr

hhstore avatar Aug 07 '21 05:08 hhstore

solution1:

  • use xcode, open ios/Runner.xcworkspace # not Runner.xcodeproj
  • check this file: contents.xcworkspacedata, if miss group:Pods/Pods.xcodeproj, add it.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "group:Runner.xcodeproj">
   </FileRef>
   <FileRef
      location = "group:Pods/Pods.xcodeproj">
   </FileRef>
</Workspace>

image

solution2:

open ios/Runner.xcodeproj

I checked Runner/Pods is empty in Xcode sidebar.

drop Pods/Pods.xcodeproj into Runner/Pods.

"Valid architectures" to only "arm64" (I removed armv7 armv7s)
  • shit here:

image

@mbokinala @hirunsr

I tried your two solutions, but the error still occurs

LeNgocHiep avatar Mar 21 '22 11:03 LeNgocHiep

I also received the "Module 'barcode_scan2' not found"

Change your app's deployment target to 11.0 because latest barcode scanner's deployment target is 11.0

zumrywahid avatar Jul 12 '22 07:07 zumrywahid

I have been this problembefore, In my case the rosetta is not compatible(wrong version) to my apple silicon(M1). So i am uninstall the Wrong Rosetta, and after that reinstall again using the proper version.

threeyulianto333 avatar Sep 21 '22 04:09 threeyulianto333

I also received the "Module 'barcode_scan2' not found"

Change your app's deployment target to 11.0 because latest barcode scanner's deployment target is 11.0

This works for me thank you

DanielCamSan avatar Nov 08 '23 14:11 DanielCamSan