core-plot: iOS - Xcode 10 New Build System - Dependent Project Install: Failed to emit precompiled header

I have been building my iOS app against the tip of the release 2.3 branch for several months with Core Plot integrating into my project as a dependent project install. I can build my app just fine using the Xcode 10 Legacy Build System, but when I try using Xcode 10’s New Build System, I get the following errors:


Showing All Issues
PrecompileSwiftBridgingHeader normal x86_64 (in target: myapp)
    cd /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -target x86_64-apple-ios10.0-simulator -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk -I /Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Products/DebugDev-iphonesimulator -F /Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Products/DebugDev-iphonesimulator -F /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main -F /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/Google-Maps/Base/Frameworks -F /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/Google-Maps/Maps/Frameworks -F /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/Crashlytics/iOS -F /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/Fabric/iOS -F /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/Firebase/Firebase/Analytics -enable-testing -g -module-cache-path /Users/iosdeveloper/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4 -enforce-exclusivity=checked -Onone -D DEBUG -serialize-debugging-options -Xcc -working-directory -Xcc /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main -Xcc -I/Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/myapp.build/DebugDev-iphonesimulator/myapp.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/myapp.build/DebugDev-iphonesimulator/myapp.build/myapp-generated-files.hmap -Xcc -I/Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/myapp.build/DebugDev-iphonesimulator/myapp.build/myapp-own-target-headers.hmap -Xcc -I/Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/myapp.build/DebugDev-iphonesimulator/myapp.build/myapp-all-target-headers.hmap -Xcc -iquote -Xcc /Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/myapp.build/DebugDev-iphonesimulator/myapp.build/myapp-project-headers.hmap -Xcc -I/Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Products/DebugDev-iphonesimulator/include -Xcc -IVendor/CorePlot/framework -Xcc -IVendor/CorePlot/framework/CocoaPods -Xcc -IVendor/CorePlot/framework/Info -Xcc -IVendor/CorePlot/framework/MacOnly -Xcc -IVendor/CorePlot/framework/Source -Xcc -IVendor/CorePlot/framework/TestResources -Xcc -IVendor/CorePlot/framework/iPhoneOnly -Xcc -IVendor/CorePlot/framework/xcconfig -Xcc -IVendor/Outbound/Outbound -Xcc -I/Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/myapp.build/DebugDev-iphonesimulator/myapp.build/DerivedSources/x86_64 -Xcc -I/Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/myapp.build/DebugDev-iphonesimulator/myapp.build/DerivedSources -Xcc -DDEBUG=1 -serialize-diagnostics-path /Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/PrecompiledHeaders/BridgingHeader-1KP8MC9VFWG0W.dia /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h -index-store-path /Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Index/DataStore -emit-pch -pch-output-dir /Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/PrecompiledHeaders

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:
#import "CorePlot-CocoaTouch.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:8:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:8:
#import "CPTAnnotationHostLayer.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTAnnotationHostLayer.h:2:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTAnnotationHostLayer.h:2:
#import "CPTLayer.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTLayer.h:2:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTLayer.h:2:
#import "CPTResponder.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTResponder.h:1:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTResponder.h:1:
#import "CPTPlatformSpecificDefines.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/MacOnly/CPTPlatformSpecificDefines.h:3:9: error: unknown type name 'NSImage'
typedef NSImage CPTNativeImage; ///< Platform-native image format.
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:
#import "CorePlot-CocoaTouch.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:8:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:8:
#import "CPTAnnotationHostLayer.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTAnnotationHostLayer.h:2:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTAnnotationHostLayer.h:2:
#import "CPTLayer.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTLayer.h:2:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTLayer.h:2:
#import "CPTResponder.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTResponder.h:1:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTResponder.h:1:
#import "CPTPlatformSpecificDefines.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/MacOnly/CPTPlatformSpecificDefines.h:4:9: error: unknown type name 'NSEvent'; did you mean 'UIEvent'?
typedef NSEvent CPTNativeEvent; ///< Platform-native OS event.
        ^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWindow.h:19:8: note: 'UIEvent' declared here
@class UIEvent, UIScreen, NSUndoManager, UIViewController;
       ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:
#import "CorePlot-CocoaTouch.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:25:9: note: in file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:25:
#import "CPTGraphHostingView.h"
        ^
/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/MacOnly/CPTGraphHostingView.h:1:9: error: 'Cocoa/Cocoa.h' file not found
#import <Cocoa/Cocoa.h>
        ^
3 errors generated.
<unknown>:0: error: failed to emit precompiled header '/Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/PrecompiledHeaders/BridgingHeader-swift_23625EL1TPX55-clang_31JBRG5UTLUD1.pch' for bridging header '/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h'

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:8:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:8:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTAnnotationHostLayer.h:2:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTAnnotationHostLayer.h:2:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTLayer.h:2:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTLayer.h:2:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTResponder.h:1:9: In file included from ### /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTResponder.h:1:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/MacOnly/CPTPlatformSpecificDefines.h:3:9: Unknown type name ‘NSImage’

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:8:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:8:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTAnnotationHostLayer.h:2:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTAnnotationHostLayer.h:2:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTLayer.h:2:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTLayer.h:2:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTResponder.h:1:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/Source/CPTResponder.h:1:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/MacOnly/CPTPlatformSpecificDefines.h:4:9: Unknown type name ‘NSEvent’; did you mean ‘UIEvent’?

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h:6:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:25:9: In file included from /Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/CorePlot-CocoaTouch.h:25:

/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/Vendor/CorePlot/framework/MacOnly/CPTGraphHostingView.h:1:9: ‘Cocoa/Cocoa.h’ file not found

Failed to emit precompiled header ‘/Users/iosdeveloper/Library/Developer/Xcode/DerivedData/myapp-dacescmywydakagivooskyyjdrxb/Build/Intermediates.noindex/PrecompiledHeaders/BridgingHeader-swift_23625EL1TPX55-clang_31JBRG5UTLUD1.pch’ for bridging header ‘/Users/iosdeveloper/Documents/Xcode_workspace/myapp-ios-main/myapp/BridgingHeader.h’

It looks like the iOS build is trying to compile Mac-specific code which leads to the build errors I’m getting. Any insight into what might be going on and how to resolve this issue?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (2 by maintainers)

Most upvoted comments

I see this error, too. I’ve been looking for a solution, but haven’t found any way to solve it yet.

Confirming the error still exists with Xcode 10 GM. Even after removing the Mac targets in the CorePlot project file.

@rbmanian75 My guess is that a solution hasn’t been found yet considering there haven’t been any commits referencing a solution to this issue.

@eskroch Perhaps this should be bumped up to Priority-High now that the Xcode 10 GM has been released. Hopefully doing so will catch the attention of other developers looking to make a high impact contribution to this project.

xcode 10 gm is released. Could you please share a solution if you found one.

Thanks, Eskroch. Same issue here. Hopefully, you find a solution before the official release of Xcode 10/iOS 12.

same in xcode 10.1 beta