square/KIF — Issue #81: Autocomplete not working for KIF-related methods
Author: clozach
Created: 2011-10-13 20:11:58+00:00
State: open

In Xcode 4, autocomplete seems to fail frequently with KIF-related methods. As far as I can tell, I've set up my project exactly as described in the README†. Syntax coloring works just fine, and tests compile and run as expected. I simply can't get autocomplete to recognize methods from the KIF headers. (KIF class names autocomplete just fine.)

I've found this to be the case both in my own project (set up per the README with a successfully running test), and in the "Testable" sample project.

Here's a specific example. My KIFTestController subclass header, EDTestController.h:

#import
#import "KIFTestController.h"

@interface EDTestController : KIFTestController {
}

@end

EDTestController.m

#import "EDTestController.h"
#import "KIFTestScenario+EDAdditions.h"

@implementation EDTestController

- (void)initializeScenarios;
{
[self addScenario:[KIFTestScenario scenarioToTestKIFIsWorking]]; // Syntax coloring & functionality works fine

[self addSc // <<< Hitting 'esc' here shows "No completions"
}

@end

† The README seems to offer conflicting instructions regarding Header Search Paths...could this be the source of the problem? Specifically, the text says, "To do this, add the KIF directory to the "Header Search Paths" build setting. Start by selecting the "Build Settings" tab of the project settings,..." which seems to imply that the _project_ should be selected, not the Integration Tests _target_. Meanwhile, the screenshot shows the Integration Tests _target_ selected, rather than the Testable _project_. I followed the screenshot.