Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6637155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:16:41+00:00 2026-05-25T23:16:41+00:00

I was following the steps here: http://matt.might.net/articles/how-to-native-iphone-ipad-apps-in-javascript/ Here are the bare bones steps to

  • 0

I was following the steps here: http://matt.might.net/articles/how-to-native-iphone-ipad-apps-in-javascript/

Here are the bare bones steps to turning a web app into a native app:

  1. Open XCode.
  2. Create a new “View-based Application” iPhone project.
  3. Move the files for your web app into the Resources folder in XCode,
    but strip out the cache manifest. (You don’t want the manifest
    screwing things up, since everything is now local.)
  4. Create a new instance variable, webView, inside the @interface
    ViewController header file: IBOutlet UIWebView* webView ; //
    IBOutlet means it’s visible to Interface Builder.
  5. and create a property: @property (nonatomic, retain) UIWebView
    *webView;

Here is what I have thus far (ViewController.h):

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController

    IBOutlet UIWebView* webView;

@property (nonatomic, retain) UIWebView *webView;
@end

However on step 4 I am getting two errors in my ViewController header file:

enter image description here

“cannot declare variable inside @interface or @protocol”

and

“iboutlet attribute can only be applied to instance variables or
properties”

So what am I doing wrong, or is that website tutorial wrong?

Note: I downloaded the sample project he had for iPhone and it worked, but I am following the tutorial so I can make an iPad version.

I am in XCode 4 and the error shows whether I do iOS 5 or iOS 4.3 doesn’t seem to make a difference.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:16:42+00:00Added an answer on May 25, 2026 at 11:16 pm

    You’re missing a couple of curly braces there:

    #import <UIKit/UIKit.h>
    
    @interface ViewController : UIViewController {
        UIWebView *webView;
    }
    
    @property (nonatomic, retain) IBOutlet UIWebView *webView;
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I am following this guide: http://technotes.1000lines.net/?p=23 and I am going through the steps.
I am following the steps listed here: http://msdn.microsoft.com/en-us/library/dd483478.aspx at the bottom of that page
I am following the steps listed here: http://developer.android.com/guide/developing/device.html . I'm using eclipse 3.6 (It
ok, I've been following: http://railscasts.com/episodes/196-nested-model-form-part-1 Here are the steps I've had to accomplish so
I am following the steps given here http://wordpressthemescollection.com/simple-modal-google-map-easy-modal-map-boxes-with-jquery-752.html to display a Google map in
I'm trying set up an execution account following the steps here: http://msdn.microsoft.com/en-us/library/ms156302.aspx I follow
I'm trying to get started with spine.js following the steps here: http://spinejs.com/docs/started When i
I have downloaded the Android source code by following the steps given here http://source.android.com/source/downloading.html
I am following the tutorial here: http://www.aspfree.com/c/a/XML/Applying-XSLT-to-XML-Using-ASP.NET/2/ The tutorial shows how one converts xml
I've implemented a custom sort for a aspxgridview, following the steps mentioned here: http://documentation.devexpress.com/#AspNet/CustomDocument3818

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.