Install Plugin From App Bundle
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.