{"action":"created","issue":{"url":"https://api.github.com/repos/telerik/ios-sim-portable/issues/80","repository_url":"https://api.github.com/repos/telerik/ios-sim-portable","labels_url":"https://api.github.com/repos/telerik/ios-sim-portable/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/telerik/ios-sim-portable/issues/80/comments","events_url":"https://api.github.com/repos/telerik/ios-sim-portable/issues/80/events","html_url":"https://github.com/telerik/ios-sim-portable/issues/80","id":183175295,"number":80,"title":"Can't run tns emulate ios --device \"iPad Pro (12.9 inch)\"","user":{"login":"asterizk","id":6105333,"avatar_url":"https://avatars.githubusercontent.com/u/6105333?v=3","gravatar_id":"","url":"https://api.github.com/users/asterizk","html_url":"https://github.com/asterizk","followers_url":"https://api.github.com/users/asterizk/followers","following_url":"https://api.github.com/users/asterizk/following{/other_user}","gists_url":"https://api.github.com/users/asterizk/gists{/gist_id}","starred_url":"https://api.github.com/users/asterizk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asterizk/subscriptions","organizations_url":"https://api.github.com/users/asterizk/orgs","repos_url":"https://api.github.com/users/asterizk/repos","events_url":"https://api.github.com/users/asterizk/events{/privacy}","received_events_url":"https://api.github.com/users/asterizk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-15T00:07:53Z","updated_at":"2016-12-13T13:04:21Z","closed_at":null,"body":"I can't run `tns emulate ios --device \"iPad Pro (12.9 inch)\"`\n\nDoing so results in the following message:\n`Starting iOS Simulator\nUnable to find device iPad Pro (12.9 inch). The valid device names are iPhone 5, iPhone 5s, iPhone 6, iPhone 6 Plus, iPhone 6s, iPhone 6s Plus, iPhone 7, iPhone 7 Plus, iPhone SE, iPad Retina, iPad Air, iPad Air 2`\n\nExpected result:\n- Starts 12.9\" iPad simulator\n\nThis error occurs despite 'xcrun simctl list' outputting the 12.9\" iPad as an option.\n\nI believe I've tracked the root cause down to the fact that \"iPad Pro (9.7 inch)\" and the \"iPad Pro (12.9 inch)\" devices contain parentheses in their names, and the regex that parses the output of 'xcrun simctl list' doesn't expect those parentheses to be there:\n\n`var lineRegex = /^    ([^\\(]+) \\(([^\\)]+)\\) \\(([^\\)]+)\\)( \\(([^\\)]+)\\))*/;`\n\nThat regex is contained in the following file: `ios-sim-portable-master/lib/simctl.ts`\n\nI've got version 1.3.0 of ios-sim-portable. In the meantime I'm working around it by manually adding devices to the device list in my installed copy of `simctl.js`:\n\n```\n            devices.push({\n                            name: 'iPad Pro (9.7 inch)',\n                            id: 'F123F133-F175-4FF4-ABA5-4A043EFCA810',\n                            fullId: \"com.apple.CoreSimulator.SimDeviceType.iPad Pro (9.7 inch)\",\n                            runtimeVersion: '10.0',\n                            state: 'Shutdown'\n                        });\n\n\n            devices.push({\n                            name: 'iPad Pro (12.9 inch)',\n                            id: '07552BEF-F830-4561-912B-D760B0716935',\n                            fullId: \"com.apple.CoreSimulator.SimDeviceType.iPad Pro (12.9 inch)\",\n                            runtimeVersion: '10.0',\n                            state: 'Shutdown'\n                        });\n```\n\n...right before the `return devices;` statement.\n\nObviously this is a big hack and not a solution (the solution would involve fixing that regex), but at the present it allows me to launch my Nativescript app on the 12.9\" iPad under emulation, which is pretty important for me because it's the only iOS platform my company actually supports at the moment.\n\nThe symptoms look very similar to https://github.com/phonegap/ios-sim/issues/197.  Note that aharbick there has a proposed fix for that regex that might be useful here too.\n\nMy config:\nOS X 10.11.6\nXcode 8.0 (8A218a)\ntns --version: 2.3.0\nios-sim-portable: 1.3.0\nnpm --version: 3.10.8\ntsc --version: Version 2.0.3\n"},"comment":{"url":"https://api.github.com/repos/telerik/ios-sim-portable/issues/comments/266733161","html_url":"https://github.com/telerik/ios-sim-portable/issues/80#issuecomment-266733161","issue_url":"https://api.github.com/repos/telerik/ios-sim-portable/issues/80","id":266733161,"user":{"login":"vbresults","id":7179668,"avatar_url":"https://avatars.githubusercontent.com/u/7179668?v=3","gravatar_id":"","url":"https://api.github.com/users/vbresults","html_url":"https://github.com/vbresults","followers_url":"https://api.github.com/users/vbresults/followers","following_url":"https://api.github.com/users/vbresults/following{/other_user}","gists_url":"https://api.github.com/users/vbresults/gists{/gist_id}","starred_url":"https://api.github.com/users/vbresults/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbresults/subscriptions","organizations_url":"https://api.github.com/users/vbresults/orgs","repos_url":"https://api.github.com/users/vbresults/repos","events_url":"https://api.github.com/users/vbresults/events{/privacy}","received_events_url":"https://api.github.com/users/vbresults/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T13:04:21Z","updated_at":"2016-12-13T13:04:21Z","body":"@enchev iPad Pro 12.9 inch is used to generate the iPad screenshot for the new iTunes Connect screenshot system that uses the largest image in the device family and scales it down;\r\n\r\nAs it stands, this bug makes it complex to publish new app store apps without having a physical iPad Pro, and without @asterizk 's patch I would have been in a rough spot"}}
{"actor":{"display_login":"vbresults"}}