{ "id": "153254", "key": "TIMOB-20010", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-11-18T20:15:33.000+0000", "created": "2015-11-17T19:57:24.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "iOS9", "qe-5.1.0" ], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "issuelinks": [ { "id": "49889", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "153290", "key": "TIMOB-20013", "fields": { "summary": "iOS8: Ti.Contacts - relatedNames property causes crash", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-11-20T18:25:27.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "h5. Description:\r\nThis issue was located using KitchenSink, whilst testing Phone > Contacts > Remove Contact. Attempting to remove a contact using an app will cause it to crash, and after checking the native address book, the contact remains as existing. This problem affects iOS9 only, it does not occur when using the same code on an iOS8 device.\r\n\r\nh5. Steps to reproduce:\r\n1.Import KitchenSink to iOS9 or Sim.\r\n2. Navigate to Phone > Contacts > Remove Contact.\r\n3. Select a contact to remove.\r\n4. App will crash.\r\n5. Navigate to native contacts book, and look for the entry selected in step 3.\r\n6. the entry will still be present.\r\n\r\nh5. Result:\r\nApp will crash and fail to remove contact from address book.\r\nh5. Expected Result:\r\nApp should not crash, and should succeed in removing contact from address book.", "attachment": [], "flagged": false, "summary": "iOS9: Remove Contacts causes app to crash", "creator": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "environment": "Mac OSX El Capitan 10.11 (15A284)\r\nTi SDK: 5.1.0.v20151116164430\r\nAppc Studio: 4.4.0.201511130407\r\nAppc NPM: 4.2.1.GA\r\nAppc CLI: 5.1.0-60\r\nTi CLI: 5.0.5\r\nAlloy: 1.7.26\r\nXcode 7.1(7B91b)\r\nNode v0.12.7\r\nproduction", "closedSprints": [ { "id": 525, "state": "closed", "name": "2015 Sprint 23 SDK", "startDate": "2015-11-07T01:30:15.519Z", "endDate": "2015-11-21T01:30:00.000Z", "completeDate": "2015-11-23T02:54:27.887Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "370596", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/7462\r\nPR (5_1_X): https://github.com/appcelerator/titanium_mobile/pull/7463", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-17T22:33:38.000+0000", "updated": "2015-11-17T22:33:38.000+0000" }, { "id": "370610", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-18T00:32:39.000+0000", "updated": "2015-11-18T00:32:39.000+0000" }, { "id": "370614", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Master PR: https://github.com/appcelerator/titanium_mobile/pull/7464\r\n5_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/7465", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-18T01:06:26.000+0000", "updated": "2015-11-18T01:06:26.000+0000" }, { "id": "370615", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Sample Code:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\nvar pong = null;\r\nvar circleOfTrust = null;\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: 'authorization status?',\r\n\ttop:'5%'\r\n});\r\n\r\nbtn.addEventListener('click', function(e){\r\n\talert(Ti.Contacts.contactsAuthorization);\r\n});\r\n\r\nvar btn2 = Ti.UI.createButton({\r\n\ttitle: 'grant authorization',\r\n\ttop:'10%'\r\n});\r\n\r\nbtn2.addEventListener('click', function(e){\r\n\tTi.Contacts.requestAuthorization(function(e) {\r\n\t\tif (e.success == true) {\r\n\t\t\talert('success');\r\n\t\t}\r\n\t\telse {\r\n\t\t\talert('no');\r\n\t\t}\r\n\t});\r\n});\r\n\r\nvar btn3 = Ti.UI.createButton({\r\n\ttitle: 'show Contacts',\r\n\ttop:'15%'\r\n});\r\n\r\nbtn3.addEventListener('click', function(e){\r\n\tTi.Contacts.showContacts({\r\n\t\tcancel: function(e) {\r\n\t\t\talert('cancelled');\r\n\t\t},\r\n//\t\tselectedPerson: function(e) {\r\n//\t\t\tvar person = e.person;\r\n//\t\t\talert('person selected is ' + person.fullName + ' with identifier ' + person.identifier);\r\n//\t\t},\r\n\t\tselectedProperty: function(e) {\r\n\t\t\talert('property selected\\n' + e.property +'\\n' + e.label +'\\n'+e.value);\r\n\t\t\tTi.API.info(e.value);\r\n//\t\t\tTi.API.info(e.person.fullName);\r\n//\t\t\tTi.API.info(e.property);\r\n//\t\t\tTi.API.info(e.value);\r\n//\t\t\tTi.API.info(e.label);\r\n\t\t}\r\n\t});\r\n});\r\n\r\nvar btn4 = Ti.UI.createButton({\r\n\ttitle: 'get All Contacts',\r\n\ttop:'20%'\r\n});\r\n\r\nbtn4.addEventListener('click', function(e){\r\n\tvar people = Ti.Contacts.getAllPeople();\r\n\tTi.API.info(people);\r\n\tfor (var i = people.length - 1; i >= 0; i--) {\r\n\t\tTi.API.info(people[i].fullName);\r\n\t};\r\n});\r\n\r\nvar btn5 = Ti.UI.createButton({\r\n\ttitle: 'get All Groups',\r\n\ttop:'25%'\r\n});\r\n\r\nbtn5.addEventListener('click', function(e){\r\n\tvar groups = Ti.Contacts.getAllGroups();\r\n\tTi.API.info(groups);\r\n\tfor (var i = groups.length - 1; i >= 0; i--) {\r\n\t\tTi.API.info(groups[i].name);\r\n\t};\r\n});\r\n\r\nvar btn6 = Ti.UI.createButton({\r\n\ttitle: 'get AppleSeed by identifier with image',\r\n\ttop:'30%'\r\n});\r\n\r\nbtn6.addEventListener('click', function(e){\r\n\tvar people = Ti.Contacts.getAllPeople();\r\n\tvar person = Ti.Contacts.getPersonByIdentifier(people[0].identifier);\r\n\talert(person.fullName);\r\n\tTi.API.info(person.firstName);\r\n\tTi.API.info(person.birthday);\r\n\tif (person.kind == Ti.Contacts.CONTACTS_KIND_PERSON) {\r\n\t\tTi.API.info('person is person');\r\n\t} \r\n\telse if (person.kind == Ti.Contacts.CONTACTS_KIND_ORGANIZATION)\t{\r\n\t\tTi.API.info('person is organization');\r\n\t}\r\n\telse {\r\n\t\tTi.API.info('unSupported kind??');\r\n\t}\r\n\tTi.API.info(person.address);\r\n\tTi.API.info(person.instantMessage);\r\n\tTi.API.info(person.email);\r\n\tTi.API.info(person.socialProfile);\r\n\tTi.API.info(person.date);\r\n\tTi.API.info(person.phone);\r\n\tTi.API.info(person.relatedNames);\t\r\n\tTi.API.info(person.url);\r\n\timgView.setImage(person.image);\r\n\timgView.show();\r\n});\r\nvar btn7 = Ti.UI.createButton({\r\n\ttitle: 'get first group by identifier',\r\n\ttop:'35%'\r\n});\r\n\r\nbtn7.addEventListener('click', function(e){\r\n\tvar groups = Ti.Contacts.getAllGroups();\r\n\tvar group = Ti.Contacts.getGroupByIdentifier(groups[0].identifier);\r\n\talert(group.name);\r\n});\r\nvar btn8 = Ti.UI.createButton({\r\n\ttitle: 'get people with names John',\r\n\ttop:'40%'\r\n});\r\n\r\nbtn8.addEventListener('click', function(e){\r\n\tvar people = Ti.Contacts.getPeopleWithName('john');\r\n\tfor (var i = people.length - 1; i >= 0; i--) {\r\n\t\tTi.API.info(people[i].fullName);\r\n//\t\tTi.API.info(people[i].lastName);\r\n\t};\r\n\tTi.API.info(people[0].address);\r\n\tTi.API.info(people[0].birthday);\r\n//\tTi.API.info(people[1].instantMessage);\r\n//\tTi.API.info(people[0].email);\r\n//\tTi.API.info(people[0].socialProfile);\r\n//\tTi.API.info(people[0].alternateBirthday);\r\n//\tTi.API.info(people[0].date);\r\n\tTi.API.info(people[0].phone);\r\n//\tTi.API.info(people[1].relatedNames);\t\r\n//\tTi.API.info(people[1].url);\t\r\n\r\n});\r\n\r\nvar btn9 = Ti.UI.createButton({\r\n\ttitle: 'create new person pong',\r\n\ttop:'45%'\r\n});\r\n\r\nbtn9.addEventListener('click', function(e){\r\n\tpong = Ti.Contacts.createPerson({\r\n \t\tfirstName: 'letter',\r\n \t\tlastName: 'pong',\r\n \t\tmiddleName: 'long',\r\n \t\tnickname: 'fancyPants',\r\n \t\tprefix: 'Mr',\r\n \t\tsuffix: 'Jr',\r\n \t\tfirstPhonetic: 'a',\r\n \t\tmiddlePhonetic: 'b',\r\n \t\tlastPhonetic: 'c',\r\n \t\torganization: 'appcelerator',\r\n \t\tdepartment: 'SDK',\r\n \t\tjobTitle: 'pingPongChampion',\r\n \t\tnote: 'when i was young, i ping pong to the top',\r\n \t\tkind: Ti.Contacts.CONTACTS_KIND_PERSON,\r\n \t\taddress:{\r\n \twork:[\r\n\t {\r\n\t CountryCode: 'gb', // determines how the address is displayed\r\n\t Street: '200 Brook Drive\\nGreen Park',\r\n\t City: 'Reading',\r\n\t Country: 'England',\r\n\t PostalCode: 'RG2 6UB'\r\n\t },\r\n\t {\r\n\t CountryCode: 'gb', // determines how the address is displayed\r\n\t Street: '1 St Pauls Road\\nClerkenwell',\r\n\t City: 'City of London',\r\n\t State: 'London',\r\n\t Country: 'England',\r\n\t PostalCode: 'EC1 1AA'\r\n\t }\r\n\t ],\r\n\t home:[\r\n\t {\r\n\t CountryCode: 'gb', // determines how the address is displayed\r\n\t Street: '2 Boleyn Court',\r\n\t City: 'London',\r\n\t State: 'Greenwich',\r\n\t Country: 'England',\r\n\t PostalCode: 'SE10'\r\n\t }\r\n\t ]\r\n\t },\r\n\t email:{\r\n home : [\r\n 'myGmail',\r\n 'myHotmail'\r\n ],\r\n work : [\r\n 'myWorkemail'\r\n ]\r\n \t},\r\n \t relatedNames:{\r\n \t \tfather: 'baba',\r\n \t \tmother: 'mama',\r\n \t \tchild: 'gaga'\r\n \t },\r\n\t birthday: '2012-01-01T12:00:00.000+0000',\r\n\t instantMessage:{\r\n\t home:[\r\n\t {\r\n\t service: 'AIM',\r\n\t username: 'leisureAIM'\r\n\t },\r\n\t {\r\n\t service: 'MSN',\r\n\t username: 'no_paul_here@msn.com'\r\n\t }\r\n\t ],\r\n\t work:[\r\n\t {\r\n\t service: 'AIM',\r\n\t username: 'seriousAIM'\r\n\t }\r\n\t ]\r\n\t },\r\n\t organization: 'Appcelerator',\r\n\t phone:{\r\n\t main: ['07900 000001', '07900 000002'],\r\n\t iPhone: ['+44 (0)118 925 6128', '+44 (0)118 000 0000']\r\n\t },\r\n\t alternateBirthday: {\r\n calendarIdentifier: 'chinese',\r\n day: 25,\r\n era: 78,\r\n isLeapMonth: false,\r\n month: 11,\r\n year: 16\r\n },\r\n socialProfile:{\r\n\t home:[{\r\n\t service: 'facebook',\r\n\t username: 'jdeep@facebook.com'\r\n\t },\r\n\t {\r\n\t service: 'gamecenter',\r\n\t username: 'jdeep@hotmail.com'\r\n\t }],\r\n\t work:[{\r\n\t service: 'linkedin',\r\n\t username: 'jdeep@linkedin.com'\r\n\t }]\r\n },\r\n\r\n\t url:{\r\n\t homepage: ['www.google.com'],\r\n\t work: ['www.appcelerator.com', 'www.example.com']\r\n\t },\r\n\t date:{\r\n\t \tanniversary: ['2006-06-25T12:00:00.000+0000','2007-06-25T12:00:00.000+0000'],\r\n\t \tother: ['2009-03-25T12:00:00.000+0000']\r\n\t }\r\n\t});\r\n\talert('pong added. check in get all contacts');\r\n});\r\n\r\n\r\n\r\nvar btn10 = Ti.UI.createButton({\r\n\ttitle: 'create new group circleOfTrust',\r\n\ttop:'50%'\r\n});\r\n\r\nbtn10.addEventListener('click', function(e){\r\n\tcircleOfTrust = Ti.Contacts.createGroup({\r\n \t\tname: 'Circle Of Trust'\r\n \t});\r\n\tTi.Contacts.save();\r\n\talert('circleOfTrust created. check in get All Groups');\r\n});\r\n\r\nvar btn11 = Ti.UI.createButton({\r\n\ttitle: 'add pong to circleOfTrust',\r\n\ttop:'55%'\r\n});\r\n\r\nbtn11.addEventListener('click', function(e){\r\n\tcircleOfTrust.add(pong);\r\n\talert('pong added to group.');\r\n});\r\n\r\nvar btn12 = Ti.UI.createButton({\r\n\ttitle: 'Remove pong from circleOfTrust',\r\n\ttop:'60%'\r\n});\r\n\r\nbtn12.addEventListener('click', function(e){\r\n\tcircleOfTrust.remove(pong);\r\n\tTi.Contacts.save();\r\n\talert('pong removed from group.');\r\n});\r\n\r\nvar btn13 = Ti.UI.createButton({\r\n\ttitle: 'Remove circleOfTrust',\r\n\ttop:'65%'\r\n});\r\n\r\nbtn13.addEventListener('click', function(e){\r\n\tTi.Contacts.removeGroup(circleOfTrust);\r\n\tTi.Contacts.save();\r\n\talert('circleOfTrust removed. check in get All Groups');\r\n});\r\n\r\nvar btn14 = Ti.UI.createButton({\r\n\ttitle: 'Remove pong',\r\n\ttop:'70%'\r\n});\r\n\r\nbtn14.addEventListener('click', function(e){\r\n\tTi.Contacts.removePerson(pong);\r\n\tTi.Contacts.save();\r\n\talert('pong removed. check in get all Contacts');\r\n});\r\n\r\nvar btn15 = Ti.UI.createButton({\r\n\ttitle: 'add 5 guys to circleOfTrust',\r\n\ttop:'75%'\r\n});\r\nbtn15.addEventListener('click', function(e){\r\n\tvar all = Ti.Contacts.getAllPeople();\r\n\tfor (var i = 0; i < 5; i++) {\r\n\t\tcircleOfTrust.add(all[i]);\r\n\t};\t\r\n\talert('5 guys added');\r\n});\r\n\r\nvar btn16 = Ti.UI.createButton({\r\n\ttitle: 'see all members in circle of trust',\r\n\ttop:'80%'\r\n});\r\n\r\nbtn16.addEventListener('click', function(e){\r\n\tvar members = circleOfTrust.members();\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tTi.API.info(members[i].fullName);\r\n\t};\r\n});\r\n\r\nvar btn17 = Ti.UI.createButton({\r\n\ttitle: 'sorted firstName in circleoftrust',\r\n\ttop:'85%'\r\n});\r\n\r\nbtn17.addEventListener('click', function(e){\r\n\tvar members = circleOfTrust.sortedMembers(Ti.Contacts.CONTACTS_SORT_FIRST_NAME);\r\n\tTi.API.info(members);\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tTi.API.info(members[i].fullName);\r\n\t};\r\n});\r\n\r\nvar btn18 = Ti.UI.createButton({\r\n\ttitle: 'sorted lastName in circleoftrust',\r\n\ttop:'90%'\r\n});\r\n\r\nbtn18.addEventListener('click', function(e){\r\n\tvar members = circleOfTrust.sortedMembers(Ti.Contacts.CONTACTS_SORT_LAST_NAME);\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tTi.API.info(members[i].fullName);\r\n\t};\r\n});\r\n\r\nvar imgView = Ti.UI.createImageView({\r\n\ttop:'95%',\r\n\theight:'5%',\r\n\twidth: '5%'\r\n})\r\n\r\nTi.Contacts.addEventListener('reload', function() {\r\n\tTi.API.info('contacts changed outside!');\r\n});\r\nwin.add(btn);\r\nwin.add(btn2);\r\nwin.add(btn3);\r\nwin.add(btn4);\r\nwin.add(btn5);\r\nwin.add(btn6);\r\nwin.add(btn7);\r\nwin.add(btn8);\r\nwin.add(btn9);\r\nwin.add(btn10);\r\nwin.add(btn11);\r\nwin.add(btn12);\r\nwin.add(btn13);\r\nwin.add(btn14);\r\nwin.add(btn15);\r\nwin.add(btn16);\r\nwin.add(btn17);\r\nwin.add(btn18);\r\nwin.add(imgView);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-18T01:07:42.000+0000", "updated": "2015-11-18T01:07:42.000+0000" }, { "id": "370616", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "h4. Steps to test\r\n1. grant authorisation\r\n2. create new person pong\r\n3. create new group circleOfTrust\r\n4. add pong to circleOfTrust\r\n5. remove pong from circleOfTrust\r\n6. remove circleOfTrust\r\n7. remove pong", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-18T01:09:04.000+0000", "updated": "2015-11-18T01:09:04.000+0000" }, { "id": "370750", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2015-11-18T21:02:35.000+0000", "updated": "2015-11-18T21:02:35.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }