This library was easy to install and use, but I noticed that I got a warning that I needed to use Rosetta in order to be compatible with other libraries.
Additionally, I noticed there was a slow down in the app when using Rosetta in the Simulator, which makes some sense. I traced the issue back to Google's MLKit Podspec, which is excluding arm64 simulator builds, which means Xcode is forced to use x386 and then use Rosetta for the other libraries.
Since the MLKit Cocoapod would obviously have arm64 support, you can force Cocoapods to not switch the architecture like so:
post_install do |installer|
# put this at the end of this block
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
This worked - the app built for the simulator without forcing me to use Rosetta. However, the performance degradation still persisted. An example of this is that the frame rate is seriously slow on a table when scrolling.
The production build does not appear to have this problem, or at least it is far less so. I'm not sure how to explain this!
What happened?
This library was easy to install and use, but I noticed that I got a warning that I needed to use Rosetta in order to be compatible with other libraries.
Additionally, I noticed there was a slow down in the app when using Rosetta in the Simulator, which makes some sense. I traced the issue back to Google's MLKit Podspec, which is excluding arm64 simulator builds, which means Xcode is forced to use x386 and then use Rosetta for the other libraries.
https://github.com/CocoaPods/Specs/blob/master/Specs/b/e/b/GoogleMLKit/4.0.0/GoogleMLKit.podspec.json#L18
Since the MLKit Cocoapod would obviously have arm64 support, you can force Cocoapods to not switch the architecture like so:
This worked - the app built for the simulator without forcing me to use Rosetta. However, the performance degradation still persisted. An example of this is that the frame rate is seriously slow on a table when scrolling.
The production build does not appear to have this problem, or at least it is far less so. I'm not sure how to explain this!
Version
latest
Which ML Kit packages do you use?
What platforms are you seeing this issue on?
System Information
Steps to Reproduce
Explained above.