macOS/iOS API解説

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

目次

registerForRemoteNotificationTypes:

レシーバーにアップルプッシュサービスを通して指定されたタイプの通知を登録します
-(void)registerForRemoteNotificationTypes:(UIRemoteNotificationType)types

解説

レシーバーにアップルプッシュサービスを通して指定されたタイプの通知を登録します

返り値

( void )

引数

( UIRemoteNotificationType )types

通知タイプ
UIRemoteNotificationTypeNone
UIRemoteNotificationTypeBadge
UIRemoteNotificationTypeSound
UIRemoteNotificationTypeAlert

クラス

UIApplication

Instance Methods

使用可能

iPhone2.0

参照

例文

- (void)applicationDidFinishLaunching:(UIApplication *)application {
	
	// Configure and show the window
	
	[window addSubview:[navigationController view]];
	[window makeKeyAndVisible];
	
	[application registerForRemoteNotificationTypes: UIRemoteNotificationTypeAlert];
	

	
	NSLog(@"%@",[[application keyWindow] description]);
}