question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

4.0.0 with Cordova 9.0.0 & Cordova-ios 5.0.1 "Branch.h" not found

See original GitHub issue

Hi,

I’ve been trying to get cordova-ios with branch-cordova-sdk to build for IOS. It works fine for android (on windows) with my current setup but I get the following build error on mac while building for IOS:

Plugins/branch-cordova-sdk/BranchSDK.h:4:9: fatal error: 'Branch.h' file not
      found
#import "Branch.h"

I guess that something is failing to build branch.h, or it’s a path issue?

There is an error that comes out of pod install when I run cordova plugin add branch-cordova-sdk

[!] The [Debug] target overrides the 'LD_RUNPATH_SEARCH_PATHS' build setting [!] The [Release] target overrides the 'LD_RUNPATH_SEARCH_PATHS' build setting

But I have tried manually adding $(inherited): to those paths (where they are defined in the xcconfig files) and rerunning pod install which then runs without warnings, but still got the same failure when running cordova build ios

I’ve also tried adding and re-adding the platform and plugin etc

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:20 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
rupertbearcommented, Dec 26, 2019

@echo-branch I tried building from Xcode using the workspace and still got the error. I’m new to building with Xcode so I’d like to confirm that I took the right steps. In Xcode, I closed all open windows then opened MyApp.xcworkspace located in platforms/ios/. Then when it opened and the status bar showed “Ready”, I clicked the Build icon. A few moments after that it failed with the same Branch.h error. Did I go wrong somewhere?

My env: Cordova cli: 8.1.2 Cordova ios: 5.1.1 Branch: 4.0.0 Pod: 1.8.4

I tried forking the Cordova ios repo and commenting out the CONFIGURATION_BUILD_DIR line per this comment but even that didn’t work. 😦

@CodeWithOz

I tried all you did and was still having the same problem. The following worked for me in the end:

Remove any current ios platform from your project (cordova platform remove ios) Upgrade to Cordova v9 (sudo npm install -g cordova) Update Cocapods with the following couple of commands: pod repo update sudo gem install cocoapods add the ios platform back to your project Open the workspace file as you have done above and build in Xcode Note: I had to go to Signing & Capabilities section in XCode project to set the Team - you may also get an error about thi.

Other Note: I also got an error message about ‘Insecure world writable dir’ during the process of adding ios platform back in. If you experience the same use the following command to set appropriate permissions and re-add ios platform sudo chmod go-w /folder/listed/in/error/msg

Hope that fixes it for you!

2reactions
bobrosoftcommented, Feb 25, 2020

@codinronan hi, CLI builds still fail, see #633 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blog - Apache Cordova
Media Plugin 6.0.0 & Media Capture Plugin 4.0.0 Released! ... We are happy to announce that Cordova iOS 5.0.1 has been released!
Read more >
Cordova PhoneGap Ionic - Branch Help
Open the "Signing & Entitlements" tab in Xcode, add the Associated Domains entitlement, and add the urls found on your Branch dashboard. AppStore:...
Read more >
SDK changelog - Cordova — Batch
This fixes an issue where cordova prepare would reinstall an older version of the plugin if the plugins folder was missing. Cordova users:...
Read more >
Cordova SDK Troubleshooting - Visual Studio App Center
Archive not found at path iOS build error ... If you see the following error message during cordova build ios , you must...
Read more >
Camera API Plugin: Capacitor and Cordova for Ionic Apps
The Camera plugin offers the ability to take a photo, capture video and choose images from the system's image library. Installation​. If you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found