Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add GitHub's Mantle to Xcode using CocoaPods

I have added GitHub's Mantle project to a iOS 6 project using CocoaPods:

$ pod search Mantle
$ vim Podfile // here I added pod 'Mantle'
$ pod install // this installs Mantle 1.0 

Then I have added the ($inherited) variable to the Header Search Paths of project's 'Build Settings' section, before my custom search paths. When importing the Mantle header file Xcode complains with

#import "Mantle.h" // => 'Mantle/MTLJSONAdapter.h' file not found

Am I missing some step? I have other pods installed as well (AFNetworking and SSKeychain) but only Mantle is giving me issues.

I have also added SSToolkit but following the instructions on its 'Getting started', i.e. not using CocoaPods.

like image 403
elitalon Avatar asked Mar 18 '13 14:03

elitalon


1 Answers

Since the problem seemed to be related with the Xcode project/workspace configuration I tried all kind of 'cleaning' solutions:

  1. Delete the Pods directory, the Podfile.lock file and install everything from scratch.
  2. Delete the MyProject.xcworkspace directory and repeat step 1
  3. Enter MyProject.xcodeproj, delete project.xcworkspace and xcuserdata directories and repeat step 1.
  4. Go to the global Xcode directory (/Users/my_user/Library/Developer/Xcode), remove everything related to the project, specially the DerivedData subdirectory, and repeat step 1.

The final step seems to be the final solution, though I cannot tell which file/folder removal did the trick.

like image 63
elitalon Avatar answered Dec 01 '22 20:12

elitalon