How to use #import <> on a git submodule

I am including two libraries in my project. Since my project is a static library I decided to include the libs via git submodules rather than cocoa pods.

LibraryA has a dependency on LibraryB and imports it via #import <>, which gives me a file not found error.

  • fatal error: Could not create a path to the bundle
  • The dependency `AFNetworking (~> 2.5)` is not used in any concrete target
  • CocoaPods `pod install` error: cannot open FETCH_HEAD: Permission denied
  • Cocoapods Private Repo not pulling correct code for tag
  • How to check pods project into same repository as main project xcode 7?
  • Git push failed when I updated the cocoaPods
  • I added /path/to/folder/with/my/submodules in both the framework and header search paths of my target, but the only way I’ve been able to resolve the error is by changing LibraryA to use #import "".

    Is there a proper way to fix this that does not involve forking LibraryA and changing the import statement myself?

  • Changing lots of git commit messages
  • Is it possible to define own syntax on a GitHub repository?
  • Git server warn when pushing merge commits
  • Get the branch name of a tip commit
  • Smartgit error: “Push Error Not all refs have been pushed”
  • How do I check for valid Git branch names?
  • One Solution collect form web for “How to use #import <> on a git submodule”

    If your app name is MyApp and your submodule is MySubmodule then go in the build settings for the app target and put this for the “Header Search Paths”:

    MyApp/MySubmodule
    

    Hopefully inside your submodule you have another dir that matches the MySubmodule name but here I’ll just say it is SDKName:

    #include <SDKName/UmbrellaHeader.h>
    

    What happens is it now searches the root of the MySubmodule path and since the SDKName is a subfolder now you can use the <> syntax.

    Git Baby is a git and github fan, let's start git clone.