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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:19:52+00:00 2026-05-17T16:19:52+00:00

I have an NSURL which contains a URL and a variable that is an

  • 0

I have an NSURL which contains a URL and a variable that is an NSDate:

NSURL *url = [[[NSURL alloc] initWithString:[NSString stringWithFormat:@"http://www.googlebio.com/xml_test.aspx?date=%@",self.storeDate]] autorelease];

I also tried it this way but to no avail:

NSString*string = [NSString stringWithFormat:@"http://www.googlebio.com/xml_test.aspx?date=%@",self.storeDate];

    NSURL*url=[NSURL URLWithString:string];
    [url autorelease];

The application does not crash but when I debug it, url is nil.

Any ideas as to why this is?

Thanks.

Stefan.

  • 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-17T16:19:52+00:00Added an answer on May 17, 2026 at 4:19 pm

    If your date is in a format that NSURL will be confused by, then it will be nil. Make sure you urlencode your date, or represent it in a way that is a legitimate URL. Look into this:

    [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
    

    Perhaps if you put a debug statement of your url string, I can help further

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

Sidebar

Related Questions

I have a string variable tmpImgURLStr which contains URL like www.abc.com/img.png . i want
So I have the following code: NSURL *baseURL = [NSURL URLWithString:@http://www.baseurltoanxmlpage.com]; NSURL *url =
Hi there I have this code NSLog(@%@,URLRequestQueryString); NSString *sendToServerString = [NSString stringWithFormat:@http://mydomain.co.uk/req.php%@,URLRequestQueryString]; NSURL *sendToServer
I have a PLIST which contains 3 Dictionarys inside. http://dl.dropbox.com/u/9358444/auto1.plist I try to load
I have an XML reader class which I initialize with a URL - (id)initWithURL:(NSURL
I have a variable called storedURL which is in the format www.xxxxx.com . I
I have a url which contain image address, i want to load that image
I have an NSString containing a url and when I allocate NSURL with the
I have a serious long else if statement which contains some links and some
I have an NSURL object which gets data from my site, based on a

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.