[AC-1365] setting appbadge causes request for push notification prompt
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2014-07-10T00:38:00.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Alloy, Titanium SDK & CLI |
| Labels | ios, pushnotification |
| Reporter | wahyudinata setiawan |
| Assignee | Mauro Parra-Miranda |
| Created | 2014-07-02T19:18:50.000+0000 |
| Updated | 2016-03-08T07:37:46.000+0000 |
Description
setting appbadge will prompt the user with a push notification permission request dialog.
To replicate, just set the appbadge to something: Ti.UI.iPhone.appBadge = 1;
the expected behavior is to not do anything.
we should prompt for that permission by explicitly calling Ti.Network.registerForPushNotifications
We tried to reproduce this issue with a sample test case. It’s working as expected with Titanium SDK 3.3.0 RC. Please try the sample code and let us know if the problem persists.
TESTING ENVIRONMENT:
Ti CLI 3.3.0-rc Titanium SDK: 3.3.0.RC iOS device 7.1Sample Code
var win = Titanium.UI.createWindow({ title:'ACS iOS App', backgroundColor:'#fff' }); Ti.UI.iPhone.appBadge=1; win.open();STEPS TO TEST
1. Create a new project 2. Update app.js file with sample code 4. And run on iOS device 7.1 5. Works fine 5. EXPECTED RESULT It’s working as expected. ThanksFixed in 3.3.0.