美文网首页
【问题随手记】cocoapods配置ARCHS为arm64e导致

【问题随手记】cocoapods配置ARCHS为arm64e导致

作者: name007 | 来源:发表于2021-03-24 17:34 被阅读0次

    当通过cocoapods引入FirebaseAnalytics时,有一台开发机始终报错,找不到 framework not found FirebaseAnalytics,但是在其他机器上可以正常运行。最终定位在 podfile 文件里边有

    inhibit_all_warnings!
    
    install! 'cocoapods',
             disable_input_output_paths: true,
             generate_multiple_pod_projects: false
    
    #关闭Pods中dYSM文件生成,去除arm7与arm7s的符号表生成
    post_install do |installer|
        installer.pods_project.targets.each do |target|
            #puts target #debug vars
            target.build_configurations.each do |config|
                config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
                config.build_settings['ARCHS'] = 'arm64 arm64e'
            end
        end
    end
    

    这里边有

    config.build_settings['ARCHS'] = 'arm64 arm64e'
    
    

    去除 arm64e 后编译成功。

    FirebaseAnalytics.xcframework 是静态库 xcframework 形式提供的。

    file /Users/xxx/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.xcframework/ios-arm64_armv7/FirebaseAnalytics.framework/FirebaseAnalytics
    /Users/xxx/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.xcframework/ios-arm64_armv7/FirebaseAnalytics.framework/FirebaseAnalytics: Mach-O universal binary with 2 architectures: [arm_v7:current ar archive] [arm64:current ar archive]
    /Users/xxx/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.xcframework/ios-arm64_armv7/FirebaseAnalytics.framework/FirebaseAnalytics (for architecture armv7):  current ar archive
    /Users/xxx/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.xcframework/ios-arm64_armv7/FirebaseAnalytics.framework/FirebaseAnalytics (for architecture arm64):  current ar archive
    

    相关文章

      网友评论

          本文标题:【问题随手记】cocoapods配置ARCHS为arm64e导致

          本文链接:https://www.haomeiwen.com/subject/usmhhltx.html