Project: titanium
Issue TIMOB-23440: Windows: Ti.Contacts permission methods need to renamed be to match iOS and Android
h5.Description Currently, Windows uses {{Ti.Contacts.requestAuthorization()}} to request authorization, this should be changed to match iOS and Android which use {{Ti.Contacts.requestContactsPermissions()}} this was implemented in TIMOB-19479 {code} Ti.Contacts.requestContactsPermissions(function(e) { if (e.success === true) { alert("Access granted"); } else { alert("Access denied, error: " + e.error); } }); {code} iOS and Android also use {{Ti.Contacts.hasContactsPermissions()}} to detect whether permissions are accepted for the app or not. h5.Steps to reproduce 1. Using the code above build to a Windows device or emulator h5.Actual result The application will throw the error {code} [ERROR] : Application Error: { [ERROR] : "line": 2, [ERROR] : "column": 10, [ERROR] : "message": "Error while require(/app) Ti.Contacts.requestContactsPermissions is not a function. (In 'Ti.Contacts.requestContactsPermissions', 'Ti.Contacts.requestContactsPermissions' is undefined)", [ERROR] : "native_stack": [ [ERROR] : "JSExportClass::CallNamedFunction" [ERROR] : ] [ERROR] : } {code} h5.Expected result The same method should be used across all platforms
Story points: 3