{ "id": "91409", "key": "TIMOB-9007", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-29T09:19:20.000+0000", "created": "2012-05-06T07:11:30.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api", "parity" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "33907", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "98413", "key": "AC-3088", "fields": { "summary": "iOS: Switch is not show on the screen if its \"value\" property is not set", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "31080", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "118417", "key": "ALOY-786", "fields": { "summary": "Alloy parser for Switch should set the value property on iOS", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-11-17T15:05:51.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": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Problem\r\n\r\nUnless the [Titanium.UI.Switch.value|http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.Switch-property-value] property has been set, the switch does not render on iOS.\r\n\r\nThis is not necessary for Android, so adding the parity label to this ticket.\r\n\r\nh2. Test Case\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n layout: 'vertical'\r\n});\r\n\r\nfunction printSwitchProperties(obj){\r\n\tvar props = ['enabled', 'value'];\r\n\tfor (var p in props){\r\n\t\tTi.API.info('Switch property ' + props[p] + ': '+ obj[props[p]]);\r\n\t}\r\n}\r\n\r\nvar basicSwitch = Ti.UI.createSwitch({\r\n\t// value:true // uncomment to display switch \r\n});\r\nwin.add(basicSwitch);\r\nprintSwitchProperties(basicSwitch);\r\n\r\nbasicSwitch.addEventListener('change',function(e){\r\n\tprintSwitchProperties(e.source);\r\n});\r\n\r\nwin.open();\r\n{code} ", "attachment": [ { "id": "36561", "filename": "iOS Simulator Screen shot Mar 22, 2013 4.46.15 PM.png", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-22T11:19:57.000+0000", "size": 5308, "mimeType": "image/png" }, { "id": "36562", "filename": "Screenshot_2013-03-22-15-58-11.png", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-22T11:19:57.000+0000", "size": 18613, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: UI.Switch - does not display if value is not set when rendered", "creator": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium 2.0.1 GA2\r\n* iOS 5.0\r\n* Simulator\r\n", "closedSprints": [ { "id": 704, "state": "closed", "name": "2016 Sprint 18 SDK", "startDate": "2016-08-27T00:18:36.960Z", "endDate": "2016-09-10T00:18:00.000Z", "completeDate": "2016-09-09T20:26:13.865Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "243664", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "it works fine on android but doesn't works in iOS\n\niOS console :\n\n\n[INFO] : \b\b \b Switch property enabled: undefined\n[INFO] : \b\b \b Switch property value: undefined\n\nIssue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\niOS iPhone Simulator: iOS SDK version: 6.0\nDevice: Samsung galaxy s duos Android version: 4.0.4\njithinpv\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-22T11:18:53.000+0000", "updated": "2013-03-22T11:18:53.000+0000" }, { "id": "394588", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8278", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-28T23:13:19.000+0000", "updated": "2016-08-28T23:13:19.000+0000" }, { "id": "394612", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (unit-test): https://github.com/appcelerator/titanium-mobile-mocha-suite/pull/3", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-29T07:14:48.000+0000", "updated": "2016-08-29T07:14:48.000+0000" }, { "id": "394626", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Approved!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-29T09:18:25.000+0000", "updated": "2016-08-29T09:18:25.000+0000" }, { "id": "401357", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed. UI.Switch on the iOS platform now displays even if the value is not set when rendered.\r\n\r\nTested On:\r\niPhone 6 Plus 10.1.1 Device & Simulator\r\nMac OS Sierra (10.12.1)\r\nTi SDK: 6.1.0.v20161116071014\r\nAppc Studio: 4.8.0.201611121409\r\nAppc NPM: 4.2.8\r\nApp CLI: 6.1.0-14\r\nXcode 8.1\r\nNode v4.4.7\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-11-17T15:05:39.000+0000", "updated": "2016-11-17T15:05:39.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }