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

升级Xcode后iOS项目提示leveldb framework not found问题求助

Fixes for "ld: framework not found leveldb" Error After Xcode Upgrade (Firebase Project)

Hey, I’ve dealt with this exact linker error after upgrading Xcode for a large Firebase-integrated project—here are the steps that got my app running again:

  • Update Firebase Pods to Match Xcode Version
    Older Firebase versions might have compatibility issues with the latest Xcode. Open your terminal, navigate to your project folder, and run:

    pod update Firebase
    

    This pulls in the latest Firebase builds that properly resolve the leveldb dependency for your new Xcode environment.

  • Wipe Cached Build Data
    Xcode’s cached files are often the culprit after upgrades. Do a full clean:

    1. Use Shift + Command + K to clean the build folder.
    2. Delete Derived Data: Go to Xcode > Settings > Locations, click the arrow next to the Derived Data path, and delete your project’s folder there.
    3. Restart Xcode and try building again.
  • Fix Framework Search Paths
    Sometimes the path to leveldb (included via Firebase pods) gets corrupted. Check your project settings:

    1. Select your project in the Project Navigator, go to the Build Settings tab.
    2. Search for Framework Search Paths.
    3. Add $(PROJECT_DIR)/Pods/leveldb-library as a recursive path if it’s missing. This tells Xcode where to find the leveldb framework.
  • Validate Your Podfile Configuration
    Leveldb is a transitive dependency of Firebase Firestore, so make sure you’re including the necessary subspecs in your Podfile. For example:

    pod 'Firebase/Firestore'
    # Or include all the Firebase services you use
    pod 'Firebase/Core'
    pod 'Firebase/Firestore'
    pod 'Firebase/Auth'
    

    Avoid manually excluding any subspecs that might pull in leveldb.

  • Reinstall Pods From Scratch
    If nothing else works, do a full pod reset:

    pod deintegrate
    pod clean
    rm Podfile.lock
    pod install
    

    This removes all old pod configurations and sets up dependencies fresh for your new Xcode version.

Quick note: You shouldn’t need to download leveldb manually—it’s supposed to be handled automatically by CocoaPods as part of Firebase’s dependencies. If you had any manual framework links for leveldb in the past, double-check that those are removed to avoid conflicts.

内容的提问来源于stack exchange,提问作者AndrewBr

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.28 09:54:13