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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:29:28+00:00 2026-05-19T11:29:28+00:00

In viewDidLoad, I have: NSArray *selectedPeople = [[selectedObject people] allObjects]; NSArray *peeps = [[NSArray

  • 0

In viewDidLoad, I have:

NSArray *selectedPeople = [[selectedObject people] allObjects];
NSArray *peeps = [[NSArray alloc] initWithArray:selectedPeople];

This works just fine, but when I use an NSArray that was declared in my properties it doesn’t:

NSArray *selectedPeople = [[selectedObject people] allObjects];
people = [[NSArray alloc] initWithArray:selectedPeople];

The program crashes and says that:

[People isEqualToString:]: unrecognized selector sent to instance 0x6031910

I’m using CoreData and selectedPeople holds People objects. I’m not sure what I’m missing here.

  • 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-19T11:29:29+00:00Added an answer on May 19, 2026 at 11:29 am

    I’m pretty sure Core Data setters for a collection of objects take a set and not an array.

    You could try the following:

    self.people = [[NSSet setWithArray:selectedPeople];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my view controller's -viewDidLoad method, I call [myTextField becomeFirstResponder]; This works like a
This is probably obvious, but I'm a bit of a newbie and have spent
So, i have a view controller which contains just a scroll view. In viewDidLoad,
I have the following loop in my viewDidLoad: for(int i=1; i<[eventsArray count]; i++) {
I have 2 arrays, 1 in the viewDidLoad method and 1 in the add
I have a property that changes to invalid as I move between viewDidLoad and
I have created 5 NSDictionary's. I stored them in NSArray. I need to get
I have this huge problem with memory management. The problem : I've got a
I am new to ObC and have a problem that i just cant fix.
I have a class which is responsible and the owner of building my model

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.