title: Cocoapods "pod update" installs old pods
body: <p>I am trying to set up CI on Xcode Server by creating a bot for an iOS app. I use CocoaPods so I'm using the script below to install the pods:</p>
  
  <pre><code>export LANG=en_US.UTF-8
  #!/bin/bash
  cd "$XCS_SOURCE_DIR/{PROJECTNAME}"
  if [ -e "Pods" ]
  then
  /usr/local/bin/pod update
  else
  /usr/local/bin/pod install
  fi
  </code></pre>
  
  <p>The current version of CocoaPods 0.39.0 is installed on the server. When I run "pod update" on the server everything is alright and the newest pods are installed. </p>
  
  <pre><code>Using FBAudienceNetwork (4.7.0)
  Using FBSDKCoreKit (4.8.0)
  Using Fabric (1.6.1)
  Using FyberSDK (8.1.2)
  Using Google-Mobile-Ads-SDK (7.6.0)
  Using GoogleAnalytics (3.14.0)
  </code></pre>
  
  <p>When I use the script above however something strange happens.</p>
  
  <pre><code>Installing FBAudienceNetwork (4.1.0)
  Installing FBSDKCoreKit (4.4.0)
  Installing Fabric (1.2.8)
  Installing FyberSDK (7.2.4)
  Installing Google-Mobile-Ads-SDK (7.3.1)
  Installing GoogleAnalytics (3.13.0)
  </code></pre>
  
  <p>Anyone has any idea why old versions are installed with the script? I use OS X Server 5.0.15 and Xcode 7.2.</p>
  
  <p>The podfile:</p>
  
  <pre><code>source 'https://github.com/CocoaPods/Specs.git'
  
  platform :ios, "8.0"
  use_frameworks!
  
  target "{PROJECTNAME}" do
      inhibit_all_warnings!
  
      pod 'AFNetworking'
      pod 'Branch'
      pod 'SwrveSDK'
      pod 'RealmSwift'
      pod 'MZTimerLabel'
      pod 'pop' 
      pod 'Adjust'
      pod 'JSQMessagesViewController'
      pod 'Fabric'
      pod 'Crashlytics'
      pod 'GoogleAnalytics'
      pod 'FBSDKCoreKit'
      pod 'FyberSDK'
      pod 'AdColony'
      pod 'Google-Mobile-Ads-SDK'
      pod 'ChartboostSDK'
      pod 'FBAudienceNetwork'
      pod 'VungleSDK-iOS'
  end
  
  target "{PROJECTNAME}Tests" do
      inhibit_all_warnings!
  
      pod 'AFNetworking'
      pod 'Branch'
      pod 'SwrveSDK'
      pod 'RealmSwift'
      pod 'MZTimerLabel'
      pod 'pop'
      pod 'Adjust'
      pod 'JSQMessagesViewController'
      pod 'Fabric'
      pod 'Crashlytics'
      pod 'GoogleAnalytics'
      pod 'FBSDKCoreKit'
      pod 'FyberSDK'
      pod 'AdColony'
      pod 'Google-Mobile-Ads-SDK'
      pod 'ChartboostSDK'
      pod 'FBAudienceNetwork'
  end
  
  post_install do |installer|
      installer.pods_project.targets.each do |target|
          target.build_configurations.each do |config|
              config.build_settings['ENABLE_BITCODE'] = 'NO'
          end
      end
  end
  </code></pre>