AFNetworking.framework: No such file or directory

2019-09-05 16:27发布

问题:

I just opened my project in Xcode 8.0 and tried to build it, but the following "PBXCp Error Group" appeared:

error: /Users/username/Documents/XYZ/build/Debug-iphoneos/AFNetworking.framework: No such file or directory

My Podfile is below:

platform :ios, '10.0'
use_frameworks!

target 'XYZ' do
  pod "MSSTabbedPageViewController"
  pod "SKStatefulTableViewController", "~> 0.1"
  pod "QBFlatButton"
  pod "LTNavigationBar"
  pod "KBRoundedButton"
  pod "CTCheckbox"
  pod "SKStatefulTableViewController", "~> 0.1"
  pod "SDWebImage"
  pod "TOCropViewController"
  pod "UIImageViewAligned"
  pod "AFNetworking"
  pod "MBProgressHUD"
  pod "JSONModel"
  pod "CWStatusBarNotification"
  pod "Firebase/Messaging"
  pod "MaterialControls"
  pod "Fabric"
  pod "Crashlytics"
end

Pod is installed and OK.

I don't know what I did, since Cocoapods seems to be in the build folder.

回答1:

I've had the same issue. Adding and removing AFNetworking from podfile didn't help at all. The only thing that worked for me was to remove AFNetworking.framework and add it again from correct path. The original path was pointing to wrong direction...



回答2:

change the platform :ios, '10.0' to older platform and update pod file it will work fine for me.



回答3:

try to add it properly because i had recently install all pod file in my side it working fine for me.remove your pod file and then install it.



回答4:

Checking the item "Copy only when installing" in build setting just worked for me.