tony-xlh / vision-camera-dynamsoft-barcode-reader

React Native Vision Camera Frame Processor Plugin of Dynamsoft Barcode Reader
MIT License
73 stars 15 forks source link

Build fail on iOS Simulator on M1 #7

Closed Nass30 closed 9 months ago

Nass30 commented 2 years ago

Hello,

Works perfectly on Android + iOS Devices, but when building the app on iOS Simulator, the build fails.

"react-native-vision-camera": "^2.14.1",
"vision-camera-dynamsoft-barcode-reader": "^0.4.3",
"react": "18.0.0",
"react-native": "0.69.3"

Build error: building for iOS Simulator, but linking in dylib built for iOS, file '.../ios/Pods/DynamsoftBarcodeReader/DynamsoftBarcodeReader.framework/DynamsoftBarcodeReader' for architecture arm64

Tried to rm Pods, pod install, clean Xcode build, delete Derived Data, but still have the issue.

I couldn't try to build on the example app, the build fails but for other reasons

Nass30 commented 2 years ago

I did some research and found this https://developer.apple.com/forums/thread/658424 and this https://developer.apple.com/forums/thread/657913 but didn't work when changing it in the pod settings

xulihang commented 2 years ago

You can try to use a local xcframework.

You may have to download the xcframework and update the vision-camera-dynamsoft-barcode-reader.podspec file to use it.

- s.dependency 'DynamsoftBarcodeReader', '= 9.0.2'
+ s.vendored_frameworks = 'DynamsoftBarcodeReader.xcframework'

If you have further questions, please contact support@dynamsoft.com.

Nass30 commented 2 years ago

Worked on Simulator, but no more on the device.

I just updated the DynamsoftBarcodeReader pod version to 9.2.12 and it's worked on both. I just need to check if there are no breaking changes. Do you plan to update it too?

xulihang commented 2 years ago

Ok. I will update it.

xulihang commented 2 years ago

I've updated it to 9.2.

saravanaS2108 commented 2 years ago

Still facing the same issue in IOS.

ajiehatajie commented 2 years ago

same issue build in simulator with react native 0.70 but build in physical device is working

Showing All Errors Only Building for iOS Simulator, but linking in dylib built for iOS, file 'food-app/ios/Pods/DynamsoftBarcodeReader/DynamsoftBarcodeReader.framework/DynamsoftBarcodeReader' for architecture arm64

ManAnRuck commented 1 year ago

Same issue with DynamsoftBarcodeReader (9.2.12)

vision-camera-dynamsoft-barcode-reader 0.4.4 react native 0.70.4

Hopefulee commented 1 year ago

Have similar issue that i cannot do arch -x86_64 pod install for ios with M1 mac, it says (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) for me.

"react": "18.1.0",
"react-native": "0.70.6",
"react-native-vision-camera": "2.12.0"

Anyone found a solution?

xulihang commented 9 months ago

The framework should work on iOS simulator on Intel or Apple CPUs.

If it does not work, you can use the following setting:

image