Well, i debugged it and it'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.
Still, quite weird that the phone didn't work until i resetted the
configuration. Any idea if some internal configuration data could got stuck?
El jue., 10 de sept. de 2015 a la(s) 2:49 a. m., Corinne Krych <
corinnekrych(a)gmail.com> escribió:
hello Fabio
So to sum up, you managed iOS8+ device but the iOS7 device does not get
registered.
Between iOS7 and iOS8 registering to remote notification has changed.
Could you try to do a breakpoint here [1] and make sure you're entering
the iOS7 block ([2] or [3] depending which Xcode version you used).
++
Corinne
[1]
https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGP...
[2]
https://github.com/jboss-mobile/unified-push-helloworld/blob/master/ios-o...
[3]
https://github.com/jboss-mobile/unified-push-helloworld/blob/master/ios-o...
On 10 September 2015 at 00:22, Fabio Turizo <fabio.turizo(a)gmail.com>
wrote:
> 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'm testing is an 5
> with iOS 7.1.2 and it doesn'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'm worried this could happen in other phones as well
>
> El mar., 8 de sept. de 2015 a la(s) 12:57 p. m., Erik Jan de Wit <
> edewit(a)redhat.com> escribió:
>
>> Do you get this:
>>
>> Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment'
entitlement string found for application"
>>
>> in the log? To fix that:
>>
>> Your Bundle ID name should match with the Bundle ID as created on
>> Apple’s developer portal. Please refer to Apple App ID and SSL
>> certificate for APNs
>>
<
https://aerogear.org/docs/unifiedpush/aerogear-push-ios/guides/#_apple_ap...
>> documentation for more details on configuration.
>>
>> On Tue, Sep 8, 2015 at 6:35 PM, Fabio Turizo <fabio.turizo(a)gmail.com>
>> wrote:
>>
>>> I followed the instructions at "*Question: My registration to UPS
>>> never happens*" and implememented the failurecallback:
>>>
>>> - (void)application:(UIApplication *)application
didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
>>> // something went wrong, while talking to APNs
>>> // for now we simply log the error
>>> NSLog(@"APNs Error: %@", error);
>>> }
>>>
>>> But it's never called (using breakpoints) nor it prints anything to the
>>> log. So both callbacks (*didRegisterForRemoteNotificationsWithDeviceToken
>>> *and *didFailToRegisterForRemoteNotificationsWithError*) aren't
>>> getting called.
>>>
>>> El mar., 8 de sept. de 2015 a la(s) 10:54 a. m., Erik Jan de Wit <
>>> edewit(a)redhat.com> escribió:
>>>
>>>> So then [1] should have been called? Otherwise try to fix it using
>>>> this doc [2]
>>>>
>>>> [1]
>>>>
https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGP...
>>>> [2]
>>>>
https://aerogear.org/docs/unifiedpush/aerogear-push-ios/guides/#_question...
>>>>
>>>> On Tue, Sep 8, 2015 at 5:19 PM, Fabio Turizo
<fabio.turizo(a)gmail.com>
>>>> wrote:
>>>>
>>>>> Okay, i put a breakpoint there but it'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's a channelId assigned already, but
in
>>>>> conclusion the didRegisterForRemoteNotificationsWithDeviceToken
breakpoint
>>>>> is not getting called.
>>>>>
>>>>> I debugged the application using GapDebug as well, but no javascript
>>>>> errors appeared.
>>>>>
>>>>> [2]
>>>>>
https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGP...
>>>>>
<
https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGP...
>>>>> 36
>>>>>
>>>>> El mar., 8 de sept. de 2015 a la(s) 4:20 a. m., Erik Jan de Wit <
>>>>> edewit(a)redhat.com> escribió:
>>>>>
>>>>>> That is really strange could you debug the plugin? Put a
breakpoint
>>>>>> here [1] and see if there is a channelId. Also can you fire up
>>>>>> safari and attach a javascript debugger to the cordova webview to
see if
>>>>>> there are some javascript errors?
>>>>>>
>>>>>>
>>>>>> [1]
>>>>>>
https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGP...
>>>>>>
>>>>>> On Mon, Sep 7, 2015 at 11:16 PM, Fabio Turizo <
>>>>>> fabio.turizo(a)gmail.com> wrote:
>>>>>>
>>>>>>> Hi again, Erik.
>>>>>>>
>>>>>>> I tried a sample proof of concept for iOS Notifications and
they
>>>>>>> still didn't work. Created a new cordova app using the
cordova create
>>>>>>> command, added *aerogear-cordova-push* and
*cordova-console-plugin
>>>>>>> *and took the sample implementation code for the iOS variant
in
>>>>>>> the UPS web admin. Launching the application trough Xcode
onlye gets me a '
>>>>>>> *register*' message in the log and nothing more. Even
the
>>>>>>> 'success' or 'error' messages in the
callbacks aren't printed in the logs
>>>>>>> yet. Checking the UPs in the iOS variant, no installations
ares shown.
>>>>>>>
>>>>>>> I tested this using Cordova 5.2.0.
>>>>>>>
>>>>>>> El lun., 7 de sept. de 2015 a la(s) 3:51 p. m., Fabio Turizo
<
>>>>>>> fabio.turizo(a)gmail.com> escribió:
>>>>>>>
>>>>>>>>
>>>>>>>> Ok, sorry for answering this late but i had to get a Mac
in order
>>>>>>>> to do the right debug. Xcode log files don't give any
info. What's more
>>>>>>>> when I debug the application using Xcode, neither the
success or error
>>>>>>>> callback handlers are called. The UPS server log also
doesn't show
>>>>>>>> anything. Any idea what could be happening?
>>>>>>>>
>>>>>>>> El jue., 3 de sept. de 2015 a la(s) 1:07 a. m., Erik Jan
de Wit <
>>>>>>>> edewit(a)redhat.com> escribió:
>>>>>>>>
>>>>>>>>> Hi Fabio,
>>>>>>>>>
>>>>>>>>> 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.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Sep 2, 2015 at 10:06 PM, Fabio Turizo <
>>>>>>>>> fabio.turizo(a)gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Greetings.
>>>>>>>>>>
>>>>>>>>>> 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:
>>>>>>>>>>
>>>>>>>>>> *function registerPush(alias) {*
>>>>>>>>>> * if(typeof push !== 'undefined'){*
>>>>>>>>>> * console.log('Registering push
notifications for: ' +
>>>>>>>>>> alias);*
>>>>>>>>>> * $.ajax({*
>>>>>>>>>> * url: "push-config.json",*
>>>>>>>>>> * dataType: "json"*
>>>>>>>>>> * }).then(function (pushConfig) {*
>>>>>>>>>> * pushConfig.alias = alias;*
>>>>>>>>>> * push.register(onNotification,
successHandler,
>>>>>>>>>> errorHandler, pushConfig);*
>>>>>>>>>>
>>>>>>>>>> * function successHandler() {*
>>>>>>>>>> * console.log('Succesfully
registered to aerogear
>>>>>>>>>> push!');*
>>>>>>>>>> * }*
>>>>>>>>>>
>>>>>>>>>> * function errorHandler(message) {*
>>>>>>>>>> * console.log('Error
registering aerogear push: '
>>>>>>>>>> + message);*
>>>>>>>>>> * }*
>>>>>>>>>> * });*
>>>>>>>>>> * }*
>>>>>>>>>> *}*
>>>>>>>>>>
>>>>>>>>>> Gets called with a 'null' message. Do you
have any suggestions
>>>>>>>>>> to debug this issue further? I've tried
re-issuing a new APN certiticate
>>>>>>>>>> but it didn't work.
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Aerogear-users mailing list
>>>>>>>>>> Aerogear-users(a)lists.jboss.org
>>>>>>>>>>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Cheers,
>>>>>>>>> Erik Jan
>>>>>>>>> _______________________________________________
>>>>>>>>> Aerogear-users mailing list
>>>>>>>>> Aerogear-users(a)lists.jboss.org
>>>>>>>>>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>>>>>>>>>
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Aerogear-users mailing list
>>>>>>> Aerogear-users(a)lists.jboss.org
>>>>>>>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Cheers,
>>>>>> Erik Jan
>>>>>> _______________________________________________
>>>>>> Aerogear-users mailing list
>>>>>> Aerogear-users(a)lists.jboss.org
>>>>>>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Aerogear-users mailing list
>>>>> Aerogear-users(a)lists.jboss.org
>>>>>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> Erik Jan
>>>> _______________________________________________
>>>> Aerogear-users mailing list
>>>> Aerogear-users(a)lists.jboss.org
>>>>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>>>>
>>>
>>> _______________________________________________
>>> Aerogear-users mailing list
>>> Aerogear-users(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>>>
>>>
>>
>>
>> --
>> Cheers,
>> Erik Jan
>> _______________________________________________
>> Aerogear-users mailing list
>> Aerogear-users(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>>
>
> _______________________________________________
> Aerogear-users mailing list
> Aerogear-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>
>
_______________________________________________
Aerogear-users mailing list
Aerogear-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-users