• 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: How to get PrivateFramework's URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get PrivateFramework's URL


  • Subject: Re: How to get PrivateFramework's URL
  • From: Noriaki Misawa <email@hidden>
  • Date: Mon, 24 Mar 2003 15:25:57 +0900

Thank you.
But I'm writing the Command Line Tool. So, I don't use Cocoa.

On 2003.3.18, at 14:48 Asia/Tokyo, Nick Zitzmann wrote:

On Monday, March 17, 2003, at 09:29 PM, Noriaki Misawa wrote:

I want to get a file in PrivateFramework.

It is System/Library/PrivateFrameworks/NetworkConfig.framework/Versions/A/ Resources/Japanese.lproj/PortNames.strings.

I want to read this file. How to get this URL?

Assuming you are using Cocoa, try something like this: (note - written in Mail, not tested, use at your own risk, etc.)

NSBundle *networkConfigBundle = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/ NetworkConfig.framework"];
NSString *pathToResource = [networkConfigBundle pathForResource:@"PortNames.strings"];
NSURL *urlToResource = [NSURL fileURLWithPath:pathToResource];

Then "urlToResource" should hold the URL to the file "PortNames.strings" on the user's system. This ought to return the user's localized PortNames.strings file...

Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page: http://dreamless.home.attbi.com/

Smile! It confuses people!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: How to get PrivateFramework's URL
      • From: Finlay Dobbie <email@hidden>
References: 
 >Re: How to get PrivateFramework's URL (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: ctrl- 'key' event to NSTask
  • Next by Date: Re: Relative file path
  • Previous by thread: Re: How to get PrivateFramework's URL
  • Next by thread: Re: How to get PrivateFramework's URL
  • Index(es):
    • Date
    • Thread