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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:27:59+00:00 2026-06-19T00:27:59+00:00

[__NSArrayM relatedObjectDidChange]: unrecognized selector sent to instance error Class: NSInvalidArgumentException the crash report stackTrace:

  • 0
[__NSArrayM relatedObjectDidChange]: unrecognized selector sent to instance

error Class: NSInvalidArgumentException

the crash report stackTrace:

0 CoreFoundation 0x33d153e7 <redacted> + 162
1 libobjc.A.dylib 0x3ba06963 objc_exception_throw + 30
2 CoreFoundation 0x33d18f31 <redacted> + 0
3 CoreFoundation 0x33d1764d <redacted> + 392
4 CoreFoundation 0x33c6f208 _CF_forwarding_prep_0 + 24
5 EventKit 0x3440af03 <redacted> + 30
6 EventKit 0x34410225 <redacted> + 396
7 EventKit 0x34410095 <redacted> + 28
8 EventKit 0x3440d3fd <redacted> + 396
9 Calendar 0x000f10a5 -[createNewEventView editEvent:] + 1696
10 UIKit 0x35c0f087 <redacted> + 70
11 UIKit 0x35c0f111 <redacted> + 120
12 UIKit 0x35c0f087 <redacted> + 70
13 UIKit 0x35c0f03b <redacted> + 30
14 UIKit 0x35c0f015 <redacted> + 44
15 UIKit 0x35c0e8cb <redacted> + 502
16 UIKit 0x35c0edb9 <redacted> + 488
17 UIKit 0x35b375f9 <redacted> + 524
18 UIKit 0x35b248e1 <redacted> + 380
19 UIKit 0x35b241ef <redacted> + 6198
20 GraphicsServices 0x3783b5f7 <redacted> + 590
21 GraphicsServices 0x3783b227 <redacted> + 34
22 CoreFoundation 0x33cea3e7 <redacted> + 34
23 CoreFoundation 0x33cea38b <redacted> + 138
24 CoreFoundation 0x33ce920f <redacted> + 1382
25 CoreFoundation 0x33c5c23d CFRunLoopRunSpecific + 356
26 CoreFoundation 0x33c5c0c9 CFRunLoopRunInMode + 104
27 GraphicsServices 0x3783a33b GSEventRunModal + 74
28 UIKit 0x35b782b9 UIApplicationMain + 1120
29 Calendar 0x000a9bbf main + 66
30 Calendar 0x0003a600 start + 40

What does such error means, and what is the possibilities for such error?

My implementation of editEvent method:

-(void) editEvent:(EKSpan )span
{    
    EKEvent * newEditingEvent = self.EventToEdit;
    CalendarAppDataObject* theDataObject = [self theAppDataObject];
    if(eventCalendar != nil && theDataObject.selectedCalendarsForDisplayData != nil){

        NSArray *arrayDataUnarchiver =(NSArray *) [NSKeyedUnarchiver unarchiveObjectWithData:theDataObject.selectedCalendarsForDisplayData];
        NSMutableSet * uniqueId = [[NSMutableSet alloc ] initWithArray:arrayDataUnarchiver];
        [uniqueId addObject:eventCalendar.calendarIdentifier];

        NSArray * selectedCal = [uniqueId allObjects];

        NSData *arrayDataArchiver = [NSKeyedArchiver archivedDataWithRootObject:selectedCal];
        theDataObject.selectedCalendarsForDisplayData = arrayDataArchiver;
        //save selected to database

        NSError *error;
        self.managedObjectContext =  theDataObject.managedObjectContext;
        NSManagedObjectContext *context = [self managedObjectContext];
        // **** log objects currently in database ****
        // create fetch object, this objects fetch's the objects out of the database
        NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
        NSEntityDescription *entity = [NSEntityDescription entityForName:@"Settings" inManagedObjectContext:context];
        [fetchRequest setEntity:entity];


        NSArray *fetchedObjects= [context executeFetchRequest:fetchRequest error:&error] ;
        for (NSManagedObject *info in fetchedObjects)
        {
            [info setValue:arrayDataArchiver forKey:@"selectedCalendarsForDisplayData"] ;
        }

        //this is for comitting changes to core data
        [context save:&error];
        [fetchRequest release];
        [uniqueId release];
    }


    NSString * eventNotesString = @"";
    if(self.eventNotes != nil)
    {
        eventNotesString = self.eventNotes;
    }
    newEditingEvent.notes = [EventsDataUtil generateEventsNoteForSavingColor:eventNotesString colorToSave:self.eventBackColor];


    if(self.eventRecurrenceRule != nil)
    {
        NSArray * RecRulesArray = [[[NSArray alloc ] initWithObjects:self.eventRecurrenceRule, nil]autorelease];

        if(theDataObject.isRepeatChanged)
        {
            [newEditingEvent setRecurrenceRules:RecRulesArray];
        }

    }else
    {
        [newEditingEvent setRecurrenceRules:nil];
    }

    if([[ self.eventTitle stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] isEqualToString:@""])
    {
        self.eventTitle = @"New Event";

    }
    newEditingEvent.title = self.eventTitle;
    if(isLocationPhoneNumber)
    {
        NSString * PhoneLocationString = @"tel:";
        PhoneLocationString = [PhoneLocationString stringByAppendingFormat:@"%@", [self.contactPhoneNumber stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
        newEditingEvent.location = PhoneLocationString;
    }
    else
    {
        newEditingEvent.location = self.eventLocation;
    }


    newEditingEvent.startDate = self.eventStartDate;
    newEditingEvent.endDate =self.eventEndDate;
    newEditingEvent.allDay = self.eventAllDay;
    newEditingEvent.calendar = self.eventCalendar;
    newEditingEvent.URL = self.eventURL;
    // repeat and alert
    NSArray * Alarms = nil;
    if(self.eventAlert !=nil)
    {
        if(self.eventSecondAlert !=nil)
        {
            Alarms = [[[NSArray alloc] initWithObjects:self.eventAlert,self.eventSecondAlert, nil]autorelease];
        }
        else {
            Alarms = [[[NSArray alloc] initWithObjects:self.eventAlert, nil]autorelease];
        }

    }

    newEditingEvent.alarms = Alarms;


    NSError *err;
    [newEditingEvent setCalendar:self.eventCalendar];
    [sharedEventStore saveEvent:newEditingEvent span:span commit:YES error:&err];
    theDataObject.needUpdate = YES;
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    {
        [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissEventDetails" object:nil];
    }
    else{

        [self dismissViewControllerAnimated:YES completion:NULL];
    }


}
  • 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-19T00:28:00+00:00Added an answer on June 19, 2026 at 12:28 am

    The error report tells you everything you need to know:

    [__NSArrayM relatedObjectDidChange]: unrecognized selector sent to instance
    

    Which means that the NSArray class does not have a method called relatedObjectDidChange, so your code obviously calls this somewhere:

    [someArray relatedObjectDidChange];
    

    Without seeing your code, I cannot provide more help. I’d like to see this method:

    [createNewEventView editEvent:] 
    

    and the definition of that class

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

Sidebar

Related Questions

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM objectForKey:]: unrecognized selector sent to
What is __NSArrayI and __NSArrayM? __NSArrayI(or M) cause unrecognized selector error. How to convert
My test app loads a UITableView and crash caused by [1421:12503] *** -[__NSArrayM class]:
I got [NSArrayM release] message sent to deallocated instance error. However, the debugger hightlight
I don't know why this is happening, but I get this error: -[__NSArrayM section]:
I have a class, say the class Person. In than class I have several
App crashes with error: *** Terminating app due to uncaught exception 'NSGenericException', reason: '***
I am getting the following error please help me with a solution. My xcode
Why do I get a crash Terminating app due to uncaught exception 'NSRangeException', reason:
I'm having what seems to be a rather strange error when attempting to encode

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.