[aerogear-dev] Cordova and iOS new issue

Miguel Lemos miguel21op at gmail.com
Wed Mar 19 10:08:56 EDT 2014


OK. I just pasted the PushPlugin.m but I picked the yesterday's version.

I already tested it and now it's working correctly, thanks.

Thanks


On Wed, Mar 19, 2014 at 1:47 PM, Erik Jan de Wit <edewit at redhat.com> wrote:

> I did
> https://github.com/edewit/aerogear-pushplugin-cordova/commit/1df1adcaa76aa0a740d6e9c02ec2b02b3b0b990a
>
>
> checkout my branch:
>
> git checkout -b edewit-payload-missing master
> git pull git at github.com:edewit/aerogear-pushplugin-cordova.git payload-missing
>
>
>
> On 19 Mar,2014, at 14:43 , Miguel Lemos <miguel21op at gmail.com> wrote:
>
> Erik,
>
> I think you didn't update the code...
>
>
> On Wed, Mar 19, 2014 at 9:28 AM, Miguel Lemos <miguel21op at gmail.com>wrote:
>
>> Yes, I see it now. I'll test it as soon as I can again.
>>
>> M
>>
>> Enviado do meu iPhone
>>
>> No dia 19/03/2014, às 07:47, Erik Jan de Wit <edewit at redhat.com>
>> escreveu:
>>
>> Yeah didn’t test all possibilities apparently, there is a “ missing on
>> the foreground property. Fixed now.
>>
>> On 19 Mar,2014, at 0:08 , Miguel Lemos <miguel21op at gmail.com> wrote:
>>
>> 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'
>> and no window is opened.
>>
>> All I have in my code is:
>>
>> alert(e.alert);
>>
>> The string that arrives to the device is like this:
>>
>>
>>
>> *Msg: {"badge":"1","alert":"hlhlkhkl","payload":
>> {"cp":"","cd":"","av":"hlhlkhkl","ul":"","ln":"","en":"598","at":"Aviso","rd":"","lt":"",},"foreground:"0"}
>> *
>>
>> Hope it helps.
>>
>>
>> On Tue, Mar 18, 2014 at 10:23 PM, Miguel Lemos <miguel21op at gmail.com>wrote:
>>
>>> Not 100% yet.
>>>
>>> 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:
>>>
>>>
>>>
>>> *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":"http://metal-pr.net/c/?79
>>> <http://metal-pr.net/c/?79>","ln":"0.00000000000","en":"598","at":"Aviso","cp":"79","rd":"0",},"foreground":"1"}
>>> *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...
>>>
>>>
>>> On Tue, Mar 18, 2014 at 9:56 PM, Miguel Lemos <miguel21op at gmail.com>wrote:
>>>
>>>> Too soon, unfortunately !
>>>>
>>>> Isn't yet 100% perfect. There's still a problem if the app is running
>>>> in the background. I must dig further  to understand why it happens :-(
>>>>
>>>>
>>>> On Tue, Mar 18, 2014 at 9:50 PM, Sebastien Blanc <scm.blanc at gmail.com>wrote:
>>>>
>>>>> Cool !
>>>>> Would be nice if you could add a comment here
>>>>> https://github.com/aerogear/aerogear-pushplugin-cordova/pull/20 like
>>>>> "+1 it's working" , assuming you have a github account.
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Mar 18, 2014 at 10:46 PM, Miguel Lemos <miguel21op at gmail.com>wrote:
>>>>>
>>>>>> Thanks Seb :-)
>>>>>>
>>>>>> I had already notice that and installed the new file "à la main". I't
>>>>>> working !
>>>>>>
>>>>>>
>>>>>> On Tue, Mar 18, 2014 at 9:45 PM, Miguel Lemos <miguel21op at gmail.com>wrote:
>>>>>>
>>>>>>> Forget my previous post! Done ;-)
>>>>>>>
>>>>>>> I uploaded and installed directly the PushPugin.m to its location. I
>>>>>>> didn't pay attention to what you wrote...
>>>>>>> It's working OK now and there's no error.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Mar 18, 2014 at 9:30 PM, Miguel Lemos <miguel21op at gmail.com>wrote:
>>>>>>>
>>>>>>>> Erik,
>>>>>>>>
>>>>>>>> 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:
>>>>>>>>
>>>>>>>>
>>>>>>>> XCode debugger:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> *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',}
>>>>>>>> *
>>>>>>>>
>>>>>>>> cordova plugin add org.jboss.aerogear.cordova.push
>>>>>>>>
>>>>>>>> Maybe you didn't uploaded it yet?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> M
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Mar 18, 2014 at 4:41 PM, Miguel Lemos <miguel21op at gmail.com
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>> Yes. That "trick" has to be used sometimes. That's a very annoying
>>>>>>>>> Cordova issue. Thanks.
>>>>>>>>>
>>>>>>>>> Enviado do meu iPhone
>>>>>>>>>
>>>>>>>>> No dia 18/03/2014, às 16:37, Sebastien Blanc <scm.blanc at gmail.com>
>>>>>>>>> escreveu:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Mar 18, 2014 at 5:34 PM, Miguel Lemos <
>>>>>>>>> miguel21op at gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Thanks Erik. I know that; the total payload never surpasses 256
>>>>>>>>>> byes and the av parameter (the notification itself) 107 characters.
>>>>>>>>>>
>>>>>>>>>> After the correction I just have the reinstall the plugin?
>>>>>>>>>>
>>>>>>>>> That should be enough but it has sometime failed for me , in this
>>>>>>>>> case you will need to do a :
>>>>>>>>>
>>>>>>>>> cordova platform remove ios
>>>>>>>>> cordova platform add ios
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> M
>>>>>>>>>>
>>>>>>>>>> Enviado do meu iPhone
>>>>>>>>>>
>>>>>>>>>> No dia 18/03/2014, às 16:24, Erik Jan de Wit <edewit at redhat.com>
>>>>>>>>>> escreveu:
>>>>>>>>>>
>>>>>>>>>> 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.
>>>>>>>>>>
>>>>>>>>>> On 18 Mar,2014, at 17:08 , Erik Jan de Wit <edewit at redhat.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> PR submitted
>>>>>>>>>> https://github.com/aerogear/aerogear-pushplugin-cordova/pull/20
>>>>>>>>>>
>>>>>>>>>> On 18 Mar,2014, at 15:49 , Miguel Lemos <miguel21op at gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Fine, Erik!
>>>>>>>>>>
>>>>>>>>>> Nice to know it's easy to fix.
>>>>>>>>>>
>>>>>>>>>> A small issue, that caused - almost - everything to fail...
>>>>>>>>>>
>>>>>>>>>> I'm glad I could help in the role of "bug buster" ;-)
>>>>>>>>>>
>>>>>>>>>> Miguel
>>>>>>>>>>
>>>>>>>>>> Enviado do meu iPhone
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> aerogear-dev mailing list
>>>>>>>>>> aerogear-dev at lists.jboss.org
>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> aerogear-dev mailing list
>>>>>>>>>> aerogear-dev at lists.jboss.org
>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> aerogear-dev mailing list
>>>>>>>>>> aerogear-dev at lists.jboss.org
>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> aerogear-dev mailing list
>>>>>>>>> aerogear-dev at lists.jboss.org
>>>>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> aerogear-dev mailing list
>>>>>> aerogear-dev at lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> aerogear-dev mailing list
>>>>> aerogear-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>
>>>>
>>>>
>>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140319/d98e564d/attachment-0001.html 


More information about the aerogear-dev mailing list