Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

assertion failed: 12B440: libxpc.dylib + 71820 [A4F17798-F3DE-3FBC-85E3-F569762F0EB9]: 0x7d

$
0
0

Hi All,

I am setting up push notifications for my app, and i just set them up for another app followed the process and everything worked great.

Following the exact same process with the other app i am getting this error.

assertion failed: 12B440: libxpc.dylib + 71820 [A4F17798-F3DE-3FBC-85E3-F569762F0EB9]: 0x7d
Driving me crazy i have the correct certificate using the code below.
/*
     * Setup the cloud
     */
    var Cloud = require('ti.cloud');
    var deviceToken = null;
 
    Cloud.Users.login({
        login : 'login',
        password : 'login01$'
    }, function(e) {
        if (e.success) {
            var user = e.users[0];
            Ti.API.info(JSON.stringify(user));
            // Check if the device is running iOS 8 or later
            if (Ti.Platform.name == "iPhone OS" && parseInt(Ti.Platform.version.split(".")[0]) >= 8) {
 
                // Wait for user settings to be registered before registering for push notifications
                Ti.App.iOS.addEventListener('usernotificationsettings', function registerForPush() {
 
                    // Remove event listener once registered for push notifications
                    Ti.App.iOS.removeEventListener('usernotificationsettings', registerForPush);
 
                    Ti.Network.registerForPushNotifications({
                        success : deviceTokenSuccess,
                        error : deviceTokenError,
                        callback : receivePush
                    });
                });
 
                // Register notification types to use
                Ti.App.iOS.registerUserNotificationSettings({
                    types : [Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT, Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND, Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE]
                });
            }
 
            // For iOS 7 and earlier
            else {
                Ti.Network.registerForPushNotifications({
                    // Specifies which notifications to receive
                    types : [Ti.Network.NOTIFICATION_TYPE_BADGE, Ti.Network.NOTIFICATION_TYPE_ALERT, Ti.Network.NOTIFICATION_TYPE_SOUND],
                    success : deviceTokenSuccess,
                    error : deviceTokenError,
                    callback : receivePush
                });
            }
        } else {
            Ti.API.info("Error :" + e.message);
        }
    });
    // Process incoming push notifications
    function receivePush(e) {
        Titanium.Media.vibrate();
        alert('Received push: ' + JSON.stringify(e));
    }
 
    // Save the device token for subsequent API calls
    function deviceTokenSuccess(e) {
        deviceToken = e.deviceToken;
        Cloud.PushNotifications.subscribe({
            channel : 'login',
            type : 'ios',
            device_token : deviceToken
        }, function(e) {
            if (e.success) {
                Ti.API.info('Success :' + ((e.error && e.message) || JSON.stringify(e)));
            } else {
                Ti.API.info('Error:' + ((e.error && e.message) || JSON.stringify(e)));
            }
        });
    }
 
    function deviceTokenError(e) {
        Ti.API.info('Failed to register for push notifications! ' + e.error);
    }
Can anyone tell me why this maybe happening?

I am using 3.5.0.GA

Thanks


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>