Plastech
Plastech

Reputation: 791

Having trouble importing RegexKit into an Xcode 4 project

I am using XCode 4, trying to import the RegexKit framework into my project so that I can use regular expressions for some text parsing code. The framework is installed by default into the /Developer/Local/Frameworks folder, and I was able to import it into my project via Project > Build Phases > Link With Binary Libraries and Project > Build Phases > Copy Files (although I cannot drag the added framework into the frameworks folder or it breaks, yay XCode 4...).

The trouble is, now that I seem to have the framework imported, I cannot actually use it in my code. The import statement should be (according to the documentation)

#import <RegexKit/RegexKit.h>

but that code isn't auto-completing and is being flagged as a file not found error. When I begin typing that line, I do get an option to auto-complete

#import "RegexKit.h"

but it too gets a file not found error. What am I doing wrong, this is driving me nuts!?!?!

Upvotes: 0

Views: 523

Answers (1)

Plastech
Plastech

Reputation: 791

Okay, I solved it. It turns out that you have to add the framework to the testing target as well (yeah I left out some key info there, sorry. The file in question was actually a test case). I hope this helps someone!

Upvotes: 1

Related Questions