본문 바로가기
프로그래밍 놀이터/iOS

[iOS] UILocalNotification 권한 요청하는 코드

by 돼지왕왕돼지 2018. 4. 5.

[iOS] UILocalNotification 권한 요청하는 코드


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)]){

        [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]];

    }

     ...

}




댓글0