mobile_scanner
mobile_scanner copied to clipboard
[IOS]: Pods/MLImage/Frameworks/MLImage.framework/MLImage' for architecture arm64
when i start building ios project I get an error:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/rn/r4vcnfnn7zj7gwx5w7fbgldh0000gn/T/flutter_tools.K8VYGY/flutter_ios_build_temp_diroPUaJI/temporary_xcresult_bundle
ld: warning: ignoring file /Users/mac/WebstormProjects/srs/build/ios/Debug-iphonesimulator/Pods_Runner.framework/Pods_Runner, building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64
ld: in /Users/mac/WebstormProjects/srs/ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/mac/WebstormProjects/srs/ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Building targets in dependency order
note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
Result bundle written to path:
/var/folders/rn/r4vcnfnn7zj7gwx5w7fbgldh0000gn/T/flutter_tools.K8VYGY/flutter_ios_build_temp_diroPUaJI/temporary_xcresult_bundle
Error (Xcode): In /Users/mac/WebstormProjects/srs/ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/mac/WebstormProjects/srs/ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage' for architecture arm64
Could not build the application for the simulator.
Error launching application on iPhone 14.
I tried changing the Excluded Architectures to arm64
the project is being built, but I noticed that after it was built, the simulator slows down very seriously, just the usual scroll lags how can i fix this ? what could be the problem with this ?
but when I uploaded it to the testflight and downloaded and checked there are no lags, does it mean that something is wrong with my laptop?
EDITED:
i tried to create a new flutter app which just builds a list no extra loads
![Screenshot 2023-04-11 at 18 41 06](https://user-images.githubusercontent.com/44497623/231165260-0b381f7d-fc0d-4652-8bf7-2c021fd2117e.png)
the same thing, it works slowly, it lags when I try to scroll, as I understand it, this is not related to the library mobile_scanner
but why it throws error when i try to run my app without Excluded Architectures to arm64
Deleting pods or flutter clean doesn't change anything
I'm having this same issue, please has a fix been found ? changed mine from armv7 to arm64 and it still threw that error
@theDeji aggressively trying to understand the problem 😅
😂 😂 😂 I really do need it fixed
I try run my app using rosseta but my application broke too.
@lucasvini382 hey did you try to put arm64 in Excluded Architectures ?
Yes @songhee24 i make this
If I exclude arm64, then the app does not run at all... I guess it is because I am using an ARM based macOS
Anyone found workaround for this?
I figured out that I need to install Rosetta 2.
This is Known issues for GoogleMlkit.
Did somebody figure out how to temporarily remove/disable Google/MLKit
to allow developing with simulators for features where mobile_scanner
will not be used?
XCode 15 + Sonoma + latest flutter (3.13.6) + default excluded architectures in xcode = simulator working for me on M1 mac
@mrRedSun would you mind to share a screenshot of the mentioned xCode Build Settings? Thanks!
@rdesimone sure thing
Thanks a lot, I removed i386
and now it works!
So the workaround is to remove i386 and the issue disappears. No sure if we can close the ticket yet, but nice to know
it was the only difference I could see between yours and my settings.
I have the same issue, when introducing mobile scanner package, my App is very slow in iOS simulator...
Hi all,
I am working on a completely separate project with XCode but have found a workaround for getting this working on simulators on Apple Silicon Macs. You need to run the project built for x86_64 for simulator builds, and then run the simulator in Rosetta. Until Google fix the known issue linked by @themon303 there is no getting around this.
-
Set up the architecture for your project (not the individual target!), and the Pods project (not a target!) to replicate the following:
Of importance:
Any iOS Simulator SDK
should be set to x86_64 and on debug you should enableBuild Active Architecture Only
. Also note I am not excluding any architectures, Apple themselves do not recommend doing this unless absolutely necessary. -
Check that the Pods config file is not intefering and adding an excluded architecture by lookind under
Pods
->Targets Support Files
->Pods-[PROJECTNAME]
->Pods-[PROJECTNAME].debug.xcconfig
-
Unhide Rosetta by going to
Product
->Destination
->Destination Architectures
->Show Both
-
Select a Rosetta Simulator (e.g.
iPhone 15 Pro (Rosetta)
), and run! (might be advisable to clean the build folder prior to running but it should work regardless).
Good luck!
FYI, here is the open issue link of Google issue: issuetracker.google.com/issues/17896515