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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:34:56+00:00 2026-05-28T05:34:56+00:00

I just upgraded to the new Xcode 4.2 and am having problems with loading

  • 0

I just upgraded to the new Xcode 4.2 and am having problems with loading map annotations from my plist. I need to have the plist on a URL to update regularly.

I had no problems with the older version of Xcode, but am now getting a ARC error and

Receiver type ‘MapAnnotations’ for instance message does not declare a method with selector ‘initWithDictionary’.

Any help is greatly appreciated. Thank you in advance.

MapAnnotations.m code

-(id)initWithDictionary:(NSDictionary *)dict {
self = [super init];
if (self!=nil) {
    coordinate.latitude = [[dict objectForKey:@"latitude"] doubleValue];
    coordinate.longitude = [[dict objectForKey:@"longitude"] doubleValue];
    self.title = [dict objectForKey:@"name"];
    self.subtitle = [dict objectForKey:@"subtitle"];
    self.pin = [dict objectForKey:@"pin"];
}
return self;

}

section in Mapview.M

NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"Locations" ofType:@"plist"];
NSArray *array = [[NSArray alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.MyPlist.plist"]];

if (array) {
    NSDictionary* myDict = [NSMutableDictionary dictionaryWithCapacity:[array count]];
    for (NSDictionary* dict in array) {
        MapAnnotations* annotation = [[MapAnnotations alloc]iniWithDictionary:dict];
        [mapview addAnnotation:annotation];
    }
    NSLog(@"The count: %i", [myDict count]);
}

else {
    NSLog(@"Plist does not exist");
}
  • 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-28T05:34:57+00:00Added an answer on May 28, 2026 at 5:34 am

    This error:

    Receiver type ‘MapAnnotations’ for instance message does not declare a method with selector ‘initWithDictionary’

    means the initWithDictionary method hasn’t been declared in MapAnnotations.h. In the older Xcode, I think this only resulted in a warning.

    In MapAnnotations.h, declare the method:

    @interface MapAnnotations : NSObject<MKAnnotation>
    
    //any ivars, properties, and other method declarations here
    
    -(id)initWithDictionary:(NSDictionary *)dict;  // <-- add this
    
    @end
    

    By the way, I assume this line is just a typo in your question:

    MapAnnotations* annotation = [[MapAnnotations alloc]iniWithDictionary:dict];
    

    It should say initWithDictionary (not iniWithDictionary).

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

Sidebar

Related Questions

I have just upgraded to WebSphere 7 (from 6.1), and I am having new
I just upgraded to the latest 4.3 Xcode. I have my plist.which is preprocessed
I just upgraded to Snow Leopard, including installing the new XCode, re-compiled Ruby 1.8
I have just upgraded to Rails 3.1, and I am having an issue with
I have just upgraded our company's domain controller from NT 4.0 to Windows 2008
I have just upgraded a solution with two web deployment projects from VS 2008
I just upgraded to the new Xcode a few days ago, and wow has
I just upgraded to Xcode 4, deleted the OpenFeint folder and added the new
I am trying to learn iphone programming and I have just upgraded xcode to
I have just upgraded from php 5.1 to 5.3 and had previously been using

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.