Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to check user current notification setting in objective C

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 580
    Comment on it

    hello friends , You can check user's current notification setting by following line of codes.

    // this method is deprecated in iOS 8.0

    UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
    
    if (type == UIUserNotificationTypeNone){
       // do code here 
    }
    

    // you can use this method instead

    UIUserNotificationSettings *type = [[UIApplication sharedApplication]currentUserNotificationSettings];
         if (type == UIUserNotificationTypeNone)
        {
    
           //do code here
        }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: