<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I did&nbsp;<a href="https://github.com/edewit/aerogear-pushplugin-cordova/commit/1df1adcaa76aa0a740d6e9c02ec2b02b3b0b990a">https://github.com/edewit/aerogear-pushplugin-cordova/commit/1df1adcaa76aa0a740d6e9c02ec2b02b3b0b990a</a>&nbsp;<div><br></div><div>checkout my branch:</div><div><br></div><div><pre class="copyable-terminal" style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Courier, monospace; margin-top: 0px; margin-bottom: 10px; margin-right: 25px; padding: 10px; color: rgb(255, 255, 255); background-color: rgb(51, 51, 51); border: none; border-top-left-radius: 4px; border-top-right-radius: 0px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; overflow: auto;">git checkout -b edewit-payload-missing master
git pull git@github.com:edewit/aerogear-pushplugin-cordova.git payload-missing</pre></div><div><br></div><div><br><div><div>On 19 Mar,2014, at 14:43 , Miguel Lemos &lt;<a href="mailto:miguel21op@gmail.com">miguel21op@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Erik,<div><br></div><div>I think you didn't update the code...</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 19, 2014 at 9:28 AM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@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="auto"><div>Yes, I see it now. I'll test it as soon as I can again.</div><div class=""><div><br></div><div>
M<br><br>Enviado do meu iPhone</div></div><div><br>No dia 19/03/2014, às 07:47, Erik Jan de Wit &lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt; escreveu:<br><br></div><div><div class="h5">
<blockquote type="cite">Yeah didn’t test all possibilities apparently, there is a “ missing on the foreground property. Fixed now.<div><br><div><div>On 19 Mar,2014, at 0:08 , Miguel Lemos &lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@gmail.com</a>&gt; wrote:</div>
<br><blockquote type="cite"><div dir="ltr">Now: if the app is not in the foreground, but it was not removed (still running), when a notification is sent and I press the status bar, the Safari debugger throws this error: SyntaxError: Unexpected number '0'<div>

and no window is opened.</div><div><br></div><div>All I have in my code is:<br><br>alert(e.alert);<br><br>The string that arrives to the device is like this:<br><br><p><b>Msg: {"badge":"1","alert":"hlhlkhkl","payload": {"cp":"","cd":"","av":"hlhlkhkl","ul":"","ln":"","en":"598","at":"Aviso","rd":"","lt":"",},"foreground:"0"}<br>

<br></b><br></p><p>Hope it helps.<b><br></b></p></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 10:23 PM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@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>Not 100% yet.</div><div><br></div>If the app is running in the foreground, now &nbsp;the Json array is formed in a different way, and the alert window shows correctly and loads all the paramaters:<br>

<br><p><b>2014-03-18 22:00:12.980 SmartDrifter[4011:60b] Msg: {"alert":"Olá! Benvindo aos Armazéns do Chiado","badge":"1","payload": {"lt":"0.00000000000","cd":"","av":"Olá! Benvindo aos Armazéns do Chiado","ul":"<a href="http://metal-pr.net/c/?79" target="_blank">http://metal-pr.net/c/?79</a>","ln":"0.00000000000","en":"598","at":"Aviso","cp":"79","rd":"0",},"foreground":"1"}<br>


<br></b>But if the message arrives first to the status bar (meaning: the app is not available), then nothing happens when I press the notification: the app opens indeed, but no alert window shows. Unfortunately I could not trace any errors, neither through the Safari debugger (the problem happens too soon, maybe before the index.html is fully available), nor through Xcode. But the problem has nothing to do with the previously faulty parameters because an alert(e.alert) doesn't trigger nothing either...<b><br>


</b></p></div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 9:56 PM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@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">Too soon, unfortunately !&nbsp;<div><br></div><div>Isn't yet 100% perfect. There's still a problem if the app is running in the background. I must dig further &nbsp;to understand why it happens :-(</div>


</div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 9:50 PM, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@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">Cool !<div>Would be nice if you could add a comment here&nbsp;<a href="https://github.com/aerogear/aerogear-pushplugin-cordova/pull/20" target="_blank">https://github.com/aerogear/aerogear-pushplugin-cordova/pull/20</a>&nbsp;like "+1 it's working" , assuming you have a github account.</div>




<div>&nbsp;</div></div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 10:46 PM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@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">Thanks Seb :-)<br><br>I had already notice that and installed the new file "à la main". I't working !</div>




<div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 9:45 PM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@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">Forget my previous post! Done ;-)<div><br></div><div>I uploaded and installed directly the PushPugin.m to its location. I didn't pay attention to what you wrote...</div>





<div>It's working OK now and there's no error.</div>
<div><br></div><div><br></div></div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 9:30 PM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@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">Erik,<div><br></div><div>I just uninstalled and installed again the Aerogear plugin, removed and installed again the Ios platform, I compiled the program, but the result didn't change:<br>






<br></div><div>
<br></div><div>XCode debugger:<br><p><br></p><p><b>2014-03-18 21:24:11.983 SmartDrifter[3892:60b] Msg: {en:'598',cd:'',badge:'1',alert:'Teste',av:'Teste',ul:'',ln:'',at:'Aviso',cp:'',rd:'',lt:'',foreground:'1',}<br>







<br></b>







</p><p>cordova plugin add org.jboss.aerogear.cordova.push<br><br>Maybe you didn't uploaded it yet?<br><br>Thanks<span><font color="#888888"><br><br>M</font></span></p></div></div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 4:41 PM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@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="auto"><div>Yes. That "trick" has to be used sometimes. That's a very annoying Cordova issue. Thanks.<br>







<br>Enviado do meu iPhone</div><div><br>No dia 18/03/2014, às 16:37, Sebastien Blanc &lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt; escreveu:<br><br></div><div><blockquote type="cite">







<div><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 5:34 PM, Miguel Lemos <span dir="ltr">&lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@gmail.com</a>&gt;</span> wrote:<br>








<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="auto"><div>Thanks Erik. I know that; the total payload never surpasses 256 byes and the av parameter (the notification itself) 107 characters.</div>








<div><br></div><div>After the correction I just have the reinstall the plugin?</div></div></blockquote><div>That should be enough but it has sometime failed for me , in this case you will need to do a :&nbsp;</div><div><br></div>








<div>cordova platform remove ios &nbsp;</div><div>cordova platform add ios<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">








<div dir="auto"><div><div><br></div><div>M<br><br>Enviado do meu iPhone</div></div><div><br>No dia 18/03/2014, às 16:24, Erik Jan de Wit &lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt; escreveu:<br>








<br></div><div><blockquote type="cite"><div>BTW Miguel I see that you are sending a lot of extras in the message, be careful that Apple doesn’t allow the message to become to big the max is 256 bytes.&nbsp;</div>
<br><div><div>On 18 Mar,2014, at 17:08 , Erik Jan de Wit &lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt; wrote:</div><br><blockquote type="cite"><div style="word-wrap:break-word"><div><br>








</div><div>PR submitted&nbsp;<a href="https://github.com/aerogear/aerogear-pushplugin-cordova/pull/20" target="_blank">https://github.com/aerogear/aerogear-pushplugin-cordova/pull/20</a></div><br><div><div>On 18 Mar,2014, at 15:49 , Miguel Lemos &lt;<a href="mailto:miguel21op@gmail.com" target="_blank">miguel21op@gmail.com</a>&gt; wrote:</div>








<br><blockquote type="cite">Fine, Erik!<br><br>Nice to know it's easy to fix.<br><br>A small issue, that caused - almost - everything to fail...<br><br>I'm glad I could help in the role of "bug buster" ;-)<br>








<br>Miguel<br><br>Enviado do meu iPhone<br></blockquote></div><br></div>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>








<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote></div><br></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br>








<span>aerogear-dev mailing list</span><br><span><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></span></div>








</blockquote></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div></div>
</div></blockquote><blockquote type="cite"><span>_______________________________________________</span><br><span>aerogear-dev mailing list</span><br><span><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a></span><br>







<span><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></span></blockquote></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div>
</div></blockquote></div><br></div>
</div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>
</div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>
</div></blockquote></div><br></div>
</div></blockquote></div><br></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote>
</div><br></div></blockquote><blockquote type="cite"><span>_______________________________________________</span><br><span>aerogear-dev mailing list</span><br><span><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a></span><br>
<span><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></span></blockquote></div></div></div></blockquote></div><br></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></div></body></html>