14

Here is the original github issue, support sugested to open a thread here for more public support.

I'm using xcode 6.4.

$ pod --version
0.38.2

My Podfile:

platform :ios, '8.0'
use_frameworks!

target 'Turnt' do
    pod 'Starscream'
    pod 'Alamofire', '~> 1.3'
end
Struki84
  • 175
  • 1
  • 1
  • 12

8 Answers8

37

I met similar problem, too. I couldn't figure out why and soon I lost patience so just ignored the error and clicked "run" directly. The error actually disappeared and "Build Succeeded" was shown!

Cecil_Ma
  • 479
  • 4
  • 10
9

There are a few other things you can try:

Verify xcodebuild version

Make sure your xcodebuild version also set to 6.4.

xcodebuild settings

Clean All

You certainly want to try clean all in the project. Sometimes that will reset the issue.

Wipe DerivedData and Xcode Cache

Another thing that could be causing the problem is that you may need to wipe your DerivedData folder along with your Xcode cache.

echo "Removing DerivedData and Xcode Cache"
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode

Give those a whirl and I'll update my answer accordingly. Best of luck!

cnoon
  • 16,575
  • 7
  • 58
  • 66
  • `xcodebuild` is set correctly, removing derived data and Cache didn't do anything. Strange thing is, I can run the project, and build it, but if I run the app it just hangs when Alamofire should be used without any errors or debug msgs. – Struki84 Jul 28 '15 at 17:12
  • i only have the option xcode 7.0.1 in there. what to do? – Esqarrouth Nov 04 '15 at 12:23
  • @Esq leave it at 7.0.1 and follow the rest of the instructions. – cnoon Nov 04 '15 at 15:54
  • Be careful using rm -rf. If you run that command as root, and the previous cd fails for any reason (e.g. folder doesn't exist), you could inadvertently wipe a lot more than you meant to – UglyBlueCat Jul 26 '16 at 16:44
7

I met the same question and by Product->clean then Product->build fixed it

SkateCloud
  • 71
  • 1
  • 2
5

The fix for me was changing the platform version in my Podfile to the same version I was building for in Xcode. Then run pod install again. Derp.

Example: platform :ios, '11.2'

Mark Evans
  • 396
  • 4
  • 10
  • 2
    Derp indeed. Such an obvious solution. Thanks! Both Xcode and Podfile iOS versions have to match. Changing it in either place should do the trick. – Repose Mar 27 '18 at 04:35
3

For me, none of the above answers worked. Something I did terribly wrong was setting a flag in Other Swift Flags in the Build Settings. Which override cocoapods custom flags. It shows an error something like this in that case. Pod installation complete! There are 16 dependencies from the Podfile and 29 total pods installed.

[!] The `***** [Debug]` target overrides the `OTHER_SWIFT_FLAGS` build setting defined in
    `Pods/Target Support Files/Pods-MishiPay/Pods-MishiPay.debug.xcconfig'. This can lead 
    to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

So Instead of removing my other custom flags. I added one more flag $(inherited) after this everything worked fine.

enter image description here

$(inherited) inherits all the custom flags defined by cocoapods

Sandeep Rana
  • 3,251
  • 2
  • 24
  • 38
1

This issue was already reported on Github: https://github.com/Alamofire/Alamofire/issues/441

Follow the following steps

  1. Product -> Clean
  2. Restart Xcode
  3. Rebuild the project
  4. Might have allowed permission to access the keychain

Good Luck and Happy Coding

UglyBlueCat
  • 439
  • 1
  • 7
  • 22
Chamath Jeevan
  • 5,072
  • 1
  • 24
  • 27
0

it's a Xcode bug with Alamofire. Just keep rebuilding the app and cleaning it. After that restart, Xcode and the problem should go away. Hope that helps,

0

In my case, I forget to add dependency for all targets. I got the issue only while Unit testing, later I recognised that I missed to add it in .pod file for test target.

target 'SujanTests' do

pod 'Alamofire', '~> 3.7'

end

Sujananth
  • 635
  • 1
  • 10
  • 24