views:

1427

answers:

1

Hi all, I'm very new to XCode so please excuse my ignorance. I've spent a day now trying to figure out what I'm doing wrong, following several tutorials.

I've got a iPhone/Window project setup in XCode. I've got a UITabBar and a UIWebView, when a tab is selected the UIWebView navigates to a particular URL and everything is working great.

I'd like to be able to embed jQuery (any JS library really) into my app so it can be loaded at runtime thus reducing load times by having to load the library over the network connection.

So from what I've read it's possible to do this by implementing the WebFrameLoadDelegate Protocol, which you can get from the WebKit framework. No problem however, after adding and removing the framework (from /System/Library/Frameworks/WebKit.framework) everything builds fine except for my header inclusion:

#import <WebKit/WebKit.h>

error: WebKit/WebKit.h: No such file or directory.

I'm convinced I'm simply missing some trivial step and I'm at a wall, any thoughts?

Thanks again for any help!

A: 

You have a space in the name of the header file, so the compiler looks for a file called " WebKit/WebKit.h". Remove that space so that the line looks like this:

#import <WebKit/WebKit.h>

Edit: having looked at the iPhoneOS3.0 SDK, there is no WebKit.framework on the iPhone. /System/Library/Frameworks/WebKit.framework is part of Mac OS X. You need to find a way to do what you're trying using the iPhone SDK.

Graham Lee
no sorry, I added those spaces in the post only because it was displaying strange when typed directly like that. I fixed it now.
dtrocchio
I was afraid of this. Thank you for confirming it.
dtrocchio