当通过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
网友评论