title: Pod update has fatally altered app
body: <p>My perfectly working app used to have an Xcode Project Navigator as shown below.</p>
  
  <p><a href="https://i.stack.imgur.com/uFwPs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uFwPs.png" alt="Project Navigator Old"></a></p>
  
  <p>iOS 10 requirements meant I had to upgrade Xcode to 8.1, which meant upgrading the entire Mac OS to Sierra and also translating the whole app to Swift 2.3.</p>
  
  <p>Needless to say, this caused errors, one of which was an issue with PubNub. However, apart from this new build error the app structure was the same and everything seemed ok after dealing with all the layout issues.</p>
  
  <p>I was requested to run the following steps to try to solve the PubNub pod error despite me warning that previous attempts to deal with the pod file caused fatal errors that were ultimately unrecoverable.</p>
  
  <ol>
  <li>Install all iOS simulators after Xcode update</li>
  <li>Open Xcode preferences (Cmd+,) and navigate to ”Locations” tab where will be shown path to ”DerivedData” folder</li>
  <li>Click on small circle with arrow on the right side of shown ”DerivedData” path to open it in Finder</li>
  <li>Quit Xcode</li>
  <li>Remove ”DerivedData” folder</li>
  <li>Clean up CocoaPods (if integrated with it) caches by entering this in Terminal:
  rm -rf ~/Library/Caches/CocoaPods</li>
  <li>From project root (where Podfile is located) run this in Terminal:
  pod deintegrate MyApp.xcodeproj</li>
  <li>Remove from project root (where Podfile is located) Podfile.lock file</li>
  <li>From project root (where Podfile is located) run this in Terminal: pod update</li>
  <li>Launch Xcode (hit Shift + Cmd + K just in case)</li>
  <li>Try build project</li>
  </ol>
  
  <p>After doing all this my Project Navigator now looks like this.</p>
  
  <p><a href="https://i.stack.imgur.com/34PCR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/34PCR.png" alt="Project Navigator New"></a></p>
  
  <p>As you can see, I've lost a load of stuff including the pod file etc. As suspected, my app is now fatally wounded.</p>
  
  <p>My bridging header is red, Restkit.h is red and all pod references gone.</p>
  
  <p>My project root in Finder has the Pods folder and pod file etc, however if I try to drag folders into the project from Finder they do not show as they used to - e.g., folders are blue color not yellow.</p>
  
  <p>I'm on Xcode 8.1 and Cocoapods 1.1.1.</p>
  
  <p>How can I recover my app?</p>
  
  <p>EDIT: If it helps, here is the link to my unsolved question in January which was the last time I dared touch the pod file at all until now. The consequences of this situation are the same as before - the difference is that in January I was ditching 2 weeks work, now I'm looking at ditching 10 months' work.</p>
  
  <p><a href="https://stackoverflow.com/questions/34880091/restkit-h-never-found-in-xcode-project">RestKit.h never found in Xcode project</a></p>
  
  <p>Podfile:</p>
  
  <pre><code>pod 'RestKit', '~&gt; 0.24.0'
  pod 'SimpleKeychain'
  pod 'AWSS3'
  pod 'VideoCore'
  pod 'SDWebImage', '~&gt;3.7'
  pod 'SVPullToRefresh'
  pod 'PubNub', '~&gt; 3.7.11'
  pod 'MZFormSheetController'
  </code></pre>
  
  <p>Result of pod update in Terminal:</p>
  
  <p>Update all pods
  Updating local specs repositories
  Performing a deep fetch of the <code>master</code> specs repo to improve future performance
  warning: inexact rename detection was skipped due to too many files.
  CocoaPods 1.2.0.beta.1 is available.
  To update use: <code>sudo gem install cocoapods --pre</code>
  [!] This is a test version we'd love you to try.
  For more information, see <a href="https://blog.cocoapods.org" rel="nofollow noreferrer">https://blog.cocoapods.org</a> and the CHANGELOG for this version at <a href="https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1" rel="nofollow noreferrer">https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1</a></p>
  
  <p>Analyzing dependencies
  [!] The dependency <code>RestKit (~&gt; 0.24.0)</code> is not used in any concrete target.
  The dependency <code>SimpleKeychain</code> is not used in any concrete target.
  The dependency <code>AWSS3</code> is not used in any concrete target.
  The dependency <code>VideoCore</code> is not used in any concrete target.
  The dependency <code>SDWebImage (~&gt; 3.7)</code> is not used in any concrete target.
  The dependency <code>SVPullToRefresh</code> is not used in any concrete target.
  The dependency <code>PubNub (~&gt; 3.7.11)</code> is not used in any concrete target.
  The dependency <code>MZFormSheetController</code> is not used in any concrete target.</p>