• 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
Install Plugin From App Bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Install Plugin From App Bundle


  • Subject: Install Plugin From App Bundle
  • From: "Ian G. Gillespie" <email@hidden>
  • Date: Sun, 2 May 2004 11:11:39 -0700

Hi All,

I am probably missing the obvious, forgive me if I am. I want my
application to install a contextual menu item plugin from my
applications bundle when it is first launched. For some reason,
NSFileManagers copyPath toPath keeps returning no. Here is my code:

if(![self createContextualMenuPathIfNeeded])
NSLog(@"Couldn't create path to install contextual menu item");

NSString *installPath = @"~/Library/Contextual Menu Items";

installPath = [installPath stringByExpandingTildeInPath];
NSString *path = [[NSBundle mainBundle] pathForResource:@"MyCMPlugin"
ofType:@"plugin"];

if(![[NSFileManager defaultManager] copyPath:path toPath:installPath
handler:nil])
NSLog(@"Couldn't install contextual menu plugin");

The plugin is in the bundle and the "Contextual Menu Items" is created,
by the copy doesn't work. Anyone see what I am missing?

Regards,
Ian
_______________________________________________
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: Install Plugin From App Bundle
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Recent Items in the Finder
  • Next by Date: RE: Text message
  • Previous by thread: Re: Recent Items in the Finder
  • Next by thread: Re: Install Plugin From App Bundle
  • Index(es):
    • Date
    • Thread