arleyandrada / PushClient

FREE and Open Source - Titanium PushClient Module
Other
44 stars 17 forks source link

Push Client - Titanium Classic #90

Closed somefakeuser closed 9 years ago

somefakeuser commented 9 years ago

Hi Arley I am using your module and trying to get this working use the Classic version and not Alloy. I'm really having trouble and was wondering if you could give me a step by step of how to set things up.

(I have successfully set up the module and have also set up the Parse.com app for Android.)

Here is my Titanium file structure for reference.

/root/resources/app.js (I've put your example code in here)

/root/resources/parse/ (This contains the config.json, parse.js, alloy.js)

Running the app seems to work fine at the very start but soon crashes and I assume it's because of the alloy setup.

Would you please be able to show me what I should change to make this work for a Classic version?

This is the console:

[INFO] :   eventSuccess:{"type":"PushClient_Success","source":{"bubbleParent":true,"apiName":"Ti.Module","invocationAPIs":[],"_events":{"PushClient_Success":{},"PushClient_Error":{},"PushClient_Callback":{}}},"registrationId":"APA91bFovsWOQcg_5XymHMMt8JBVSvqBN8bCz17oCjqeyrXPajItj-Enc3zvaxZwbbkcppYxYlKCQzlU7TCcCVTnjMTJzkJLVLCqNDe8y1TmaFFMbpoS2lzNFs4irPD5WJqYsLDShKgu262JVXWvLIBqu74atIU6QQ","bubbles":false,"success":true,"code":0,"cancelBubble":false}
[INFO] :   ALERT: (KrollRuntimeThread) [305,305] Success:

[INFO] :   ALERT:

[INFO] :   ALERT: registrationId

[INFO] :   ALERT:

[INFO] :   ALERT: APA91bFovsWOQcg_5XymHMMt8JBVSvqBN8bCz17oCjqeyrXPajItj-Enc3zvaxZwbbkcppYxYlKCQzlU7TCcCVTnjMTJzkJLVLCqNDe8y1TmaFFMbpoS2lzNFs4irPD5WJqYsLDShKgu262JVXWvLIBqu74atIU6QQ

[ERROR] :  TiApplication: (main) [7424,7729] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to instantiate receiver com.parse.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class "com.parse.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/com.xxxx.xxxxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]; Titanium 3.5.1,2015/03/05 10:08,96875c9

[ERROR] :  TiApplication: java.lang.RuntimeException: Unable to instantiate receiver com.parse.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class "com.parse.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/com.xxxx.xxxxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]

[ERROR] :  TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2976)

[ERROR] :  TiApplication: at android.app.ActivityThread.access$1800(ActivityThread.java:177)

[ERROR] :  TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1525)

[ERROR] :  TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)

[ERROR] :  TiApplication: at android.os.Looper.loop(Looper.java:145)

[ERROR] :  TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5944)

[ERROR] :  TiApplication: at java.lang.reflect.Method.invoke(Native Method)

[ERROR] :  TiApplication: at java.lang.reflect.Method.invoke(Method.java:372)

[ERROR] :  TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)

[ERROR] :  TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

[ERROR] :  TiApplication: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.parse.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/com.xxxx.xxxxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]

[ERROR] :  TiApplication: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

[ERROR] :  TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

[ERROR] :  TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)

[ERROR] :  TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2971)

[ERROR] :  TiApplication: ... 9 more

[ERROR] :  TiApplication: Suppressed: java.lang.ClassNotFoundException: com.parse.GcmBroadcastReceiver

[ERROR] :  TiApplication: at java.lang.Class.classForName(Native Method)

[ERROR] :  TiApplication: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)

[ERROR] :  TiApplication: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)

[ERROR] :  TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

[ERROR] :  TiApplication: ... 11 more

[ERROR] :  TiApplication: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

[ERROR] :  AndroidRuntime: FATAL EXCEPTION: main

[ERROR] :  AndroidRuntime: Process: com.xxxx.xxxxx, PID: 22899

[ERROR] :  AndroidRuntime: java.lang.RuntimeException: Unable to instantiate receiver com.parse.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class "com.parse.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/com.xxxx.xxxxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]

[ERROR] :  AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2976)

[ERROR] :  AndroidRuntime: at android.app.ActivityThread.access$1800(ActivityThread.java:177)

[ERROR] :  AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1525)

[ERROR] :  AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)

[ERROR] :  AndroidRuntime: at android.os.Looper.loop(Looper.java:145)

[ERROR] :  AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5944)

[ERROR] :  AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)

[ERROR] :  AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)

[ERROR] :  AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)

[ERROR] :  AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

[ERROR] :  AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.parse.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/com.xxxx.xxxxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]

[ERROR] :  AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

[ERROR] :  AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

[ERROR] :  AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)

[ERROR] :  AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2971)

[ERROR] :  AndroidRuntime: ... 9 more

[ERROR] :  AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: com.parse.GcmBroadcastReceiver

[ERROR] :  AndroidRuntime: at java.lang.Class.classForName(Native Method)

[ERROR] :  AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)

[ERROR] :  AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)

[ERROR] :  AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

[ERROR] :  AndroidRuntime: ... 11 more

[ERROR] :  AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
arleyandrada commented 9 years ago

My module is not dependent of Alloy. You can make some few changes to my sample code to get it to work in classic Titanium projects:

Your error log suggests that there is another modules or another tiapp.xml gcm related settings conflicting with my module. Try to remove another module, remove tiapp.xml unused settings, clean the project and build it again.

For more questions, take a look at my issue history at: https://github.com/arleyandrada/PushClient

Regards,

Arley

somefakeuser commented 9 years ago

Hi Arley, thanks for your help! Guys for those of you using Classic, simply make take the 3 files in the parse folder and put them in your app.js. Then change the json variables to regular variables and remove the Alloy.CFG. where ever you see in. This will let your newly created variables from the json file be used in the other 2 files code. Worked like a charm for Android and Im able to send notifications through the Parse Dashboard!

I got rid of the error log by removing a chunk of xml manifest code that came from Parse. Woops! Guys don't put any of the code Parse gives you in your Titanium app. Arley provides you with everything you need!

Ok Arley, I tried to send a notification to my iPhone device which has a valid provisioning profile and Push notification certificate. I made the .p12 without a password and uploaded. I ran the app on the iPhone and see that everything was a success. The Parse Dashboard also shows all the info was pulled in, BUT for some reason the phone never receives the notification when I send. I'm going to scour the FAQ and see if another person has had this issue.

arleyandrada commented 9 years ago

Checklist for iOS:

//Workaround to Titanium Mobile issue #17030
//https://jira.appcelerator.org/browse/TIMOB-17030
if (!OS_ANDROID) {
    var issue17030 = Ti.Network.registerForPushNotifications;
}

Regards,

Arley

somefakeuser commented 9 years ago

Hi Arley, I have tested on my iPad and iPhone and registration shows success and info is pulled into into the Parse dashboard. When I go to send a push though, the Apple devices never receive a thing. Even though my iOS Push Notification Certificate is valid, I am going to recreate another from scratch and see if that helps.

If not would it help to give you my app.js?

arleyandrada commented 9 years ago

Yes, please, share your app.js with me.

somefakeuser commented 9 years ago

Hi please see attached app.js

/**
 * Commercial : Copyright (c) 2014
 * ArlSoft Tecnologia <contato@arlsoft.com.br>
 * 
 * All rights reserved.
 * This is proprietary software.
 * No warranty, explicit or implicit, provided.
 */

//Workaround to Titanium Mobile issue #17030
//https://jira.appcelerator.org/browse/TIMOB-17030

var PushClient = require('br.com.arlsoft.pushclient');

var OS_ANDROID = Ti.Platform.osname === "android";
//var OS_IOS = Ti.Platform.osname === "ios";

Instructions = "!!! do not change the ParseGCMSenderId config !!!";
ParseGCMSenderId = "1076345567071";
ParseRESTApiBaseUri = "https://api.parse.com/1/";
ParseApplicationId = "xxxxxxx";
ParseRESTApiKey = "xxxxxxx";
contentavailable = "1";

//Workaround to Titanium Mobile issue #17030
//https://jira.appcelerator.org/browse/TIMOB-17030
if (!OS_ANDROID) {
    var issue17030 = Ti.Network.registerForPushNotifications;
    var issue17030iOS8 = Ti.App.iOS.registerUserNotificationSettings;
}

var registerOptions = {
    GCMSenderId : ParseGCMSenderId,
    APNTypes : [ PushClient.NOTIFICATION_TYPE_BADGE, PushClient.NOTIFICATION_TYPE_ALERT, PushClient.NOTIFICATION_TYPE_SOUND ]
};

if (!OS_ANDROID) {
    var acceptAction = PushClient.createAction({
        identifier: 'ACCEPT_IDENTIFIER',
        title: 'Accept',
        activationMode: PushClient.NOTIFICATION_ACTIVATION_MODE_FOREGROUND,
        destructive: false,
        authenticationRequired: true
    });
    var rejectAction = PushClient.createAction({
        identifier: 'REJECT_IDENTIFIER',
        title: 'Reject',
        activationMode: PushClient.NOTIFICATION_ACTIVATION_MODE_BACKGROUND,
        destructive: true,
        authenticationRequired: false
    });
    var downloadContent = PushClient.createCategory({
      identifier: 'APPROVE_CONTENT',
      actionsForMinimalContext: [acceptAction, rejectAction],
      actionsForDefaultContext: [acceptAction, rejectAction]
    });
    registerOptions.Categories = [downloadContent];
}

// Valid APNTypes (for iOS):
// PushClient.NOTIFICATION_TYPE_BADGE
// PushClient.NOTIFICATION_TYPE_ALERT
// PushClient.NOTIFICATION_TYPE_SOUND
// PushClient.NOTIFICATION_TYPE_NEWSSTAND (prior to iOS8)

// Categories (for iOS 8):
// Equivalent to Ti.App.iOS.createUserNotificationCategory and Ti.App.iOS.createUserNotificationAction
// https://wiki.appcelerator.org/display/guides2/iOS+Interactive+Notifications

// Notification properties:
// "alert" (String) to text message - or "text" to Android
// "sound" (String) to sound file to play - "default" to Android default sound
// "badge" (Int) to badge count indicator
// "content-available" (Int) to iOS background notification
// -->> Requires set remote-notification UIBackgroundModes in tiapp.xml
// "notificationId" (Int) to Android notification identification
// "title" (String) to override Android notification title - default app name
// "ticker" (String) to override Android ticker message - default alert message
// "vibrate" (Boolean) to use default Android device vibration
// "lights" (Boolean) to use default Android device lights
// "smallIcon" (String) set small icon to Android notification from assets
// "largeIcon" (String) set large icon to Android notification from local file or url
// "category" (String) to iOS 8 interactive notification
// "ledARGB" (Color) to change default Android device light color
// "ledOnMS" (Int) to change default Android device light blink on time
// "ledOffMS" (Int) to change default Android device light blink off time

var eventSuccess = function(event) {
    Ti.API.info('eventSuccess:' + JSON.stringify(event));

    if (!event) {
        alert('Success:\n\nInvalid success');
        // Should never happen...
        return;
    }

    alert('Success:\n\nregistrationId\n\n' + event.registrationId);

    registerDevice(event.registrationId, [], function(error, response) {
        if (error) {
            alert('Parse API Error:\n\n' + JSON.stringify(response));
        } else {
            alert('Parse API Success:\n\n' + JSON.stringify(response));
        }
    });
};

var eventError = function(event) {
    Ti.API.info('eventError:' + JSON.stringify(event));

    if (!event) {
        alert('Error:\n\nInvalid error');
        // Should never happen...
        return;
    }

    switch (event.code) {
    case PushClient.ERROR_SENDER_ID:
        alert('Error:\n\nUndefined GCMSenderId');
        // Only for Google Cloud Messaging (Android)
        break;
    case PushClient.ERROR_PLAY_SERVICES:
        alert('Error:\n\nGoogle Play Services not available\n\n' + event.error);
        // Only for Google Cloud Messaging (Android)
        break;
    case PushClient.ERROR_NOT_SUPPORTED:
        alert('Error:\n\nNot supported error\n\n' + event.error);
        // Possible error messages for iOS:
        // - "Unable to run with iOS Simulator"
        // - "Unable to run with iOS in DEBUG mode"
        // - "Unable to run with iOS DEV profile due to Titanium Mobile issue
        // #17030"
        // Possible error messages for Android:
        // - "This device is not supported"
        break;
    case PushClient.ERROR_REGISTER:
        alert('Error:\n\nUnable to register this device\n\n' + event.error);
        break;
    case PushClient.ERROR_UNREGISTER:
        alert('Error:\n\nUnable to unregister this device\n\n' + event.error);
        break;
    default:
        alert('Error:\n\nUnknown error\n\n' + JSON.stringify(event));
        // Should never happen...
    }
};

var eventCallback = function(event) {
    Ti.API.info('eventCallback:' + JSON.stringify(event));

    if (!event) {
        alert('Callback:\n\nInvalid callback');
        // Should never happen...
    } else if (event.mode == PushClient.MODE_FOREGROUND) {
        alert('Callback in Foreground:\n\n' + JSON.stringify(event.data));
        // Push data received with app in foreground
    } else if (event.mode == PushClient.MODE_CLICK) {
        alert('Callback from Click:\n\n' + JSON.stringify(event.data));
        // Push data received when user clicks in notification message
    } else if (event.mode == PushClient.MODE_BACKGROUND) {
        // Requires set remote-notification UIBackgroundModes in tiapp.xml
        PushClient.endBackgroundHandler(event.data.handlerId);
        // Put the application back to sleep before any UI interations
        alert('Callback from Silent:\n\n' + JSON.stringify(event.data));
        // Push data received with app in background
    } else if (event.mode == PushClient.MODE_ACTION) {
        alert('Callback from Action:\n\n'+event.category+'\n'+event.identifier+'\n\n' + JSON.stringify(event.data));
        // Push data received when user choose an action from notification message
    } else {
        alert('Callback:\n\n' + JSON.stringify(event.data));
        // Should never happen...
    }
};

PushClient.addEventListener(PushClient.EVENT_SUCCESS, eventSuccess);
PushClient.addEventListener(PushClient.EVENT_ERROR, eventError);
PushClient.addEventListener(PushClient.EVENT_CALLBACK, eventCallback);

Ti.API.info('registerPush...');
PushClient.registerPush(registerOptions);

// PushClient.unregisterPush();
// Call this method to unregister

//////////////////PARSE.JS FILE CONTENT/////////////////////

var registerDevice = function(registrationId, channels, cb) {
    //alert("Register Device fired");
    var request = Titanium.Network.createHTTPClient({
        enableKeepAlive : false,
        onload : function(e) {
            try {
                var statusCode = request.status;
                var response = JSON.parse(request.responseText);
                if (statusCode == 200 || statusCode == 201) {
                    cb(false, response);
                } else {
                    cb(true, response);
                }
            } catch (ex) {
                cb(true, response);
            }
        },
        onerror : function(e) {
            cb(true, e.error);
        }
    });

    channels = channels || [];

    var installationId = Ti.App.Properties.getString('Parse:installationId', '');
    if (installationId == '') {
        installationId = Titanium.Platform.createUUID();
        Ti.App.Properties.setString('Parse:installationId', installationId);
    }

    var params = {
            'deviceType' : (OS_ANDROID) ? 'android' : 'ios',
            'deviceToken' : registrationId,
            'installationId' : installationId,
            'channels' : channels
        };

    if (OS_ANDROID) {
        params['pushType'] = 'gcm';
        alert("Android device Detected and pushYype set to GCM");
    }

    // Other unused parse params...
    // https://www.parse.com/docs/push_guide#setup/Android
    // https://www.parse.com/docs/push_guide#installations/iOS
    //
    // badge: The current value of the icon badge for iOS apps. Changes to this value on the server will be used for future badge-increment push notifications.
    // timeZone: The current time zone where the target device is located.
    // appName: The display name of the client application to which this installation belongs.
    // appVersion: The version string of the client application to which this installation belongs.
    // parseVersion: The version of the Parse SDK which this installation uses.
    // appIdentifier: A unique identifier for this installation's client application. This parameter is not supported in Android.

    Ti.API.info('parseRequest:' + JSON.stringify(params));

    // Register device token with Parse
    request.open('POST', ParseRESTApiBaseUri + 'installations', true);
    request.setRequestHeader('X-Parse-Application-Id', ParseApplicationId);
    request.setRequestHeader('X-Parse-REST-API-Key', ParseRESTApiKey);
    request.setRequestHeader('Content-Type', 'application/json');
    request.send(JSON.stringify(params));
};

//exports.registerDevice = registerDevice;
arleyandrada commented 9 years ago

It all seems OK with the source code.

Some information appears in the log after you send the message from Parse.com?

The iOS device is successfull registered at Parse.com and the iOS devices are counted at status from the sent message?

somefakeuser commented 9 years ago

When I select to send to the 2 iOS devices, it says it will send to 2. After I send the message however it says that it sent to 0.

So yes successfully registered at Parse and 2 ot of 2 iOS devices are counted. Always says 0 pushes sent.

arleyandrada commented 9 years ago

It seems to have no reason not to work.

Please, list to me the Titanium Studio or Appcelerator Studio version, the Titanium SDK version, your devices iOS versions and share with me your full console log from the App start to after the push notification sent message.

I will try to reproduce this issue.

somefakeuser commented 9 years ago

Titanium Studio build: 3.4.1.201410281727 Titanium SDK 3.5.1 GA

iPad iOS version: 8.1.2 (12B440) iPhone 5s iOS version: 8.3 (12F70)

iPhone 5s Console:

Titanium Command-Line Interface, CLI version 3.4.2, Titanium SDK version 3.5.1.GA

Copyright (c) 2012-2015, Appcelerator, Inc.  All Rights Reserved.

Please report bugs to http://jira.appcelerator.org/

Wed May 20 2015 16:21:03 GMT-0700 (MST)

Operating System

  Name                        = Mac OS X

  Version                     = 10.10.3

  Architecture                = 64bit

  # CPUs                      = 4

  Memory                      = 8589934592

Node.js

  Node.js Version             = 0.10.13

  npm Version                 = 1.3.2

Titanium CLI

  CLI Version                 = 3.4.2

Titanium SDK

  SDK Version                 = 3.5.1.GA

  SDK Path                    = /Users/xxxxx/Library/Application Support/Titanium/mobilesdk/osx/3.5.1.GA

  Target Platform             = iphone

Command

  /usr/local/bin/node /usr/local/bin/titanium --no-colors --no-progress-bars --no-prompt build --platform iphone --log-level trace --sdk 3.5.1.GA --project-dir /Users/xxxxx/Documents/xxxxx --target device --ios-version 8.3 --device-family universal --developer-name xxxxx (xxxxx) --device-id xxxxx --pp-uuid xxxxx

[INFO] :   Found Titanium module id=facebook version=3.2.0 platform=iphone deploy-type=test path=/Users/xxxxx/Library/Application Support/Titanium/modules/iphone/facebook/3.2.0

[INFO] :   Found Titanium module id=br.com.arlsoft.pushclient version=1.7 platform=iphone deploy-type=test path=/Users/xxxxx/Documents/xxxxx/modules/iphone/br.com.arlsoft.pushclient/1.7

[INFO] :   Deploy type: test

[INFO] :   Building for target: device

[INFO] :   Building using iOS SDK: 8.3

[INFO] :   Building for iOS device: xxxxx

[INFO] :   Building for device family: universal

[INFO] :   iOS Development Certificate: xxxxx (xxxxx)

[INFO] :   Minimum iOS version: 7.0

[INFO] :   Using default keychain

[INFO] :   Debugging disabled

[INFO] :   Profiler disabled

[INFO] :   Forcing rebuild: /Users/xxxxx/Documents/xxxxx/build/iphone/build-manifest.json does not exist

[INFO] :   Initiating prepare phase

[INFO] :   Checking for Splash Screen localization

[INFO] :   Performing full rebuild

[INFO] :   Copying Xcode iOS files

[INFO] :   Creating Xcode project directory: /Users/xxxxx/Documents/xxxxx/build/iphone/xxxxx.xcodeproj

[INFO] :   Writing Xcode project data file: Titanium.xcodeproj/project.pbxproj

[INFO] :   Writing Xcode project configuration: project.xcconfig

[INFO] :   Writing Xcode module configuration: module.xcconfig

[INFO] :   Injecting native libraries into Xcode project file

[INFO] :   Forcing rebuild: ApplicationDefaults.m has changed since last build

[INFO] :   Writing application defaults: /Users/xxxxx/Documents/xxxxx/build/iphone/Classes/ApplicationDefaults.m

[INFO] :   Copying iTunes artwork

[INFO] :   Initiating Xcode pre-compile phase

[INFO] :   Processing JavaScript files

[INFO] :   Encrypting JavaScript files: /Users/xxxxx/Library/Application Support/Titanium/mobilesdk/osx/3.5.1.GA/iphone/titanium_prep "xxxxx" "/Users/xxxxx/Documents/xxxxx/build/iphone/assets"

[INFO] :   Processing Titanium namespace resources

[INFO] :   Compiling localization files

[INFO] :   Checking for Splash Screen localization

[INFO] :   Optimizing all images in /Users/xxxxx/Documents/xxxxx/build/iphone/build/Debug-iphoneos/xxxxx.app

[INFO] :   Invoking xcodebuild

[INFO] :   Image optimization complete

[INFO] :   Installing app on device: iPhone

[INFO] :   App successfully installed on device: iPhone

[INFO] :   Project built successfully in 1m 602ms

Please manually launch the application

Now I launch the app:

-- Start application log -----------------------------------------------------

[INFO] :   xxxxx/1.3.5 (3.5.1.96875c9)

[INFO] :   registerPush...

[INFO] :   eventSuccess:{"success":true,"registrationId":"xxxxx","code":0,"bubbles":true,"type":"PushClient_Success","source":{"id":"br.com.arlsoft.pushclient"},"cancelBubble":false}

[INFO] :   parseRequest:{"deviceType":"ios","deviceToken":"xxxxx","installationId":"xxxxx","channels":[]}

At this point I did the push. I've attached a screenshot of what Parse is saying. Titanium shows nothing more in the console because the device never gets the push.

screen shot 2015-05-20 at 4 29 56 pm

somefakeuser commented 9 years ago

I might have found something interesting when I go to the App ID section of Apple's developer area. It shows the the Dev Push notification says "Configurable" which is strange because it has always had a certificate attached and it's still valid. I'm going to reconfigure and go through the process and see if that fixes things.

somefakeuser commented 9 years ago

HEY SUCCESS! That's what it was. Very strange, it's as if Apple decided not to see my certificate anymore even though it was valid. redoing that process fixed this error and I receive the notifications on both devices!

I can not thank you enough for your patience and time. Much appreciated Arley.

arleyandrada commented 9 years ago

Great news !! Have fun! Thank you.