14

I am trying to install alamofire into my project so I can upload images to my server, however I cannot seem to find the alamofire.framework file. I have downloaded the git twice, done the installation instructions on https://github.com/Alamofire/Alamofire but when it comes to step 6, how and where do I get the alamofire.framework file?

I am new to this, so sorry if it is a stupid question.

8 Answers8

44

You have to open yourprojectname.xcworkspace

You might get this error if you are opening your .xcworkproj instead of workspace

harishannam
  • 2,747
  • 3
  • 30
  • 39
27
  1. Close your Xcode project
  2. Re-Open your project with the Xcode workspace file and not with the .xcodeproj

This work fine for me !

Joffrey Outtier
  • 880
  • 10
  • 9
8

You just need to change Framework Search Paths to $(inherited).

P.S: Build Settings -> Search Paths -> Framework Search Paths

enter image description here

Gustavo Morales
  • 2,614
  • 9
  • 29
  • 37
Helbert
  • 81
  • 1
  • 2
3

I solve my problem with this way (Only if your case are you have imported Alamofire in project but still not found)

  1. Close all your project and your XCode
  2. Re-Open your XCode Apps then select bottom text enter image description here
  3. Choose your project, do not select file inside. Just click open on folder project name enter image description here
Nanda Z
  • 1,604
  • 4
  • 15
  • 37
3

I removed the Alamofire from pod file but I got the error again finally I figured out Alamofire exist in Target -> Build setting -> Other Linker Flags and remove from there and build successfully finally.

Amir Ardalan
  • 389
  • 3
  • 7
1

Use Cocoapods to integrate Alamofire in your project:

To add Alamofire into your project please do the following steps:

add the below lines into your pod file.

  source 'https://github.com/CocoaPods/Specs.git'
  platform :ios, '8.0'
  use_frameworks!

  pod 'Alamofire', '~> 2.0'
Suraj Sonawane
  • 2,044
  • 1
  • 14
  • 24
0

Not stupid!

  • Click the little (easily missed) + button in the bar under General, Build Phases, etc. and in the dropdown click New Copy Files Phase
  • Double click the title and rename it "Copy Frameworks" (optional)
  • Change destination to Frameworks
  • Add Alamofire.framework

Once it's linked it doesn't necessarily exist on your device, this ensures it will.

Tim O'Brien
  • 2,538
  • 1
  • 15
  • 13
0

I was also facing the same issue, and '$(inherited)' was missing in Target -> Build Settings ->Framework Search paths. Giving this fixed my issue.

Tinjzz
  • 87
  • 1
  • 1
  • 15