<div dir="ltr">Hi!<div><br></div><div>I downloaded the Cordova plugin with the last &quot;updates&quot;, but apparently the corrections you did previously aren&#39;t there yet. I had to download the revised PushPlugin.m &quot;by hand&quot;.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 19, 2014 at 2:08 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">OK. I just pasted the PushPlugin.m but I picked the yesterday&#39;s version.<div><br></div><div>I already tested it and now it&#39;s working correctly, thanks.</div>
<div><br></div><div>Thanks</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Mar 19, 2014 at 1:47 PM, Erik Jan de Wit <span dir="ltr">&lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.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 style="word-wrap:break-word">I did <a href="https://github.com/edewit/aerogear-pushplugin-cordova/commit/1df1adcaa76aa0a740d6e9c02ec2b02b3b0b990a" target="_blank">https://github.com/edewit/aerogear-pushplugin-cordova/commit/1df1adcaa76aa0a740d6e9c02ec2b02b3b0b990a</a> <div>

<br></div><div>checkout my branch:</div><div><br></div><div><pre style="font-family:Consolas,&#39;Liberation Mono&#39;,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><div><div><br></div><div><br><div><div>On 19 Mar,2014, at 14:43 , 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">Erik,<div><br></div><div>I think you didn&#39;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&#39;ll test it as soon as I can again.</div><div><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>
<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 &#39;0&#39;<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: {&quot;badge&quot;:&quot;1&quot;,&quot;alert&quot;:&quot;hlhlkhkl&quot;,&quot;payload&quot;: {&quot;cp&quot;:&quot;&quot;,&quot;cd&quot;:&quot;&quot;,&quot;av&quot;:&quot;hlhlkhkl&quot;,&quot;ul&quot;:&quot;&quot;,&quot;ln&quot;:&quot;&quot;,&quot;en&quot;:&quot;598&quot;,&quot;at&quot;:&quot;Aviso&quot;,&quot;rd&quot;:&quot;&quot;,&quot;lt&quot;:&quot;&quot;,},&quot;foreground:&quot;0&quot;}<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  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: {&quot;alert&quot;:&quot;Olá! Benvindo aos Armazéns do Chiado&quot;,&quot;badge&quot;:&quot;1&quot;,&quot;payload&quot;: {&quot;lt&quot;:&quot;0.00000000000&quot;,&quot;cd&quot;:&quot;&quot;,&quot;av&quot;:&quot;Olá! Benvindo aos Armazéns do Chiado&quot;,&quot;ul&quot;:&quot;<a href="http://metal-pr.net/c/?79" target="_blank">http://metal-pr.net/c/?79</a>&quot;,&quot;ln&quot;:&quot;0.00000000000&quot;,&quot;en&quot;:&quot;598&quot;,&quot;at&quot;:&quot;Aviso&quot;,&quot;cp&quot;:&quot;79&quot;,&quot;rd&quot;:&quot;0&quot;,},&quot;foreground&quot;:&quot;1&quot;}<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&#39;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 ! <div><br></div><div>Isn&#39;t yet 100% perfect. There&#39;s still a problem if the app is running in the background. I must dig further  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 <a href="https://github.com/aerogear/aerogear-pushplugin-cordova/pull/20" target="_blank">https://github.com/aerogear/aerogear-pushplugin-cordova/pull/20</a> like &quot;+1 it&#39;s working&quot; , assuming you have a github account.</div>






<div> </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 &quot;à la main&quot;. I&#39;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&#39;t pay attention to what you wrote...</div>







<div>It&#39;s working OK now and there&#39;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&#39;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:&#39;598&#39;,cd:&#39;&#39;,badge:&#39;1&#39;,alert:&#39;Teste&#39;,av:&#39;Teste&#39;,ul:&#39;&#39;,ln:&#39;&#39;,at:&#39;Aviso&#39;,cp:&#39;&#39;,rd:&#39;&#39;,lt:&#39;&#39;,foreground:&#39;1&#39;,}<br>









<br></b>







</p><p>cordova plugin add org.jboss.aerogear.cordova.push<br><br>Maybe you didn&#39;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 &quot;trick&quot; has to be used sometimes. That&#39;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 : </div><div><br></div>










<div>cordova platform remove ios  </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. </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 <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&#39;s easy to fix.<br><br>A small issue, that caused - almost - everything to fail...<br><br>I&#39;m glad I could help in the role of &quot;bug buster&quot; ;-)<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" 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></div></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></div><br></div>