1

my project was running fine but when i added alamofire and it is not working.

it is giving following error

ld: warning: directory not found for option '-F/Users/banglafire/Desktop/mysios/Build/Products/Debug-iphonesimulator/Alamofire' ld: framework not found Alamofire clang: error: linker command failed with exit code 1 (use -v to see invocation)

additional information

Cocopad version 1.3.1

my pod file

# Uncomment the next line to define a global platform for your project
 platform :ios, '9.0'

target 'My' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for My
  pod 'Alamofire'

end

How do i solve it? Please help!

MD TAHMID HOSSAIN
  • 1,473
  • 5
  • 27
  • 52
  • Have you tried this [Pod Error in Xcode “Id: framework not found Pods”](https://stackoverflow.com/a/31161871/4056108) – chirag90 Oct 04 '17 at 06:56
  • Look for Alomafire inside Pods folder in Pods project in your workspace. If it isn't there, then adding it to your pod file, pod install didnt work. – Puneet Sharma Oct 04 '17 at 06:58
  • Please check https://stackoverflow.com/questions/29865899/ld-framework-not-found-pods – Vini App Oct 04 '17 at 07:09
  • 1
    Check here-: https://stackoverflow.com/questions/43245202/alamofire-framework-not-foundxcode-8-2-1-and-ios-10-2 – Tushar Sharma Oct 04 '17 at 07:13

5 Answers5

2

I was facing same problem. So i think you are opening .xcodeproj. you need to open .xcworkspace

Waqas Sultan
  • 874
  • 5
  • 13
1

I think there are some issues with your Pod file should be as below:

# Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'My' do
 # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
 use_frameworks!

pod 'Alamofire', '~> 4.4'

   target 'MyTests' do

   inherit! :search_paths
   # Pods for testing
   end

   target 'MyUITests' do

   inherit! :search_paths
   # Pods for testing
   end

end

try to remove Pod file and again install the pod file and add pod-like this. Hope this could help you.

Princess
  • 169
  • 1
  • 15
0

Try to add the version of the alamofire

pod 'Alamofire', '~> 4.5'

Then run pod install

0

Did you update your pod on project folder already ?

Also check if your pod is correct or not.

https://github.com/Alamofire/Alamofire

When you add something pod on your project, you still need to update your folder.

Try use terminal -> then go to your folder project -> type pod install

StevenTan
  • 235
  • 1
  • 4
  • 19
  • have you tried to see your Build settings ? Go to your Targets -> build settings -> then search for `Search Paths` you will see Framework Search Paths, is your pods already include in that. example : `$(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire` – StevenTan Oct 04 '17 at 07:19
  • No. There is no PODS_CONFIGURATION_BUILD_DIR. how to set this. please guide me. – MD TAHMID HOSSAIN Oct 04 '17 at 08:58
0

I recently encountered this problem aswell. I tried a lot of the suggested fixes on here, but none of them actually fixed the problem.

The actual problem was an incorrect value that was set in the Build Settings of the app.

After setting Per-configuration Build Products Path to:

CONFIGURATION_BUILD_DIR = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

the problem was resolved and my build succeeded.

DennisN
  • 778
  • 2
  • 8
  • 23