<commit_before>extern "C"{
    void CleanIconBadge_();
    void OpenAppSetting_();
    bool IsNotificationPermitted_();
}

// Clean app icon badge
void CleanIconBadge_(){
    [UIApplication sharedApplication].applicationIconBadgeNumber = -1;
}

// Open app settings (more than ios8.0)
void OpenAppSetting_(){
    float iOSVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
    if(iOSVersion >= 8.0){
        NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
        [[UIApplication sharedApplication] openURL:url];
    }
}

// Check if notification is permitted by user (Always return true if version is less than 8.0)
bool IsNotificationPermitted_(){
    float iOSVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
    if(iOSVersion < 8.0){
        return true;
    }
    return [[UIApplication sharedApplication] isRegisteredForRemoteNotifications];
}<commit_msg>Edit ios plugin notification permitted func<commit_after>extern "C"{
    void CleanIconBadge_();
    void OpenAppSetting_();
    bool IsNotificationPermitted_();
}

// Clean app icon badge
void CleanIconBadge_(){
    [UIApplication sharedApplication].applicationIconBadgeNumber = -1;
}

// Open app settings (more than ios8.0)
void OpenAppSetting_(){
    float iOSVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
    if(iOSVersion >= 8.0){
        NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
        [[UIApplication sharedApplication] openURL:url];
    }
}

// Check if notification is permitted by user (Always return true if version is less than 8.0)
bool IsNotificationPermitted_(){
    float iOSVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
    if(iOSVersion < 8.0){
        return true;
    }
    UIUserNotificationSettings *settings = [[UIApplication sharedApplication] currentUserNotificationSettings];
    return settings.types != 0;
}
{'fraction_non_alphanumeric': 0.10005211047420531, 'fraction_numerical': 0.009900990099009901, 'mean_word_length': 4.408450704225352, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3436425', 'n_tokens_mistral': 548, 'n_tokens_neox': 529, 'n_words': 153}