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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:21:49+00:00 2026-06-12T08:21:49+00:00

I have a webservice with the following structure. { media: { albums: [ {

  • 0

I have a webservice with the following structure.

{

    "media": {
        "albums": [
            {
                "name": "FC Bazel - KRC Genk",
                "date": "04.10.2012",
                "pictures": [
                    {
                        "url": "http://www.krcgenk.be/images/gallery/album_198/800X600/8162f172f8e5739c535c97b7bb6ca276.jpg"
                    },
                    {
                        "url": "http://www.krcgenk.be/images/gallery/album_198/800X600/5635d20351aacef78563dee347468227.jpg"
                    }
]

I am saving my Albums and Pictures in a separate entity in my core data database. I am getting the values the following.

+ (NSArray *)getAlbums
{
    NSString *request = [NSString stringWithFormat:@"http://www.krcgenk.be/mobile/json/request/media/type/ipad"];
    return [[self executeGenkFetch:request] valueForKeyPath:@"media.albums"];
}
+ (NSArray *)getPictures
{
    NSString *request = [NSString stringWithFormat:@"http://www.krcgenk.be/mobile/json/request/media/type/ipad"];
    return [[self executeGenkFetch:request] valueForKeyPath:@"media.albums.pictures"];
}

And I define the values like following.

#define ALBUMS_NAME @"name"
#define ALBUMS_DATE @"date"

#define PICTURES_URL @"pictures.url"

All things work great for albums. But when it tries to get the url in pictures, it crashes with the following error.

__NSArrayI objectForKey:]: unrecognized selector sent to instance 0xa48a460
2012-10-05 17:06:50.201 RacingGenk[97248:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI objectForKey:]: unrecognized selector sent to instance 0xa48a460

Can someone help?

Kind regards.

—–EDIT—-

+ (Picture *)pictureWithGenkInfo:(NSDictionary *)genkInfo
          inManagedObjectContext:(NSManagedObjectContext *)context
                     withAlbumId:(int)albumId
                   withPictureId:(int)pictureId;
{

    Picture *picture = nil;

    picture = [NSEntityDescription insertNewObjectForEntityForName:@"Picture"
                                          inManagedObjectContext:context];
    NSLog(@"methode komt tot hier");
    picture.url                     = [genkInfo objectForKey:PICTURES_URL];

return picture
}

‘

  • 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-12T08:21:50+00:00Added an answer on June 12, 2026 at 8:21 am

    You can get the albums with media.albums because albums is the value for the key “media”, but “pictures” is not the value of the key albums — the value is an array (hence your error message) of dictionaries. I don’t know if this will work, but you could try this:

    NSArray *arr = [[self executeGenkFetch:request] valueForKeyPath:@"media.albums"];
    return [[arr objectAtIndex:0] valueForKey:@"pictures"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WebService with following wsdl file: <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name=BBAppWebAccessService targetNamespace=com.test xmlns:ns1=http://schemas.xmlsoap.org/soap/http
I have the following project structure: base project (service layer, model) web project webservice
I have following scenario: alt text http://static.zooomr.com/images/7579022_e64808b855_o.png We have a WebService which poses as
I have to send the following data to webservice at URl The format of
I have the following Webservice: using (SqlCommand cmd = new SqlCommand(@"SELECT r.NAME, s.NAME FROM
I have a WCF webservice that has the following service contract [ServiceContract(Namespace = http://example.org)]
I have following webservice: [webmethod] public string MakeReservation(?? PassengersInfo)//what data type use for PassengerInfo
I have the following Webservice and SQL-Query: public class DIENSTLEISTUNG { public string DienstleistungName
I have come up with the following code to call a webservice using client/server
Having a deadlock in webservice + hibernate... No idea why. I have the following

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.