Add Nimble as a dependency to tvOS unit tests target via CocoaPods
Xcode should compile Nimble when compiling tvOS unit tests target it was added to
Xcode can't compile Nimble-tvOS framework added by CocoaPods. Build fails with error:
UnderControl/Pods/Nimble/Sources/Nimble/Nimble.h:6:9: Include of non-modular header inside framework module 'Nimble.Nimble': 'UnderControl/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h'
List the software versions you're using:
The project contains several unit tests targets:
All tests targets have Nimble dependency added via CocoaPods. UnderControlTests-iOS and UnderControlTests-macOS compiles with Nimble and runs tests without an issue. The only problem is with UnderControlTests-tvOS target, which Xcode can't compile due to mentioned error.
I noticed that some files are not included in Nimble-tvOS framework, but are included in both Nimble-iOS and Nimble-OSX frameworks. I tried to add those files manually to Nimble-tvOS framework:
Eventually I've got to the point where Nimble-tvOS can't be build because of this error:
CwlCatchBadInstruction.swift:106:5: 'mach_msg' is unavailable
Not sure what I am doing ¯\__(ツ)_/¯ so decided to look for help here.
Hey @darrarski,
I cloned the repo you linked to and was able to build UnderControlTests-tvOS target:
git clone https://github.com/darrarski/UnderControlpod installUnderControl.xcworkspaceUnderControlTests-tvOSAlthough I'm using Xcode 8.3.3 (8E3004b). Did you try cleaning your derived data?
It looks like the problem was somehow connected to Xcode version. I tried cleaning up derived data and reinstalling pods several times, but on Xcode 8.3.2 build was always failing. Now I am using Xcode 8.3.3 (latest stable version at the moment) and it compiles just fine.
I am closing this issue.
Thanks for following up and closing the issue. 😀
Sent from my iPhone
On Jun 27, 2017, 3:53 AM -0700, Dariusz Rybicki notifications@github.com, wrote:
Closed #430.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Sorry to bump this but seeing this issue in XCode 9 again, with Nimble 7.0.2
Most helpful comment
Sorry to bump this but seeing this issue in XCode 9 again, with Nimble 7.0.2