Re: Getting Computer Name
Re: Getting Computer Name
On 20 Jun 2010, at 11:10, Steve Steinitz wrote:
>
>
> According to the docs CFStringRef is toll-free-bridged with NSString and so interchangeable. The authors of the examples cite no issues. Could I have done something to my project to break toll-free bridging? I confess, I haven't thought about toll-free bridging since the WebObjects days.
>
You can't break toll free bridging.
The NSObject and CF type collaborate to route objects and function calls appropriately.
The following works for me:
NSString *name = NSMakeCollectable(SCDynamicStoreCopyLocalHostName(NULL));
You may have retain issues with your logging call.
Jonathan Mitchell_______________________________________________
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