I'm using Carthage to bring in Quick and Nimble into my project. I'm also using Carthage to bring in some of our other internal frameworks. Our internal frameworks are great, however, the Quick and Nimble frameworks used in my tests receive no autocompletion love, and odd editor parsing/indexing behaviour. Everything will build fine, but syntax highlighting is haphazard, there's no autocompletion or code hints, etc. Here's some pics:


I should note I'm only experiencing this with Quick and Nimble, but not the 1 or 2 other Carthage frameworks I'm depending on.
I'm on an mid/early 2015 MBP, running OS X 10.11.6, running Xcode 8.1
Cartfile.privatecarthage update --platform iOS, things are pulled, cities built, people fall in love.Carthage/Build/iOS folder and into the breatheAgainTests target's Build Phases -> Link Binary With LibrariesbreatheAgainTests target's Build Phases -> Copy Files
After the above and still not seeing consistent highlighting or parsing, I decided to try the following. Between each of the steps taken I did a Product -> Clean, Product -> Clean Build Folder, and deleted the ~/Library/Developer/Xcode/DerivedData directory.
Apple LLVM 8.0 - Language - Modules -> Enable Modules (C and Objective-C) to NobreatheAgain project -> PROJECT breatheAgain (note: the actual project, not a target) -> Search Paths -> Framework Search Paths I added $(PROJECT_DIR)/../Carthage as recursiveHas anybody experienced this level of stubbornness with using Frameworks and not cocoa pods? I'm kinda shocked by how difficult this has been. Am I missing something in my setup? Do the apple gods hate me? Asking for a friend.
Any help would be _yuge_. I can't post a link to the project as it's, unfortunately, for the organization, but I will try to accommodate all and any requests for further information.
Much love!
Hi there! Thanks for reaching out, @ryanbaldwin. Happy to help. ๐บ I believe the problem you were experiencing has to do with your project setup so here's a few personalised resources:
I setup a fresh Swift 3 Xcode project with Quick and Nimble using Carthage. You can download the zip file here. Feel free to look around.
I also recorded a _quick_ :smirk: video going through the process and explaining each step. You can download the video by going here.
tldr?
/usr/local/bin/carthage copy-frameworks in the main section.$(SRCROOT)/Carthage/Build/iOS/Nimble.framework in the "Input Files" section.$(SRCROOT)/Carthage/Build/iOS/Quick.framework in the "Input Files" section.import Quick and import NimbleAnd then you're good to go!
Let me know if you have any other problems or follow-up questions and I'd be happy to help you some more. ๐ โจ โค๏ธ
Also, I wanted to comment on this as well:
Frameworks for testing that are far better than Apple's crappy XCTest
github "Quick/Quick"
github "Quick/Nimble"
Although XCTest can be frustrating at times, be mindful that XCTest is what Quick (and many other awesome testing tools) are built off of in iOS/macOS/etc. We stand on the shoulders of giants so we can provide great tools and experiences. It's inspired many to build something better and now that Apple runs an open sourced version of XCTest, we'll start to see a feedback loop.
And that's what we're trying to do - help make better tools, techniques and technologies for teams and communities - if that's for Quick or XCTest (or something else). We're all in it together and inspired by each other's work because we have a common goal: to make amazing software.
Just thought I'd get that off my chest. ๐ฏ โค๏ธ
@istx25 - You're right about XCTest. I didn't mean to sound snarky and, truth be told, I'd forgot that's what was actually in the file. You're right that XCTest supports a good foundation for others to build great tooling and technologies, and it's not something I intended to crap all over. It's been a long couple days and I think my frustrations leaked out a bit.
Everybody has done great work here, and I super appreciate what y'all have done, and the incredible support you gave me in the above post (which I'll be trying now). You're right - be thankful and grateful instead of a soon to be cold, shivering, embittered canuck. ;)
๐
Totally understandable! I've been there and I'm pretty sure it's safe to say most, if not all of us have been. The "I wish I could chuck my Mac out the window" moments but you know you won't because your mac's worth too many thousands of dollars and you don't have enough to replace it. ๐
Anyways, let me know if the video + sample project is helpful. If that doesn't resolve your problem, comment back and we can try something else! I'm also Canadian btw so it's totally normal to be cold and shivering in Canada. ๐
Quick update @istx25 - This is now working. Most of what I had in my project targets already aligned with what you had.
There was one major difference, however, and I don't really understand why it would matter: I have a workspace at a level above my project (naturally), and my Carthage stuff was at the workspace level, not at the project level.
I didn't think this would actually be a big deal so long as my Framework Search Path was set appropriately ($(SRCROOT)/../Carthage/**) but, apparently, it _is_ a big deal... but only within the unit test target. So very strange. Perhaps there's some kind of internal Xcode thing where assumptions are made, or how things are resolved in test targets or something... I'm not sure.
In any case, I moved my Cartfile* down one deeper, into the project directory, and ran a carthage update --platform iOS after setting up the various project stuff correctly. And it all worked just wonderfully.
A huge thank you for all the help you provided. It was, quite honestly, some of the best help I've ever received from the OSS community. You really went the extra distance. I wish I could give you some gold.
Cheers!
That's great to hear. I'm glad I was helpful. ๐ I'm here to help people and build the community so no worries. If you'd really like to _give me some gold_, buy me a coffee one day! โ๏ธ In the meantime, I'll look into if I can replicate the problem with the Xcode Workspace. I'm not aware of anything that would cause that but we can see if we can fix it (or get Apple to)! ๐
Hit me up on Twitter or Telegram if you'd like. My username is the same as here. Would be nice to make a new connection. ๐
@istx25 thank you for post. I was missing import of quick and nimble in my test class. My auto complete is working again. After hour and hours of pain ...it's working! are you an Xcode god?
send digital hug dude thank so much!
Thank you for taking the time to comment something nice. โค๏ธ
"Are you an Xcode god?" made my day. ๐
Glad I could help. ๐
@istx25 haha your welcome
Most helpful comment
Quick update @istx25 - This is now working. Most of what I had in my project targets already aligned with what you had.
There was one major difference, however, and I don't really understand why it would matter: I have a workspace at a level above my project (naturally), and my Carthage stuff was at the workspace level, not at the project level.
I didn't think this would actually be a big deal so long as my Framework Search Path was set appropriately (
$(SRCROOT)/../Carthage/**) but, apparently, it _is_ a big deal... but only within the unit test target. So very strange. Perhaps there's some kind of internal Xcode thing where assumptions are made, or how things are resolved in test targets or something... I'm not sure.In any case, I moved my Cartfile* down one deeper, into the project directory, and ran a
carthage update --platform iOSafter setting up the various project stuff correctly. And it all worked just wonderfully.A huge thank you for all the help you provided. It was, quite honestly, some of the best help I've ever received from the OSS community. You really went the extra distance. I wish I could give you some gold.
Cheers!