[TIMOB-14062] iOS Calendar: EventsAuthorizationResponse always return success in the first time even if the user press 'Don't Allow' button on the dialog requesting permission
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-07-03T17:23:31.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | 2013 Sprint 14, 2013 Sprint 14 API, Release 3.1.2, Release 3.2.0 |
Components | iOS |
Labels | calendar, iOS, qe-testadded, triage |
Reporter | Meenakshi Pathak |
Assignee | Sabil Rahim |
Created | 2013-05-31T04:54:59.000+0000 |
Updated | 2013-08-23T11:10:52.000+0000 |
Description
EventsAuthorizationResponse always return success in the first time even if the user press 'Don't Allow' button on the dialog requesting permission.
Here is the test case:
if(Ti.Calendar.eventsAuthorization == Ti.Calendar.AUTHORIZATION_AUTHORIZED) {
// performCalendarReadFunctions();
} else {
Ti.Calendar.requestEventsAuthorization(function(e){
if (e.success) {
alert('You have granted access to the calendar');
//performCalendarReadFunctions();
} else {
alert('Access to calendar is not allowed');
}
});
}
Scenarios which are tested are as follow:
1. First time authorization and user press 'Don't allow' button: We get 'Success' alert but still No calendar is shown.
2. After first authorization when 'Don't allow' was pressed : We get 'error' callback.
3. First time authorization and user press 'OK' button : We get 'Success' alert and calendar is shown.
PR against master https://github.com/appcelerator/titanium_mobile/pull/4435
Backport to 3_1_X https://github.com/appcelerator/titanium_mobile/pull/4494
Verified the fix & now it returns 'access to calendar is not allowed' the first time after pressing 'don't allow' button. Thus closing. Environment: Appcel Studio : 3.1.2.201308091728 Ti SDK : 3.1.2.v20130814124556 Mac OSX : 10.8.4 Alloy : 1.2.0-beta CLI - 3.1.2-alpha Iphone5 - 6.0