{ "id": "154115", "key": "TIMOB-20194", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2016-01-19T04:21:39.000+0000", "created": "2016-01-04T23:59:43.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "iOS", "qe-5.1.2" ], "versions": [ { "id": "17072", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-12" } ], "issuelinks": [ { "id": "50225", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "154112", "key": "TIMOB-20193", "fields": { "summary": "iOS: Ti.Contacts Cannot create a new entry with unsaved changes", "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": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-03-24T18:27:28.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\n\r\nWhen calling {{removeGroup();}} the following message is received in the console:\r\n{code:java}\r\n[INFO] : -[CNGroup setSnapshot:]: unrecognized selector sent to instance 0x144f26760\r\n{code}\r\n\r\nThis does not cause an error, and groups are successfully removed, however this may be worth investigating.\r\n\r\nDemo Code: \r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: \"White\"\r\n});\r\n\r\nvar newGroup = null;\r\nvar allGroups = null;\r\nvar failCase = null;\r\n\r\nfunction testCase(){\r\n\tif(failCase != null) {\r\n\treturn false;\r\n\t} else{\r\n\t\treturn true;\r\n\t}\r\n}\r\n\r\nvar createPerson = Ti.UI.createButton({\r\n\ttitle: 'Create Person 1',\r\n\ttop: '35%'\r\n});\r\n\r\ncreatePerson.addEventListener('click', function(){\r\n\tvar newPerson = Ti.Contacts.createPerson({\r\n\t\tfirstName: 'Testing',\r\n\t\tlastName: '123'\r\n\t\t\r\n\t});\r\n\t\r\n\tTi.Contacts.save();\r\n});\r\n\r\nvar createGroup = Ti.UI.createButton({\r\n\ttitle: 'Create Test Group 1',\r\n\ttop: '20%',\r\n});\r\n\r\nvar removeGroup = Ti.UI.createButton({\r\n\ttitle: 'Remove Test Group 1',\r\n\tbottom: '20%'\r\n});\r\n\r\nvar findGroup = Ti.UI.createButton({\r\n\ttitle: 'Find Test Group 1',\r\n\ttop: '50%'\r\n});\r\n\r\ncreateGroup.addEventListener('click', function(){\r\n\tnewGroup = Ti.Contacts.createGroup();\r\n\tnewGroup.name = \"Test Group 1\";\r\n\tTi.API.info(\"Test Group 1 Created!\");\r\n\tTi.Contacts.save();\r\n});\r\n\r\nremoveGroup.addEventListener('click', function(){\r\n\t allGroups = Titanium.Contacts.getAllGroups();\r\n\t \r\n for (var i = 0; i < allGroups.length; i++) {\r\n Ti.API.info(\"found group name: \" + allGroups[i].name);\r\n if (allGroups[i].name == \"Test Group 1\") {\r\n Ti.Contacts.removeGroup(allGroups[i]);\r\n \r\n Ti.API.info(allGroups[i].name + \" Successfully Removed!\");\r\n failCase = null;\r\n } else {\r\n \tTi.API.info(\"Failed to remove group: \" + allGroups[i].name);\r\n \tfailCase = \"Not Found\";\r\n }\r\n }\r\n Ti.Contacts.save();\r\n});\r\n\r\nfindGroup.addEventListener('click', function(){\r\n\tallGroups = Titanium.Contacts.getAllGroups();\r\n\tTi.Contacts.save();\r\n for (var i = 0; i < allGroups.length; i++) {\r\n Ti.API.info(\"found group name: \" + allGroups[i].name);\r\n \r\n if (allGroups[i].name == \"Test Group 1\") {\r\n Ti.API.info('Test Group 1 Found!');\r\n failCase = null;\r\n \r\n } else if(allGroups[i].name != \"Test Group 1\" || allGroups[i].name == null) {\r\n \tTi.API.info('Test Group 1 Not Found');\r\n \tfailCase = \"Not Found\";\r\n }\r\n }\r\n});\r\n\r\nwin.add(createPerson);\r\nwin.add(createGroup);\r\nwin.add(removeGroup);\r\nwin.add(findGroup);\r\nwin.open();\r\n{code}\r\n\r\n\r\nh5. Steps to reproduce:\r\n1. Create a new Classic Project.\r\n2. Use demo code provided above in app.js.\r\n3. Tap on \"Create Test Group 1\"\r\n4. Tap on \"Remove Test Group 1\"\r\n5. Observe console for message.\r\n\r\nh5. Result:\r\n\r\nReceive: \r\n{code:java}\r\n[INFO] : -[CNGroup setSnapshot:]: unrecognized selector sent to instance 0x144f26760\r\n{code}\r\n\r\nh5. Expected Result:\r\n\r\nShould not receive following console message.", "attachment": [], "flagged": false, "summary": "iOS: Ti.Contacts unrecognized selector sent to instance", "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": "iPhone 6S Device & Simulator (9.2) \r\nMac OSX El Capitan 10.11 (15A284) \r\nStudio: 4.4.0.201511241829 \r\nTi SDK: 5.1.2.v20151216190036 \r\nAppc NPM: 4.2.2 \r\nApp CLI: 5.1.0 \r\nNode v4.2.3 \r\npreproduction", "comment": { "comments": [ { "id": "374805", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "Duplicate of TIMOB-20193", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-01-19T04:21:39.000+0000", "updated": "2016-01-19T04:21:39.000+0000" }, { "id": "415677", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate with reference to the linked issues.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:27:28.000+0000", "updated": "2017-03-24T18:27:28.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }