[Aerogear-users] Cannot receives pushes via iOS Production variant

Matthias Wessendorf matzew at apache.org
Wed Dec 10 03:16:16 EST 2014


On Tue, Dec 9, 2014 at 8:28 PM, Thomas Schweitzer <thomers at me.com> wrote:

>
> On 09.12.2014, at 16:22, Matthias Wessendorf <matzew at apache.org> wrote:
>
> The reason I’m asking is that I deleted all the development tokens from
>>> the DB, but still couldnt receive a push message on a device.
>>>
>>> But I know that I’m sending push registrations to the production variant
>>> not just from the “Free” version of my app (using the correct “Free”
>>> variant ID and key), but also from the “Paid” version (incorrectly using
>>> the “Free" variant ID and key). Since I do not know the tokens sent from
>>> the “Paid” version, I cannot disable them.
>>>
>>
>> I understand that you do not want to delete them. However, the
>> 'didRegisterForRemoteNotificationsWithDeviceToken' method is always invoked
>> when the application is launched - you will get back all your tokens,
>> eventually ;-)
>>
>>
>> It’s not that I do not want to delete them - I just don’t think I can
>> determine which ones are the invalid ones (?), since the “Paid” version is
>> live in the app store as well, and I do not know which devices are running
>> it. (I do not care about sending pushes to the few “Paid” installations,
>>
>
> Ok, let's see what we can do here.
> paid and free (both are backed by PRODUCTION Apple certs) are on the same
> variant? is the free one on the app-store too? Do you care about the
> 'free', or do you only care about the 'paid' version ?
>
>
> i only created a PRODUCTION variant for the FREE version, because that is
> the only one i care about (since the number of PAID downloads is much
> lower, and i dont need to send them pushes).
>
> so, the setup is:
>
> *) the FREE app installs register correctly against the FREE PRODUCTION
> variant
> *) the PAID app installs register incorrectly against the FREE PRODUCTION
> variant
>
> i want to send pushes to the FREE devices.
>
>
>
>
>> and I didn’t bother taking out the code to register the device token with
>> the wrong variant/key, assuming it would not cause me any problems - duh
>> ;-)).
>>
>
> but it is :-) The real "problem" with the registration against the 'wrong'
> variant is, that well, they are different app-ids and apple certs
>
>
> i know. i was totally aware of that - just thought (naively) that the
> wrong registrations will by silently discarded/ignored…
>

yeah, I know the behavior is not optimal - I think we have to do something
on the underlying java-apns library for that




>
>
> Could this be the reason why I’m not receiving pushes?
>>>
>>> Since I’m using the OpenShift cartridge - what’s the best way how to
>>> proceed? Can I change the “withNoErrorDetection” of ApnsService somehow?
>>>
>>
>>
>> Do you know what exact version of the UPS you are running on Openshift? I
>> am asking, because you could build the UPS yourself and simply replace the
>> WAR file.
>> But we before we do that, let's make sure we are all on the same page
>>
>>
>> I havent changed anything since I restarted the OpenShift application
>> last month (see
>> http://lists.jboss.org/pipermail/aerogear-users/2014-November/000020.html
>> )
>>
>> The OpenShift console shows
>>
>> AeroGear Push Server 1.0.0, MySQL 5.5, phpMyAdmin 4.0
>>
>
> Ok, thanks
>
>
>>
>>
>
> any idea what i could do now?
>

I created a patch for you:
https://github.com/matzew/aerogear-unifiedpush-server/tree/ThomasPatch
containing
https://github.com/matzew/aerogear-unifiedpush-server/commit/9e71472ec7931240a2264e8d1aa4ef4b5bc4ff94

Now, checkout that branch and build it yourself. the WAR file in here:
https://github.com/matzew/aerogear-unifiedpush-server/tree/ThomasPatch/servers/ups-as7

is the one you need to upload to openshift



>
> if the only possible solution is to build the WAR from scratch and install
> it ontop of the openshift cartridge, i’d do that, but maybe there is an
> easier way?
>

You can log in via SSH (details are on the Openshift console). Once logged
in, cd to
"aerogear-push/versions/<MY_VERSION_OF_UPS>/standalone/deployments"

Via SCP you could upload the WAR file, mentioned above. Basically replace
the "ag-push.war" file in "deployments" folder.

I know it is hacky, but hopefully is good enough for now





>
> thanks
> thomas
>
>
> _______________________________________________
> Aerogear-users mailing list
> Aerogear-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-users
>
>


-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-users/attachments/20141210/b917ba81/attachment-0001.html 


More information about the Aerogear-users mailing list