yushulx / flutter_barcode_sdk

Build barcode QR detection apps for Windows, Linux, macOS, Android, iOS and web.
https://pub.dev/packages/flutter_barcode_sdk
MIT License
47 stars 18 forks source link

i was unable to build for ios #30

Closed odejinmi closed 1 year ago

odejinmi commented 2 years ago

Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code

Error (Xcode): Building for iOS Simulator, but linking in dylib built for iOS, file '/Users/user/StudioProjects/mcdflutter/ios/Pods/DynamsoftBarcodeReader/DynamsoftBarcodeReader.framework/DynamsoftBarcodeReader' for architecture arm64

yushulx commented 2 years ago

@odejinmi DynamsoftBarcodeReader.framework does not support simulator. Have you tried iPhone or iPad?

odejinmi commented 2 years ago

@yushulx i got this error when trying to archiving for device

Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code

Error (Xcode): Undefined symbol: _OBJCCLASS$_iTextResult

Error (Xcode): Undefined symbol: _OBJCCLASS$_DynamsoftBarcodeReader

Encountered error while archiving for device.

odejinmi commented 2 years ago

@yushulx i'm having another issue wen releasing the macos version

ld: warning: ignoring file /usr/local/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_sdk-2.0.3/macos/lib/libDynamsoftBarcodeReader.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64 Undefined symbols for architecture arm64: "_OBJCCLASS$_DynamsoftBarcodeReader", referenced from: objc-class-ref in FlutterBarcodeSdkPlugin.o "_OBJCCLASS$_iTextResult", referenced from: objc-class-ref in FlutterBarcodeSdkPlugin.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

yushulx commented 2 years ago

@odejinmi the libDynamsoftBarcodeReader.dylib only supports x86_64

odejinmi commented 2 years ago

@odejinmi the libDynamsoftBarcodeReader.dylib only supports x86_64

Wot will I do to be able to build the project

yushulx commented 2 years ago

@odejinmi can you build it with x86_64 arch and run the app with rosetta?

yushulx commented 2 years ago

@odejinmi please try the attached libDynamsoftBarcodeReader.dylib file. Mac_Arm64.zip

odejinmi commented 2 years ago

@odejinmi can you build it with x86_64 arch and run the app with rosetta?

How do I do that