Push Notifications FAQ and troubleshooting

If you are having issues with Push Notifications, please make sure you have   setup your profiles correctly. 99% of the time the problem on iOS is with incorrectly setup certificates or keys. Please go over the documentation again and make sure you didn't miss anything.

You can view error logs for your notifications on your app dashboard under the General tab.  Scroll down to "Logs" and take a look. If you see error messages and you don't know what they mean, please copy/paste them into a  support email and we will help you.

Publish Changes

If you change the notification profiles, click the "Publish Changes" button in the app customizer, then open/close the app twice. That will tell the app to resubscribe for push.

Test Sending to Specific Devices

This bit of code will help you test sending to specific devices. It can be activated as a plugin, then send a test push by visiting yoursite.com?appp-test-push=true&recipient=123

The recipient should be the user ID of someone who is registered to receive push notifications, and has logged into the app.

<?php
/*
Plugin Name: Appp Test Push
Plugin URI: http://apppresser.com
Description: Test Push Notification for AppPresser. Test it by https://xyz.com/?appp-test-push=true&recipient=45
Text Domain: apppresser
Domain Path: /languages
Version: 1.0.0
Author: AppPresser Team
Author URI: http://apppresser.com
License: GPLv2
*/

add_action( 'init', 'dummy_test_push' );

function dummy_test_push(){
    
    if( false == ( isset($_GET) && isset( $_GET['appp-test-push'] ) && $_GET['appp-test-push'] == 'true' && $_GET['recipient'] ) ){
        return;
    }

    if( !class_exists( 'AppPresser_Notifications' ) ){
        return;
    }


$current_user = get_current_user_id();
	echo "Current user is $current_user <hr>";

    
    $_recipients = ( isset( $_GET['recipient'] ) && !empty( $_GET['recipient'] ) ) ? intval( $_GET['recipient'] ) : 0;
    
    if( 0 == $_recipients ){
        return;
    }

    $recipients = array( $_recipients );
	$message = 'Hi there!';      
	$push = new AppPresser_Notifications_Update();     
	$devices = $push->get_devices_by_user_id( $recipients );      
	if( $devices ) {        
		$push->notification_send( 'now', $message, 1, $devices );     
    } 
    
    echo "<pre>";
    print_r( $devices );
    echo "</pre>";
    die();
		
}

If you are still having issues, please  contact support.