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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:53:19+00:00 2026-05-28T15:53:19+00:00

In my app iam using web view with URL:@http://www.gmail.com/. This web view was loaded

  • 0

In my app iam using web view with URL:@”http://www.gmail.com/”.

  • This web view was loaded when i clicked a button in the main page / home page

    (IBAction)webClick:(id)sender
     {
    MailViewController *mail = [[MailViewController alloc]initWithNibName:@"MailViewController" bundle:nil];
    [self.navigationController pushViewController:mail animated:YES];
    }
    
  • Then the web view was loaded, i used code like thin this in mail view:

    -(void)viewDidLoad
    
    {
        [super viewDidLoad];
        NSString *urlAddress = @"http://www.gmail.com/";
        NSURL *url = [NSURL URLWithString:urlAddress];
        NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
        [webView loadRequest:requestObj];
    }
    

Here the gmail opened with login page. we need to enter username & password.

What i want is,

  • if we already login into my account through gmail application..

    The loaded view directly loades my mail, instead of login page.

  • if i didn’t already loged in, then show an alert as please login.

How to do it?

Please help me.
Thanks in advance.

  • 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-28T15:53:19+00:00Added an answer on May 28, 2026 at 3:53 pm

    First of all, I think the URL you should be loading is http://mail.google.com/mail

    Other than that, you’re not getting normal gmail behavior because UIWebView does not save cookies between app runs, you should try something like this to save them:

    - (void)saveCookies
    {
        NSData         *cookiesData = [NSKeyedArchiver archivedDataWithRootObject: [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]];
        NSUserDefaults *defaults    = [NSUserDefaults standardUserDefaults];
        [defaults setObject: cookiesData forKey: @"cookies"];
        [defaults synchronize];
    }
    

    and load them back using this:

    - (void)loadCookies
    {
        NSArray             *cookies       = [NSKeyedUnarchiver unarchiveObjectWithData: [[NSUserDefaults standardUserDefaults] objectForKey: @"cookies"]];
        NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
    
        for (NSHTTPCookie *cookie in cookies)
        {
            [cookieStorage setCookie: cookie];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using primefaces library this is my jsp page source: <%@taglib uri=http://primefaces.prime.com.tr/ui prefix=p%>
greetings all i am using jsp as a view technology in my web app
I am using spring web mvc for my app's UI part.. By using following
I am using a xml web service on my web app and sometimes remote
I am using Apache Axis to connect my Java app to a web server.
I am using SQL Server with Entity Framework for a development of web app
I am writing a web app using TurboGears, and in that app the users
I am developing a web app using servlets and jsps. I have a question
I am developing a web app (using rails) that I will be launching within
I am planning a web app using GWT. How well will it be supported

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.