absolutePathForAppBundleWithIdentifier:
アプリケーションバンドルの絶対パスを返します
- (NSString *)absolutePathForAppBundleWithIdentifier:(NSString *)bundleIdentifier
func absolutePathForAppBundleWithIdentifier(_ bundleIdentifier: String) -> String?
解説
アプリケーションバンドルの絶対パスを返します。
返り値
メニュー
Objective-CNSString *String?
引数
info.plistのCFBundleIdentifierで定義された値
Objective-C(NSString *)bundleIdentifier_ bundleIdentifier: String
フレームワーク
ApplicationKit
クラス
NSWorkspace
使用可能
10.3
参照
更新時のバージョン
OS X 10.10.3
Swift1.2
例文
NSLog([[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:@"com.oomori.image"]);
//NSWorkspace absolutePathForAppBundleWithIdentifier @IBAction func function035(sender: AnyObject) { let theWorkspace : NSWorkspace = NSWorkspace.sharedWorkspace() NSLog("%@",theWorkspace.absolutePathForAppBundleWithIdentifier("com.apple.safari")! ) // -> /Applications/Safari.app }