• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Debugger at odds with reality? [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugger at odds with reality? [SOLVED]


  • Subject: Re: Debugger at odds with reality? [SOLVED]
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 27 Apr 2008 13:43:52 -0700


On 2008 Apr, 27, at 2:47, Graham Cox wrote:

I'd still like to know more about how all this actually works - I feel I'm groping in the dark when things go wrong.

Graham, welcome to the apparently small club (about 3-4 oddballs) who care about what version and configuration of their private framework gets packaged or run. For more info, search xcode- email@hidden archives for past month or two. Here are a couple of interesting facts to get you started:


1. If you set a "Copy Files" Build phase to "Frameworks", Xcode will always copy the same Build Configuration regardless of which configuration you're building. I've found it to always copy Release, but someone else reported that it always copies Debug.

2. Say you set a private framework to build in the normal way, with Installation Directory = @executable_path/../Frameworks. In the app project, set the Build Configuration to Debug and Run in Xcode. The framework that gets run is apparently the one in your Builds directory, not the one in the app package. However, if you doubleclick the app's Debug build in Finder, it runs the one in the app package, which is what I expect it to do in any case. [1]

The second fact is possibly what is causing the problem you saw yesterday.

Consider putting some tattletale code such as the following in your framework. (Untested code composed in Mail.app)

Class class = ... ; // Some class defined in your framework
NSString *msg = [NSString stringWithFormat:
                  @"Class %@ was loaded from %@",
                  class,
                  [[NSBundle bundleForClass:class] bundlePath]] ;

NSLog(msg) ;

Anyhow this is more of an Xcode issue so I'd recommend that further discussion be done in email@hidden.

Jerry


[1] I discovered this by accident yesterday when I had implemented the same class in two private frameworks.


When running in Xcode, I get this message in the Xcode console:

Class SSLocalizeBundleGetter is implemented in both /Users/jk/ Documents/Programming/Builds/Debug/SSSQLiter.framework/Versions/A/ SSSQLiter and /Users/jk/Documents/Programming/Builds/Debug/ SSLocalize.framework/Versions/A/SSLocalize. Using implementation from / Users/jk/Documents/Programming/Builds/Debug/SSLocalize.framework/ Versions/A/SSLocalize.

But upon doubleclicking that same build in Finder, I get this message in Console.app:

Class SSLocalizeBundleGetter is implemented in both /Users/jk/ Documents/Programming/Builds/Debug/MyApp.app/Contents/MacOS/../ Frameworks/SSSQLiter.framework/Versions/A/SSSQLiter and /Users/jk/ Documents/Programming/Builds/Debug/MyApp.app/Contents/MacOS/../ Frameworks/SSLocalize.framework/Versions/A/SSLocalize. Using implementation from /Users/jk/Documents/Programming/Builds/Debug/ MyApp.app/Contents/MacOS/../Frameworks/SSLocalize.framework/Versions/A/ SSLocalize. _______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Debugger at odds with reality? [SOLVED]
      • From: Chris Hanson <email@hidden>
References: 
 >Debugger at odds with reality? (From: Graham Cox <email@hidden>)
 >Re: Debugger at odds with reality? (From: Colin Cornaby <email@hidden>)
 >Re: Debugger at odds with reality? [SOLVED] (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: How to use bindings with IKImageBrowserView?
  • Next by Date: Re: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?
  • Previous by thread: Re: Debugger at odds with reality? [SOLVED]
  • Next by thread: Re: Debugger at odds with reality? [SOLVED]
  • Index(es):
    • Date
    • Thread