mono0926 / barcode_scan2

[reborned barcode_scan] A flutter plugin for reading 2D barcodes and QR codes.
https://pub.dev/packages/barcode_scan2
MIT License
86 stars 75 forks source link

Module 'barcode_scan2' not found iOS #20

Open s2yed opened 3 years ago

s2yed commented 3 years ago

import <barcode_scan2/BarcodeScanPlugin.h>

else

@import barcode_scan2;

endif

s2yed commented 3 years ago

/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;
     ~~~~~~~^~~~~~~~~~~~~
hirunsr commented 3 years ago

I found this error too.

mbokinala commented 3 years ago

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

hhstore commented 3 years ago

+1, Any updates?

hhstore commented 3 years ago

solution1:

<?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)

image

@mbokinala @hirunsr

LeNgocHiep commented 2 years ago

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

zumrywahid commented 2 years ago

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

threeyulianto333 commented 1 year ago

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.

DanielCamSan commented 10 months ago

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

jacopobonomi commented 1 week ago

Same problem here in xcode cloud