Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24729] iOS: Resolve iOS 8 deprecations for ABPeoplePickerNavigationController

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-06-19T15:19:35.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.2.0
ComponentsiOS
Labelsqe-6.2.0
ReporterVijay Singh
AssigneeVijay Singh
Created2017-05-24T04:14:18.000+0000
Updated2017-06-20T15:15:56.000+0000

Description

In SDK 6.0.0, we updated the default minimum iOS target to 8.0 as a result of the Xcode 8.x version that is now supported. Doing that, our iOS SDK core shows some deprecation-warnings regarding API's that should be replaced in iOS 8 and later. Replace ABPeoplePickerNavigationController (in Ti.Contacts, replacement straight forward) This is subset of ticket TIMOB-24335.

Comments

  1. Vijay Singh 2017-05-24

    PR: https://github.com/appcelerator/titanium_mobile/pull/9080 Test Case:
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var btn = Ti.UI.createButton({
           title: 'Open Contact'
       });
       
       var performAddressBookFunction = function(){
       Ti.Contacts.showContacts({
         cancel:function(e) {
       Ti.API.info('cancel called');
         },
         // Comment selectedPerson block to verify selected property 
         selectedPerson:function(e){
           Ti.API.info('selected person called' +e.person);
           Ti.API.info(' selected person name is :' +e.person.fullName);
         },
         selectedProperty:function(e){
         Ti.API.info('selected property called');
         Ti.API.info(' selected property detail is :' +JSON.stringify(e));
         }
       });
       };
       var addressBookDisallowed = function(){
         Ti.API.info('contact permission not allowed');
       };
       
       
       btn.addEventListener('click', function() {
         if (Ti.Contacts.hasContactsPermissions()) {
           performAddressBookFunction();
       } else {
           Ti.Contacts.requestContactsPermissions(function(e) {
               if (e.success) {
                   performAddressBookFunction();
               } else {
                   addressBookDisallowed();
               }
           });
       }});
       
       win.add(btn);
       win.open();
       
       
    NOTE : Please verify it for iOS < 9 also.
  2. Harry Bryant 2017-06-20

    Verifed as fixed, ran test case against iOS8/9/10 with Ti SDK 6.1.0.GA & Master v6.2.0.v20170619134258 Tested On: iPhone 7 10.3.2 Device & Simulator iPhone 6 8.1 & 9.3 Simulator Mac OS Sierra (10.12.5) Ti SDK: 6.2.0.v20170619134258 Appc NPM: 4.2.9 App CLI: 6.2.2 Xcode 8.3.3 Node v4.6.0 *Closing ticket.*

JSON Source