Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-20059

iOS: 'person' property in Ti.Contacts.showContacts is empty

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 5.1.0, Release 5.0.2
    • Fix Version/s: Release 5.2.0
    • Component/s: iOS
    • Labels:
    • Environment:

      iOS9.1
      Xcode 7.1.1
      Ti SDK 5.0.2GA and Ti SDK 5.1.0GA

    • Story Points:
      1
    • Sprint:
      2015 Sprint 24 SDK

      Description

      Issue Description

      On iOS, the callback event for both 'selectedProperty' and 'selectedPerson' of Ti.Contacts.showContacts has an empty value for the "person" property. When selecting a person from the contacts list, The expected behavior is to see an object attached to the person property that get the name of the contact (e.g., e.person.name).

      The callback event for 'selectedProperty' returns:

      {"value":"052255","property":"phone","label":"home","type":"selectedProperty","source":{},"person":{}} 
      

      Steps to replicate

      -Create a new titanium alloy project
      -Open the app folder
      -Replace the index.xml file inside views folder and the index.js file inside controllers
      -Build and run
      -Click open
      -Select a contact

      Test Case

      Index.xml

      <Alloy>
      		<Window id="nav" backgroundColor="#fff">
      			<Button onClick="open">Open</Button>
      		</Window>
      </Alloy>
      

      Index.js

      $.nav.open(); 
       
      function open(){
      	Ti.Contacts.showContacts({
      		selectedProperty: function(e){
      			alert(JSON.stringify(e));
      		}
      	});
      }
      

        Attachments

          Activity

            People

            • Assignee:
              ssombhatla Srikanth Sombhatla (Inactive)
              Reporter:
              rramirez Ricardo Ramirez
              Reviewer:
              Chee Kiat Ng (Inactive)
            • Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code