Build fails with "Command PrecompileSwiftBridgingHeader failed with a nonzero exit code"

Viewed 24024

I just insert the NVActivityIndicatorView library and then I remove this framework in to trash. When I build the project it's showing following image.

Command PrecompileSwiftBridgingHeader failed with a nonzero exit code

6 Answers

Check your TargetName-Bridging-Header.h location in project. Open

Target -> Built Settings -> Objective-C Bridging Header

See screen here

In my case.

  1. Go to Build Settings and search for Objective-C Bridging Header and double click to its value.
  2. clear the path given in it. (if any)
  3. Now drag your Bridging Header file and drop it to Objective-C Bridging Header value view.
  4. Finally clean your project and build. (Its Done).

Note: Collective, just change the path of Bridging Header File in your Build Settings.

Happy Coding.

check your TargetName-Bridging-Header.h location in project. This file should be in root folder

If you are working with React Native, delete you bridging header file and then create a swift file under your Target. XCode will automatically ask you if you want to create bridging file.

I had same problem on a React Native project. Make sure all values of the IPHONEOS_DEPLOYMENT_TARGET: XX.X inside project.pbxproj is same as in Podfile platform :ios, 'XX.X'

It sometimes can be from a revoked certificate which you have to update :|

Related