Xcode 13 编译报错记录

操作:pod 'SnapKit'

报错信息

ld: warning: ignoring file /***/***-gazqolzazirkumftlacggevdtxch/Build/Products/Debug-
iphonesimulator/SnapKit/SnapKit.framework/SnapKit, 
building for iOS Simulator-x86_64 but attempting to link with file built for iOS Simulator-arm64

解决:Podfile 文件末尾添加

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            # Needed for building for simulator on M1 Macs
            config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
        end
    end
end

你可能感兴趣的:(Xcode 13 编译报错记录)