macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

launchedApplications

現在起動中のアプリケーションの情報を返します

解説

現在起動中のアプリケーションの情報を返します。

返り値

( NSArray * )

メニュー

引数

フレームワーク

ApplicationKit

クラス

NSWorkspace

Instance Methods

使用可能

10.2

参照

-activeApplication

例文

#import "SetImage.h"

@implementation SetImage

- (IBAction)set:(id)sender
{
NSArray *launchedApplications = [[NSWorkspace sharedWorkspace] launchedApplications];
NSLog([launchedApplications description]);
}

@end