Currently, we are trying to run a Swift project that works well with IntelMac on the M1 Mac.
The M1mac can also go through the build in Release mode, but in Debug mode, FirebaseClasylitics cannot import and the error 'FirebaseCrashlytics' occurs.
When deploying FirebaseClashLitics, we migrated from Fabric, so we used the official this article.
I also found out that when I re-build after commenting out import FirebaseClashlitics, the next line in the import Alamofire file is No such module Alamofire, and if I continue commenting out like this, the name of the No such module module module in other libraries.
We also found that the predictive transformation does not display anything other than the default UIkit or Foundation after import.
I didn't know the fundamental solution, so I took the following action.
rm-rf to /Library/Developer/Xcode/DerivedData/*
$rm-rf to /Library/Caches/CocoaPods/
$ rm-rf Pods
$ pod install
pod deintegrate
pod install
I tried all these common solutions, but the No such module 'module' didn't go away.
In order to resolve the above, articles such as 8 and 9 above appeared after searching for the following keywords.
·swift no such module
I don't want to change the existing code as much as possible because it works fine in the Intelmac and M1 release modes.
If you have any advice on how to resolve this issue, please let me know.
environment
MacBook Air Mid 2013 Intel, 8GB
Catalina
Xcode 12.4
MacBook Air (M1,2020) M1,16GB
BigSur
Xcode 12.5
#Uncomment the next line to define a global platform for your project
# platform:ios, '9.0'
target'App'do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for App
pod 'Alamofire', '~>4.7'
pod 'RealmSwift', '~>3.21'
pod 'DeployGateSDK'
pod 'ZXingObjC', '~>3.2.2'
pod 'Firebase/Core'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Analysis'
pod 'Firebase/Crashlytics'
pod 'SwiftFormat/CLI'
post_install do | installer |
installer.pods_project.targets.each do | target |
target.build_configurations.each do | config |
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]] = 'arm64' if target.name.include?('Realm')
end
end
end
target 'AppTests' do
inherit!:search_paths
# Pods for testing
end
target 'AppUITests' do
inherit!:search_paths
# Pods for testing
end
end
Based on the following article, it worked when I changed the podfile setting to exclude not only realm but also from arm64 for each project of the main body during simulator build.
[XCode, M1]no such module in simulator
Also, this article was very helpful.
What to do if Xcode12 fails to build for the simulator
573 Understanding How to Configure Google API Key
891 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
601 GDB gets version error when attempting to debug with the Presense SDK (IDE)
611 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.