Skip to content

Deploy Flutter AppStore with libusb (M1) #70

Open

Description

@AlphaBlend1975

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..

Activity

  1. Bikram40 commented on Nov 27, 2023

    @Bikram40

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions