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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:07:22+00:00 2026-06-17T06:07:22+00:00

I have been bothered by this problem for a long time. I have a

  • 0

I have been bothered by this problem for a long time.

I have a NSString which is the received from a RSS parser, I can successfully NSlog it on the screen, but when I try to append it to an existing NSmutablearray, it causes exception.

Here is my code.

//mystring is a NSMutableString with some content initialized succesfully

NSString *myDate = [dic objectForKey:@"date"];
NSLog(@"%@ and %@",myString,myDate);
[myString appendString:myDate];

until the NSLog, both myDate and myString are printed on screen correctly as I desire, but the appendString line causes error

[_NSDate length]: unrecognized selector sent to instance 0*7141a00
Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reasons: ‘-[__NSDate length]: ……….

Could someone please help me?

  • 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-17T06:07:24+00:00Added an answer on June 17, 2026 at 6:07 am

    You’re calling -appendString: with myDate, which isn’t a string. It’s an NSDate. You can’t pass it to an API that expects a string. You need to convert it into a string somehow. This is probably best done using NSDateFormatter, which gives you full control over how to format your date as a string.

    For testing purposes though, you can just replace your last line with [myString appendString:[myDate description]] and it should stop crashing.

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

Sidebar

Related Questions

From searching I can see this has been asked time and time again, but
I have been annoyed and bothered by this problem for a while and finally
have been sitting with this problem for a few days and really can't seem
I have been bothered for so long by the MySQL injections and was thinking
I need help remembering what book I read this from, It might have been
Have been trying to figure this problem out for a while now and was
This has bothered me for awhile. The way I've been renaming columns that have
Have been struggling with this for a while, and can never seem to get
Have been working on this question for a couple hours and have come close
I have been using TortoiseSVN for some time and I really like it. 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.