title: App crashes on simulator but runs fine on iPod 3.1.3. The Super class' init method is not being hit (even at debug) when app runs in simulator
body: <p>All this might look too trivial but read it through -</p>
  
  <p>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 - <code>@interface A:B { //declarations }</code></p>
  
  <p>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</p>
  
  <p>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)</p>
  
  <p><strong>All this works absolutely fine if I run the app on my iPod (SDK 3.1.3)</strong> - even the debug points are hit</p>
  
  <p>For some reason, at run time the simulator is not able to find class A's super class that is B.</p>
  
  <p>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?</p>
  
  <p>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]</p>
  
  <p><strong>Update!</strong></p>
  
  <p>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) - </p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>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.</p>
  
  <p>I googled ofcourse and bumped into following url - groups.google.com/group/objectiveresource/tree/browse_frm/month/2009-07/d8b3f3664c39785b?rnum=1&amp;_done=%2Fgroup%2Fobjectiveresource%2Fbrowse_frm%2Fmonth%2F2009-07%3F</p>
  
  <p>which links to -
  groups.google.com/group/objectiveresource/browse_thread/thread/349756a5e01eb8b1/8712f5fde9e9b47c?lnk=gst&amp;q=prefix#8712f5fde9e9b47c</p>
  
  <p>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... </p>