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

SwiftyJSON.framework显示禁用,运行项目提示文件不存在求助

Fixing Disabled SwiftyJSON.framework & "No Such File or Directory" Error

Hey there, let's get this SwiftyJSON issue sorted out—this kind of framework linking glitch is super common, and we can work through it step by step:

  • First, do a full CocoaPods reset & clean
    Sometimes partial reinstalls leave behind corrupted configs. Here's what to do:

    1. Close Xcode completely
    2. Open your project folder, run these commands in Terminal:
      pod deintegrate
      rm Podfile.lock
      rm -rf Pods
      
    3. Clean Xcode's derived data: Either use Cmd+Shift+K in Xcode (after reopening it briefly), or manually delete the folder at ~/Library/Developer/Xcode/DerivedData (find the folder named after your project).
  • Reinstall Pods & use the correct project file

    1. Run pod install in your project folder
    2. Make sure you open the .xcworkspace file, not .xcodeproj—this is the #1 mistake that causes Pod framework issues!
    3. Once in Xcode, go to your target's Build Phases > Link Binary With Libraries. If SwiftyJSON is still disabled:
      • Remove it from the list
      • Click the + button, select Add Other..., then navigate to Pods/SwiftyJSON/SwiftyJSON.framework and add it back
  • Verify Build Settings are set correctly

    1. Go to your target's Build Settings tab
    2. Search for Framework Search Paths—ensure it includes $(inherited) and ${PODS_ROOT}/SwiftyJSON, set to recursive
    3. Search for Other Linker Flags—make sure $(inherited) is present here (this pulls in all Pods' required linker settings)
  • Check architecture compatibility
    A mismatch in supported architectures can mark frameworks as disabled:

    1. In Build Settings, search for Architectures
    2. Set Architectures to Standard Architectures (arm64, x86_64)
    3. Set Build Active Architecture Only to Yes for Debug, No for Release
  • Last resort: Restart Xcode (and your computer!)
    Xcode loves to hold onto cached weirdness. A full restart often fixes those "why is this happening?!" bugs that don't make sense on paper.

内容的提问来源于stack exchange,提问作者j.lo

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.29 07:35:45