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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:02:48+00:00 2026-05-18T04:02:48+00:00

All this might look too trivial but read it through – I have simple

  • 0

All this might look too trivial but read it through –

I have simple class (A) and super class (B). I have init methods on both (designated initializer initWithData for A and regular (id)init for B) . I have a delegate defined on my super (B) which is called by [instanceofA setDelegate:self]. And of course I have following line of code – @interface A:B { //declarations }

So when I run my app on iphone simulator (Ver 3.2) the call to set Delegate the run fails with message “-[A setDelegate:]: unrecognized selector sent to instance 0x4c59e10” and therefore the app crashes

When I debug my app, the [super init] call within initializer for A doesn’t call its super i.e. B (even if I keep a debug pointer within B’s init method)

All this works absolutely fine if I run the app on my iPod (SDK 3.1.3) – even the debug points are hit

For some reason, at run time the simulator is not able to find class A’s super class that is B.

I have already tried resetting “Contents and Settings” on my iPhone Simulator but in-vain. I have also tried rebuilding multiple times, marked all my classes “touched”. Nothing is working. Is this issue with cleaning the existing targets? How do we clean targets in XCODE?

I am not sure if its relevant but slightly similar issue is under discussion here –
[http://stackoverflow.com/questions/3706068/app-crashes-on-simulator-works-on-iphone-device][1]

Update!

I know the problem – please ignore all the super int stuff above. The issue is with this message (which shows upfront on my debugger console – not as warning though) –

objc[34514]: Class Connection is implemented in both /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/System/Library/PrivateFrameworks/Message.framework/Message and /Users/admin1/Library/Application Support/iPhone Simulator/3.1.3/Applications/xxxyyyyzzzzbbbbb/MyApp.app/MyApp. One of the two will be used. Which one is undefined.

so i remove “messageUI.framework” and remove all my references to it in my code like MFMailComposeViewController, canSendMail etc. and everything is back to normal. I should have known, that was my last set of implementations. I wasn’t really doing any unit testing and therefore didn’t realize this when I started testing my app.

I googled ofcourse and bumped into following url – groups.google.com/group/objectiveresource/tree/browse_frm/month/2009-07/d8b3f3664c39785b?rnum=1&_done=%2Fgroup%2Fobjectiveresource%2Fbrowse_frm%2Fmonth%2F2009-07%3F

which links to –
groups.google.com/group/objectiveresource/browse_thread/thread/349756a5e01eb8b1/8712f5fde9e9b47c?lnk=gst&q=prefix#8712f5fde9e9b47c

What are class name related guidelines for objective C? Any online resource (apple/non apple) which talks about how to avoid class name collisions? For now I will try to figure out which class of mine is causing this conflict…

  • 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-18T04:02:49+00:00Added an answer on May 18, 2026 at 4:02 am

    In answer to your revised question, Objective-C lacks namespaces, which is why you see collisions like what happened in your case. This is why it is a convention to use two- or three-letter prefixes before your custom class names (something like SBHConnection would have avoided this problem in your case, for example).

    See the question “What is the best way to solve an Objective-C namespace collision?” for a detailed discussion about this, although that veers off into more technical territory. See Scott Stevenson’s Cocoa Style for Objective-C for a more down-to-earth explanation of some of the elements of style that you’ll commonly see in Cocoa and Cocoa Touch applications.

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

Sidebar

Related Questions

This might seem ridiculously simple, but I've been getting all kinds of error depending
This might be a stupid question but I'm new at all this. I want
This might be a way too generic question, but what is the general approach
I have this Panel with 2 PictureBoxs inside, they are both Anchored too all
I want to fix a file in past commit. This might affect all ascending
I am new to all this, but here goes: There is an apple file
Most of my classes have debug variables, and this makes them often look like
We have data that might look something like: A-10001 A-10002 A-10003 B-10001 B-10002 B-10003
All this originated from me poking at a compiler warning message (C4267) when attempting
What's all this business about Flash, Flex, Adobe Air, Java FX and Silverlight? Why

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.