最近入手了苹果M1芯片笔记本,使用感受就是,芯片的强大能力,但是是适配是个问题,有些库,有些软件,如果厂家没去适配,那势必会引起一起问题,还有些软件使用时候,也得用不同与Inte的方法,一下就是几个碰到的坑
关于 m1 xcode12 编译报错 this target. for architecture arm64,M1模拟器编译不通过,等问题解决方案
第1步:
Build Setting中在Excluded Architectures对模拟器添加arm64
第2步:
Podfile文件中添加以下代码,然后pod install
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"
end
end
end
第3步:
Clean工程,重新编译即可。
如果这个方法也还是编译不通过,可以试一试下面这个方法
解决方案:
1.打开访达,选择应用程序,右键打开xcode简介
选择打开ressta 即可
再重新运行项目,基本没啥问题了
macOS Big sur pod install失败
macOS Big sur系统上运行pod install命令行报错:
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
Don't forget to include the above Crash Report log file in bug reports.
命令行中执行以下命令行即可
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
原因可能是Ruby的FFI库是一个gem,用于以编程方式加载动态链接的本地库,在其中绑定函数,并从 Ruby 代码调用这些函数。(原文:Ruby-FFI is a gem for programmatically loading dynamically-linked native libraries, binding functions within them, and calling those functions from Ruby code.)
这个在我的M1芯片环境是可以使用的,如果不加前缀arch -x86_64,会失败