<div dir="ltr">Well, i debugged it and it&#39;s entering the [3] branch. A colleague suggested to reset the factory settings for the phone, since a bit ago he did some testing and the push notifications worked as intended. I reset the phone to factory settings, tried again the sample application and the register method finished, got the success message in the console, and did a small notification test and worked well. Debugging the code i noticed that still entered the [3] branch.<div><br></div><div>Still, quite weird that the phone didn&#39;t work until i resetted the configuration. Any idea if some internal configuration data could got stuck?</div></div><br><div class="gmail_quote"><div dir="ltr">El jue., 10 de sept. de 2015 a la(s) 2:49 a. m., Corinne Krych &lt;<a href="mailto:corinnekrych@gmail.com">corinnekrych@gmail.com</a>&gt; escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">hello Fabio<div><br></div><div>So to sum up, you managed iOS8+ device but the iOS7 device does not get registered.</div><div>Between iOS7 and iOS8 registering to remote notification has changed.</div><div>Could you try to do a breakpoint here [1] and make sure you&#39;re entering the iOS7 block ([2] or [3] depending which Xcode version you used).</div><div><br></div><div>++</div><div>Corinne</div><div>[1] <a href="https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGPushPlugin.m#L46-L57" target="_blank">https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGPushPlugin.m#L46-L57</a></div><div>[2] <a href="https://github.com/jboss-mobile/unified-push-helloworld/blob/master/ios-objc/HelloWorld/AGAppDelegate.m#L33" target="_blank">https://github.com/jboss-mobile/unified-push-helloworld/blob/master/ios-objc/HelloWorld/AGAppDelegate.m#L33</a></div><div>[3] <a href="https://github.com/jboss-mobile/unified-push-helloworld/blob/master/ios-objc/HelloWorld/AGAppDelegate.m#L37" target="_blank">https://github.com/jboss-mobile/unified-push-helloworld/blob/master/ios-objc/HelloWorld/AGAppDelegate.m#L37</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 September 2015 at 00:22, Fabio Turizo <span dir="ltr">&lt;<a href="mailto:fabio.turizo@gmail.com" target="_blank">fabio.turizo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">No, the bundle ID and the Application ID are the same. Still no messages in the log though. However i borrowed 2 iphones (a 5 and a 6, both in iOS 8.4.1) and the test worked fine with it. This iphone i&#39;m testing is an 5 with iOS 7.1.2 and it doesn&#39;t work. As I told you previously, the register method never finishes, be it a success or failure. Could this be an specific issue with the phone? Any settings i could tweak or other logs i could see? I&#39;m worried this could happen in other phones as well</div><div><div><br><div class="gmail_quote"><div dir="ltr">El mar., 8 de sept. de 2015 a la(s) 12:57 p. m., Erik Jan de Wit &lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt; escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Do you get this:<div><pre style="overflow:auto;font-family:Menlo,Monaco,Consolas,&#39;Courier New&#39;,monospace;font-size:13px;padding:9.5px;margin-top:20px;margin-bottom:20px;line-height:1.42857;word-wrap:break-word;color:rgb(51,51,51);border:1px solid rgb(204,204,204);border-radius:4px;background-image:initial;background-repeat:initial"><code style="font-family:Menlo,Monaco,Consolas,&#39;Courier New&#39;,monospace;font-size:inherit;padding:0px;color:inherit;border-radius:0px;white-space:pre-wrap;background-color:transparent">Domain=NSCocoaErrorDomain Code=3000 &quot;no valid &#39;aps-environment&#39; entitlement string found for application&quot;</code></pre><div>in the log? To fix that:</div></div><div><br></div><div><span style="color:rgba(0,0,0,0.74902);font-family:&#39;Open Sans&#39;,sans-serif;font-size:14px;line-height:20px;background-color:rgb(248,253,255)">Your Bundle ID name should match with the Bundle ID as created on Apple’s developer portal. Please refer to  </span><span style="color:rgba(0,0,0,0.74902);font-family:&#39;Open Sans&#39;,sans-serif;font-size:14px;line-height:20px;background-color:rgb(248,253,255)"><a href="https://aerogear.org/docs/unifiedpush/aerogear-push-ios/guides/#_apple_app_id_and_ssl_certificate_for_apns" target="_blank">Apple App ID and SSL certificate for APNs</a> </span><span style="color:rgba(0,0,0,0.74902);font-family:&#39;Open Sans&#39;,sans-serif;font-size:14px;line-height:20px;background-color:rgb(248,253,255)">documentation for more details on configuration.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 6:35 PM, Fabio Turizo <span dir="ltr">&lt;<a href="mailto:fabio.turizo@gmail.com" target="_blank">fabio.turizo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I followed the instructions at &quot;<b>Question: My registration to UPS never happens</b>&quot; and implememented the failurecallback:<div><pre style="overflow:auto;font-family:Menlo,Monaco,Consolas,&#39;Courier New&#39;,monospace;font-size:13px;padding:9.5px;margin-top:20px;margin-bottom:20px;line-height:1.42857;word-break:break-all;word-wrap:break-word;color:rgb(51,51,51);border:1px solid rgb(204,204,204);border-radius:4px;background-color:rgb(245,245,245)">- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
    // something went wrong, while talking to APNs
    // for now we simply log the error
    NSLog(@&quot;APNs Error: %@&quot;, error);
}</pre></div><div>But it&#39;s never called (using breakpoints) nor it prints anything to the log. So both callbacks (<i>didRegisterForRemoteNotificationsWithDeviceToken  </i>and <i>didFailToRegisterForRemoteNotificationsWithError</i>) aren&#39;t getting called.</div></div><div><div><br><div class="gmail_quote"><div dir="ltr">El mar., 8 de sept. de 2015 a la(s) 10:54 a. m., Erik Jan de Wit &lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt; escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So then [1] should have been called? Otherwise try to fix it using this doc [2]<div><br></div><div>[1] <a href="https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGPushPlugin.m#L98" target="_blank">https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGPushPlugin.m#L98</a></div><div>[2] <a href="https://aerogear.org/docs/unifiedpush/aerogear-push-ios/guides/#_question_apns_error" target="_blank">https://aerogear.org/docs/unifiedpush/aerogear-push-ios/guides/#_question_apns_error</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 5:19 PM, Fabio Turizo <span dir="ltr">&lt;<a href="mailto:fabio.turizo@gmail.com" target="_blank">fabio.turizo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Okay, i put a breakpoint there but it&#39;s not stepped over by the debugger. I put a breakpoint at [2] and the debugger steps it over. In this point of the process there&#39;s a channelId assigned already, but in conclusion the <span style="color:rgb(121,93,163);font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">didRegisterForRemoteNotificationsWithDeviceToken </span><span style="font-size:13.2px;line-height:19.8px">breakpoint is not getting called.</span><div><br></div><div>I debugged the application using GapDebug as well, but no javascript errors appeared. <br><div><span style="font-size:13.2px;line-height:19.8px"><br></span></div><div><span style="font-size:13.2px;line-height:19.8px">[2] </span><a href="https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGPushPlugin.m#L86" style="font-size:13.2px;line-height:19.8px" target="_blank">https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGPushPlugin.m#L</a>36</div></div></div><div><div><br><div class="gmail_quote"><div dir="ltr">El mar., 8 de sept. de 2015 a la(s) 4:20 a. m., Erik Jan de Wit &lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt; escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That is really strange could you debug the plugin? Put a breakpoint here [1] and see if there is a <span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">channelId. </span>Also can you fire up safari and attach a javascript debugger to the cordova webview to see if there are some javascript errors?<div><br></div><div><br></div><div>[1] <a href="https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGPushPlugin.m#L86" target="_blank">https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGPushPlugin.m#L86</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 7, 2015 at 11:16 PM, Fabio Turizo <span dir="ltr">&lt;<a href="mailto:fabio.turizo@gmail.com" target="_blank">fabio.turizo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi again, Erik. </div><div><br></div><div>I tried a sample proof of concept for iOS Notifications and they still didn&#39;t work. Created a new cordova app using the cordova create command, added <b>aerogear-cordova-push</b> and <b>cordova-console-plugin </b>and took the sample implementation code for the iOS variant in the UPS web admin. Launching the application trough Xcode onlye gets me a &#39;<i>register</i>&#39; message in the log and nothing more. Even the &#39;success&#39; or &#39;error&#39; messages in the callbacks aren&#39;t printed in the logs yet. Checking the UPs in the iOS variant, no installations ares shown.</div><div><br></div><div>I tested this using Cordova 5.2.0.</div></div><div><div><br><div class="gmail_quote"><div dir="ltr">El lun., 7 de sept. de 2015 a la(s) 3:51 p. m., Fabio Turizo &lt;<a href="mailto:fabio.turizo@gmail.com" target="_blank">fabio.turizo@gmail.com</a>&gt; escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div>Ok, sorry for answering this late but i had to get a Mac in order to do the right debug. Xcode log files don&#39;t give any info. What&#39;s more when I debug the application using Xcode, neither the success or error callback handlers are called. The UPS server log also doesn&#39;t show anything. Any idea what could be happening?</div></div><br><div class="gmail_quote"><div dir="ltr">El jue., 3 de sept. de 2015 a la(s) 1:07 a. m., Erik Jan de Wit &lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt; escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Fabio,</div><div><br></div>Can you have a look in the UPS logs? The device log might also provided some extra information. Running it from xcode you can see this log. Not being able to register can not be the cause of the certificate is not configured correctly, that will only prevent UPS from sending a message to the device.<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 2, 2015 at 10:06 PM, Fabio Turizo <span dir="ltr">&lt;<a href="mailto:fabio.turizo@gmail.com" target="_blank">fabio.turizo@gmail.com</a>&gt;</span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Greetings.<div><br></div><div>Ia have an error when i try to register an user in a Cordova app to the Unified Push Server. The error callback in this code:</div><div><br></div><div><div><i>function registerPush(alias) {</i></div><div><i>    if(typeof push !== &#39;undefined&#39;){</i></div><div><i>        console.log(&#39;Registering push notifications for: &#39; + alias);</i></div><div><i>        $.ajax({</i></div><div><i>            url: &quot;push-config.json&quot;,</i></div><div><i>            dataType: &quot;json&quot;</i></div><div><i>        }).then(function (pushConfig) {</i></div><div><i>            pushConfig.alias = alias;</i></div><div><i>            push.register(onNotification, successHandler, errorHandler, pushConfig);</i></div><div><i><br></i></div><div><i>            function successHandler() {</i></div><div><i>                console.log(&#39;Succesfully registered to aerogear push!&#39;);</i></div><div><i>            }</i></div><div><i><br></i></div><div><i>            function errorHandler(message) {</i></div><div><i>                console.log(&#39;Error registering aerogear push: &#39; + message);</i></div><div><i>            }</i></div><div><i>        });</i></div><div><i>    }</i></div><div><i>}</i></div></div><div><br></div><div>Gets called with a &#39;null&#39; message. Do you have any suggestions to debug this issue further? I&#39;ve tried re-issuing a new APN certiticate but it didn&#39;t work.</div></div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Cheers,<div>       Erik Jan</div></div></div>
</div>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</blockquote></div></blockquote></div>
</div></div><br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Cheers,<div>       Erik Jan</div></div></div>
</div>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Cheers,<div>       Erik Jan</div></div></div>
</div>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Cheers,<div>       Erik Jan</div></div></div>
</div>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</blockquote></div>