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

  • Home
  • SEARCH
  • 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 8991193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:40:18+00:00 2026-06-15T22:40:18+00:00

One of the functions of an app I am making involves logging the user

  • 0

One of the functions of an app I am making involves logging the user into our Campus Portal website. For ease of use, the user may enter a username and password into the app once, and it will be saved for all future log-ins. When the user clicks a button, the information will automatically be sent to log in, and the website will be displayed in a UIWebView.

Let us say that the username and password are each stored in an NSString. How can I use this data to log in to this website programmatically and display the page it in a UIWebView?

I know little about posting and forms, so any help is appreciated.

Would something like this Stackoverflow answer help?

Here’s the shell of my code for this

- (IBAction)btnGo:(id)sender {
    username = usernameField.text;
    password = passwordField.text;
    if (saveSwitch.isOn) {
        //Save data if the user wants
        AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
        usernameSaved = username;
        passwordSaved = password;
        [appDelegate.listOfPortalCredentials replaceObjectAtIndex:0 withObject:usernameSaved];
        [appDelegate.listOfPortalCredentials replaceObjectAtIndex:1 withObject:passwordSaved];
    }
    //Insert username and password to web form, log in to portal
    //This is where I need help
}

Edit:

Thanks to Karthik I was able to find the HTTP Post using Firebug. It gave me:

appName=ridgefield&portalUrl=portal%2Fridgefield.jsp%3F%26rID%3D0.18423783694092&username=<username>&password=<password>&B1=Log+In&url=portal%2Fmain.xsl%3FrID%3D0.6845596700302482&lang=en

where and represent the real username and password. I believe this is what I need. Using this, how can I display the logged-in page in a UIWebView? Do I just need to load the above URL in the UIWebView?

  • 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-06-15T22:40:19+00:00Added an answer on June 15, 2026 at 10:40 pm

    Use UIWebView, and do a http POST to https://ic.ridgefield.org/campus/verify.jsp with username and password.

    To understand how it works, install Firebug on Firefox browser and go to ‘Net’ tab on firebug, and then open your website and enter some username/password.

    You should mimic that action using code. (I always get invalid username or password response from server, coz i dont have an account and i try some random ones, and since there is no signup on the site, there is no way for me to verify this)

    UIWebView* webView = [[UIWebView alloc] initWithFrame:self.view.frame];
    [self.view addSubview:webView];
    
    NSString* username = @"";
    NSString* password = @"";
    
    NSURL* url = [NSURL URLWithString:@"https://ic.ridgefield.org/campus/verify.jsp"];
    
    NSString* body = [NSString stringWithFormat:@"appName=ridgefield&username=%@&password=%@", username, password];
    NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:30];
    request.HTTPMethod = @"POST";
    request.HTTPBody = [body dataUsingEncoding:NSStringEncodingConversionAllowLossy];
    
    [webView loadRequest:request];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a website to use as a social marketing app. The idea is
I am creating an Image Processing app that does two image analysis functions. One
User Defined Function (UDFs) are functions that one can program and can be dynamically
I got a Windows Forms app making use of Google Earth where users can
I'm making an App with Titanium Studio, and tried to use a webView and
I am making an app that lets the user draw on the screen in
I am making an app that allows the user to draw on the screen
I've got a Blackberry app (5.0 and above) that I'm making changes to. One
I'm making a small web app in which a user enters a server URL
I am making an app in ruby on rails and this is one of

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.