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 6651171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:58:45+00:00 2026-05-26T00:58:45+00:00

I need to know how to have an iphone app do nothing but open

  • 0

I need to know how to have an iphone app do nothing but open the web browser as soon as it starts. I know the code needed to open a broswer.. its

    NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
    [[UIApplication sharedApplication] openURL:url];

My problem is I don’t know where to put this code. Ive tried putting it in main.m but it either errors or does nothing. I’d like to avoid needing to use a button. I’d prefer it be automatic as soon as the app is launched. I also need to image this to a HDMI TV and once again, I know the code for this.. I just don’t know where it should be put, as I also want it to begin as soon as the app is started.

Thanks.

  • 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-26T00:58:45+00:00Added an answer on May 26, 2026 at 12:58 am

    If you plan to submit this app to the App Store I’ve got bad news for you, Apple will reject your app if all it does is open a website.

    But back to your question place the code in app delegate:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
        [[UIApplication sharedApplication] openURL:url];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DropDownList and need to know its name in the code behind:
I want to ship my iPhone app with some preferences but I don't need
I have an iphone app, with a view (well multiple but let's say one
I have an iPhone app using Core Data, but I can't seem to figure
I know nothing about PHP, but in my application I need to implement user
Sorry but I found no clear answer on that. I have an iphone app
I need to know because I have to explicitly close some remote resources that
I need to know which views does a user have which privileges on. I'm
If you have a situation where you need to know where a boolean value
I need to know if all the client-side validator checks have succeeded, or if

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.