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

Deploy Flutter AppStore with libusb (M1) #70

Open
AlphaBlend1975 opened this issue Jan 14, 2023 · 1 comment
Open

Deploy Flutter AppStore with libusb (M1) #70

AlphaBlend1975 opened this issue Jan 14, 2023 · 1 comment

Comments

@AlphaBlend1975
Copy link

Error (no such file)

Library not loaded: /opt/homebrew/opt/libusb/lib/libusb-1.0.0.dylib
Referenced from: <08E9B59C-29B6-32C6-B2D8-DCD81153FE85> /Volumes/Data/Projects/SWTH/qipos/build/macos/Build/Products/Debug/QiPOS Anywhere.app/Contents/MacOS/QiPOS Anywhere
Reason: tried: '/opt/homebrew/opt/libusb/lib/libusb-1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libusb/lib/libusb-1.0.0.dylib' (no such file), '/opt/homebrew/opt/libusb/lib/libusb-1.0.0.dylib' (no such file), '/usr/local/lib/libusb-1.0.0.dylib' (no such file), '/usr/lib/libusb-1.0.0.dylib' (no such file, not in dyld cache)

But solved by user already install or pre install lib before (brew install libusb)

How to add install lib or included lib with deployment in flutter app?
Apple store support can not install libusb outsite store for approve flutter app..

@Bikram40
Copy link

I have faced the same problem but I fixed it by removing
s.vendored_libraries = 'libusb-1.0.23.dylib', 'libusb-1.0.23-m1.dylib'
this line from macos/quick_usb.podspec here and manually add the lib with following
https://docs.flutter.dev/platform-integration/macos/c-interop
this guideline, and if you are publishing for intel too, check that libusb-1.0.0.dylib library supports intel or not or you can modify code like this
QuickUsbMacos() { if(Platform.version.contains('arm64')) { _libusb = Libusb(DynamicLibrary.open('libusb-1.0.23-m1.dylib')); } else { _libusb = Libusb(DynamicLibrary.open('libusb-1.0.23.dylib')); } }
in lib/src/quick_usb_desktop.dart this file

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

2 participants