• 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: Getting Computer Name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Computer Name


  • Subject: Re: Getting Computer Name
  • From: "email@hidden" <email@hidden>
  • Date: Sun, 20 Jun 2010 11:28:13 +0100

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

References: 
 >Getting Computer Name (From: Steve Steinitz <email@hidden>)

  • Prev by Date: Re: Getting Computer Name
  • Next by Date: Re: Getting Computer Name
  • Previous by thread: Re: Getting Computer Name
  • Next by thread: Re: Getting Computer Name
  • Index(es):
    • Date
    • Thread