Reputation: 14142
I am using the latest version of Cordova 6.4.0 to build an application on the iPhone (using Xcode obviously).
When I run the cordova run command to build the app I get the following errors in the terminal.
<unknown>:0: error: failed to import bridging header
'/Users/development/abc/mobapp/platforms/ios/abchq/Bridging-Header.h
** ARCHIVE FAILED **
The following build commands failed:
CompileSwiftSources normal arm64 com.apple.xcode.tools.xwift.compiler
CompileSwift normal arm64 /Users/development/abc/mobapp/platforms/ios/QuickPost/NetworkTableViewController.swift
CompileSwift normal arm64 /Users/development/abc/mobapp/platforms/ios/QuickPost/ShareViewController.swift
(3 failures)
Error: Error code 65 for command: xcodebuild with args:- xcconfig...... (a lot more info)
Can anyone suggest what could the cause of all of this - when I run this on the same machine for the Android it runs fine?? Any ideas?
My machine information is as follows:
Cordova CLI : 6.4.0
ios-deploy version : 1.9.1
ios-sim version: 5.0.13
OS : macOS Sierra
Node version : v7.1.0
Xcode version : Xcode 8.2.1 Build version 8C1002
Upvotes: 1
Views: 844
Reputation: 11935
The "Objective-C Bridging Header" setting (aka SWIFT_OBJC_BRIDGING_HEADER) must be set at the Target level, and NOT the Project level. Be sure to delete the setting value at the Project level. This should resolve the issue.
Check out this SO post for more info on this.
Upvotes: 1