You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

iOS x86模拟器FirebaseAnalytics出现Undefined symbols问题求助

问题描述

错误信息

Showing Recent Messages
Undefined symbol: _APMUserDataFieldEmailAddress
Showing Recent Messages
Copied /Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.xcframework/ios-arm64_i386_x86_64-simulator to Library/Developer/Xcode/DerivedData/core-hjcudorpvsjsguggeuypowcrgdts/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/FirebaseAnalytics/AdIdSupport

环境信息

  • Xcode版本:14.0.1
  • 设备:Intel架构电脑
  • Podfile内容:
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '12.0'
inhibit_all_warnings!

workspace 'xxx.xcworkspace'

target 'xxx' do
    use_frameworks!
    pod 'FirebaseAnalytics', '10.1.0'
    project './xxx/xxx.xcodeproj'
end

已尝试的无效方法

  • 清理Pods
  • 清理Derived Data
  • 使用FirebaseAnalyticsWithoutAdId
  • 清理项目后重新运行
可能的解决思路
  1. 补全Firebase依赖组件
    10.1.0版本的FirebaseAnalytics依赖基础组件支持,尝试在Podfile中显式添加相关依赖:

    pod 'FirebaseCore', '~> 10.1.0'
    pod 'FirebaseAnalytics', '10.1.0'
    

    执行pod update后重新构建项目。

  2. 调整架构配置
    在Xcode项目的Build Settings中,确认Architectures设置为Standard Architectures (arm64, x86_64);同时将Build Active Architecture Only在Debug模式设为YES,Release模式设为NO。

  3. 检查框架链接状态
    进入项目Build Phases -> Link Binary With Libraries,确认FirebaseAnalytics.xcframework已被添加,若未自动添加,手动从Pods目录中引入该框架。

  4. 降级FirebaseAnalytics版本
    尝试切换到10.0.0等稳定旧版本,修改Podfile后执行pod install:

    pod 'FirebaseAnalytics', '10.0.0'
    
  5. 升级CocoaPods版本
    确认当前CocoaPods版本与Xcode 14.0.1兼容,执行命令升级到最新稳定版:

    sudo gem install cocoapods
    

    之后依次执行pod deintegrate、pod install重新安装依赖。

  6. 禁用Bitcode
    在项目Build Settings中找到Enable Bitcode,设置为NO后重新构建。

内容的提问来源于stack exchange,提问作者Wilmer Barrios Torres

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.13 06:10:36