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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:55:46+00:00 2026-06-12T18:55:46+00:00

I use [webView shouldStartLoadWithRequest: navigationType:] to control the user navigation in a UIWebView. I

  • 0

I use [webView shouldStartLoadWithRequest: navigationType:] to control the user navigation in a UIWebView. I was comparing the string with “isEqualToString” method like:

NSString *requestString = [[request URL] absoluteString];
if ([requestString isEqualToString:@"http://www.myComapnyWeb.com"])  return YES;
else return NO;

When the device was in IOS 4.3 this was working fine. Once the device got upgraded to IOS 5, (5.1.1 exactly), the above logic failed. With some NSLog, I noticed that the URL is returned all in lower case, (mycompanyweb instead of myCompanyWeb) and hence the above string comparison fails.

I can fix it by changing the comparison with lowercaseString method. Want to find out if anyone else experienced this. Any other solution? And in future, do we need to expect such changes?

  • 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-12T18:55:47+00:00Added an answer on June 12, 2026 at 6:55 pm

    Try:

    NSString *requestString = [request.URL absoluteString];
    

    That should give you the correct case.

    I tested in Xcode version 4.5

    As far as “expecting such changes”, it’s always possible they will make changes. Sometimes it’s for the better, and sometimes……. =)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the webView:shouldStartLoadWithRequest:navigationType method to call my Objective-C code from JavaScript which works
I use WebView + addJavascriptInterface to control my app from html page shown in
I know how to use UIWebView and can invoke a WebView if it is
I want to use WebView, in order to show some paragraphs to user. In
My app use a UIWebView to load a website and download file when user
I'd like to use a WebView for displaying images potentially big (in order to
I make call from my app with this code (i use webview because after
I wondering whether use a webView to create a complex text area done with
In my application I use only WebView for loading index.html where running all app
I'm trying to use a Webview for a Google TV app. The problem I

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.