简体   繁体   中英

xcode library not found for -lAFNetworking

I have a ObjC app project with a UI Automation Swift target in it. By default the Run and Test build work successfully.

But I have to add a Cocoa Pod with a Swift framework for the UI Automation target... Podfile:

workspace 'BlahApp.xcworkspace'
platform :ios, '8.0'
project 'BlahApp/BlahApp.xcodeproj'

target 'BlahApp' do
    pod 'Blahpod', '~> 2.1.6'
    pod 'Mehpod', '~> 3.10.0'
end

target 'BlahAppUITests' do
    use_frameworks!
    platform :ios, '9.0'
    pod 'autom', :git => 'https://blah.to.my.repo', :branch => 'master'
end

So I add this, do a pod install , Xcode clean, Xcode Run --> works, Xcode Test fails with:

ld: library not found for -lAFNetworking

AFNetworking is used in Blahpod.

Time wasted trying to get Xcode/Cocoapods to do what I want: 2 days

Somebody please help me here. tried other people's solution to the error message to no avail.

在构建设置中,搜索“运行路径”,然后添加“ @ executable_path / Frameworks”并删除与AFNetworking相关的所有其他内容

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM