Home‎ > ‎

Launch Servicesに登録方法

In such cases, the installer should call one of the Launch Services registration functions LSRegisterFSRef or LSRegisterURL to register the application explicitly.

例: アイテムをLaunchServicesに登録する
- (void)LSRegister:(NSString*)itemPath
{
     FSRef ref;
     if (FSPathMakeRef((const UInt8 *)[itemPath fileSystemRepresentation], &ref, NULL) == noErr)
    {
          LSRegisterFSRef(&ref,true);
     }
}

参照:http://developer.apple.com/DOCUMENTATION/Carbon/Conceptual/LaunchServicesConcepts/LSCConcepts/chapter_2_section_5.html#//apple_ref/doc/uid/TP30000999-CH202-BABEJFCD