加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – Cocoapods完全破产

发布时间:2020-12-14 17:23:54 所属栏目:百科 来源:网络整理
导读:首先:我正在使用 Cocoapods 0.37.2,XCode 6.3.1编译iOS 8.3 在我运行基本的“pod update”之前,我的项目运行得很好,现在它完全拒绝编译.我非常肯定这与豆荚本身无关.具体来说,我得到的错误是这样的: ld: warning: directory not found for option '-F/User
首先:我正在使用 Cocoapods 0.37.2,XCode 6.3.1编译iOS 8.3

在我运行基本的“pod update”之前,我的项目运行得很好,现在它完全拒绝编译.我非常肯定这与豆荚本身无关.具体来说,我得到的错误是这样的:

ld: warning: directory not found for option '-F/Users/user_name/Library/Developer/Xcode/DerivedData/AppName-bjozswzeepmhacfkeimeepxzcxgb/Build/Products/Debug-iphoneos/include'
ld: library not found for -lPods-AppName-AFNetworking

Podfile是这样的:

# Uncomment this line to define a global platform for your project
platform :ios,"8.0"

def shared_pods
    pod 'SocketRocket'
    pod 'AFNetworking'
    pod 'DateTools'
    pod 'Spotify-iOS-SDK'
end

target "AppName" do
    shared_pods
end

target "AppNameTests" do
    shared_pods
end

我已经清除了DerivedData(很多次),清理了我的构建,重新启动了XCode,重新启动了我的机器,我确保我的配置文件和链接器配置列表设置正确.我多年来一直在使用Cocoapods,从来没有遇到过这么多麻烦.

完全沮丧和困惑……质疑理智.

有帮助吗?

解决方法

来自CocoaPods troubleshooting doc的信息.希望这对您有所帮助.

If Xcode complains when linking,e.g. Library not found for -lPods,it
doesn’t detect the implicit dependencies:

  • Go to Product > Edit Scheme
  • Click on Build
  • Add the Pods static
    library,and make sure it’s at the top of the list
  • Clean and build again
  • If that doesn’t work,verify that the source for the spec you
    are trying to include has been pulled from GitHub. Do this by looking
    in /Pods/. If it
    is empty (it should not be),verify that the
    ~/.cocoapods/master//.podspec has the correct git hub url
    in it.
  • If still doesn’t work,check your Xcode build locations settings. Go to Preferences -> Locations -> Derived Data -> Advanced and set build location to “Relative to Workspace”.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读