Rob, how, exactly, would Alex do that such that all objects inheriting from 
NSObject will automatically have the implementation, which seems to be the goal?

The issue with .pch, as I understand it, is that Xcode wants to get away from 
using precompiled headers, and there are various philosophical and practical 
reasons for doing so, which you can google on. Further, .pch files are not 
intended to be a global import, although that is what many developers 
(including myself) have used them for.

In your case you can simply put the import in a place that you know will be 
loaded first, such as your App delegate class.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

> On Feb 19, 2019, at 2:37 PM, Rob Petrovec <petr...@mac.com> wrote:
> 
> Why not use/override -description or -debugDescription instead of 
> re-inventing the wheel?
> 
> —Rob
> 
>> On Feb 19, 2019, at 2:23 PM, Alex Zavatone <z...@mac.com> wrote:
>> 
>> Sorry.  Second try.
>> 
>> In most Objective-C projects I add an autodescribe category on NSObject and 
>> put the import for the category header into a .pch for the project so that 
>> it will be available for every class in the project.
>> 
>> This lets me dump an object’s properties and values at Will in the debugger.
>> 
>> Is there a more modern way to do this than using a .pch?
>> 
>> I’ll also be adding one for Swift and am interested in approaches for both.  
>> 
>> Put the import in Settings.xcconfig files?
>> 
>> Thanks in advance
>> 
>> Sent from my iPhone
>> 
>>> On Feb 19, 2019, at 3:15 PM, Alex Zavatone <z...@mac.com> wrote:
>>> 
>>> In most Objective-C projects I add an autodescribe category and put the
>> 
>> _______________________________________________
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
>> 
>> This email sent to petr...@mac.com
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev%40esoteritech.com
> 
> This email sent to cocoa-...@esoteritech.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to