3

When I am trying to build my Ionic 3 app in ios device from Xcode, I am getting the following error.

'Branch.h' file not found 

The error appears in file BranchSDK.h inside the Plugins folder of IOS. There are old threads on Github regarding this error but I am unable to solve it.

Tapas Mukherjee
  • 2,088
  • 1
  • 27
  • 66

1 Answers1

4

Please try following solution:

  1. Please make sure that you are opening xcworkspace instead of xcodeproj.
  2. Please remove the existing SDK integration, start a fresh and make sure to use the latest version. You can follow this link for more details: https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking-attribution/issues/356
  3. Delete derived data from Xcode as suggested in this link.
  4. Config.xml is an important part of your project configuration, please make sure to cross confirm it from the Branch Dashboard. Please follow our troubleshooting guidelines to make sure you are not missing anything.

In case following solution does not works for you please write to support@branch.io.

Shubham Mishra
  • 1,303
  • 13
  • 24
  • 1
    I was opening xcodeproj instead of xcworkspace. Thank you so much. – Tapas Mukherjee Oct 30 '19 at 18:57
  • 1
    In my case, I was importing Branch into my Objective-C AppDelegate file as shown in the Branch documentation: #import "Branch/Branch.h". It worked when I changed the import statement to: #import "Branch.h" – Tyler Wood Jun 17 '22 at 02:35