{ "id": "136279", "key": "TIMOB-17660", "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": "16586", "description": "Release 3.4.2", "name": "Release 3.4.2", "archived": false, "released": true, "releaseDate": "2017-03-11" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-10-02T20:33:33.000+0000", "created": "2014-09-09T13:49:11.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "Ti.UI.OptionDialog", "Ti.UI.iPad.Popover", "iOS8", "iPad", "kitchensink", "module_popover", "qe-manualtest" ], "versions": [], "issuelinks": [ { "id": "41699", "type": { "id": "10011", "name": "Includes", "inward": "is included by", "outward": "includes" }, "inwardIssue": { "id": "137364", "key": "TIMOB-17804", "fields": { "summary": "iOS8: Refactor OptionDialog", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "40937", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "136210", "key": "TIMOB-17639", "fields": { "summary": "iOS8: Ti.UI.OptionDialog.show() doesn't work without view-property on iPad", "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": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-11-21T20:00: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": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "This issue is probably related somehow to TIMOB-17639.\r\n\r\n*Problem*\r\nIf you want to show an {{Ti.UI.OptionDialog}} in a {{Ti.UI.iPad.Popover}} it won't show - or even crash if you pass a {{view}} property.\r\n\r\n*Reproducing*\r\nBuild and run the test case on the next 2 configurations to see it crash.\r\n\r\n* iOS 7.1 using 3.3.0.GA: Works\r\n* iOS 8.0 using 3.4.0-beta: *Fails*\r\n\r\nUncomment line 31 and repeat to see it fail without crash.\r\n\r\n*Test case*\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Click me'\r\n});\r\n\r\nbtn.addEventListener('click', function(e) {\r\n\r\n var popWin = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n });\r\n\r\n var popBtn = Ti.UI.createButton({\r\n title: 'Click me'\r\n });\r\n\r\n popWin.add(popBtn);\r\n\r\n var pop = Ti.UI.iPad.createPopover({\r\n width: 320,\r\n height: 320,\r\n contentView: popWin\r\n });\r\n\r\n popBtn.addEventListener('click', function(e) {\r\n Ti.UI.createOptionDialog({\r\n options: ['a', 'b']\r\n }).show({\r\n view: popBtn // also try without to fail without crash\r\n });\r\n });\r\n\r\n pop.show({\r\n view: btn\r\n });\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n\r\n*Crash*\r\n{code}\r\n[DEBUG] 2014-09-09 15:39:42.671 od[17557:1974892] Presenting view controllers on detached view controllers is discouraged .\r\n[ERROR] The application has crashed with an uncaught exception 'NSGenericException'.\r\n[ERROR] Reason:\r\n[ERROR] UIPopoverPresentationController (<_UIAlertControllerActionSheetRegularPresentationController: 0x79f6cfc0>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.\r\n[ERROR] Stack trace:\r\n[ERROR]\r\n[ERROR] 0 CoreFoundation 0x04bb4dda __exceptionPreprocess + 154\r\n[ERROR] 1 libobjc.A.dylib 0x0478e837 objc_exception_throw + 44\r\n[ERROR] 2 CoreFoundation 0x04bb4d1d +[NSException raise:format:] + 141\r\n[ERROR] 3 UIKit 0x01cc87f1 -[UIPopoverPresentationController presentationTransitionWillBegin] + 388\r\n[ERROR] 4 UIKit 0x015d9f25 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 1666\r\n[ERROR] 5 UIKit 0x015d8528 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 226\r\n[ERROR] 6 UIKit 0x0160b7ab __40+[UIViewController _scheduleTransition:]_block_invoke + 18\r\n[ERROR] 7 UIKit 0x014d2aee ___afterCACommitHandler_block_invoke + 15\r\n[ERROR] 8 UIKit 0x014d2a99 _applyBlockToCFArrayCopiedToStack + 415\r\n[ERROR] 9 UIKit 0x014d28ae _afterCACommitHandler + 545\r\n[ERROR] 10 CoreFoundation 0x04ad7fbe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30\r\n[ERROR] 11 CoreFoundation 0x04ad7f00 __CFRunLoopDoObservers + 400\r\n[ERROR] 12 CoreFoundation 0x04acd93a __CFRunLoopRun + 1226\r\n[ERROR] 13 CoreFoundation 0x04acd1ab CFRunLoopRunSpecific + 443\r\n[ERROR] 14 CoreFoundation 0x04accfdb CFRunLoopRunInMode + 123\r\n[ERROR] 15 GraphicsServices 0x0519924f GSEventRunModal + 192\r\n[ERROR] 16 GraphicsServices 0x0519908c GSEventRun + 104\r\n[ERROR] 17 UIKit 0x014a9386 UIApplicationMain + 1526\r\n[ERROR] 18 od 0x00061828 main + 456\r\n[ERROR] 19 libdyld.dylib 0x05484ac9 start + 1\r\n[ERROR]\r\n[ERROR] 2014-09-09 15:39:42.696 od[17557:1974892] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<_UIAlertControllerActionSheetRegularPresentationController: 0x79f6cfc0>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.'\r\n[ERROR] *** First throw call stack:\r\n[ERROR] (\r\n[ERROR] 0 CoreFoundation 0x04bb4df6 __exceptionPreprocess + 182\r\n[ERROR] 1 libobjc.A.dylib 0x0478e837 objc_exception_throw + 44\r\n[ERROR] 2 CoreFoundation 0x04bb4d1d +[NSException raise:format:] + 141\r\n[ERROR] 3 UIKit 0x01cc87f1 -[UIPopoverPresentationController presentationTransitionWillBegin] + 388\r\n[ERROR] 4 UIKit 0x015d9f25 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 1666\r\n[ERROR] 5 UIKit 0x015d8528 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 226\r\n[ERROR] 6 UIKit 0x0160b7ab __40+[UIViewController _scheduleTransition:]_block_invoke + 18\r\n[ERROR] 7 UIKit 0x014d2aee ___afterCACommitHandler_block_invoke + 15\r\n[ERROR] 8 UIKit 0x014d2a99 _applyBlockToCFArrayCopiedToStack + 415\r\n[ERROR] 9 UIKit 0x014d28ae _afterCACommitHandler + 545\r\n[ERROR] 10 CoreFoundation 0x04ad7fbe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30\r\n[ERROR] 11 CoreFoundation 0x04ad7f00 __CFRunLoopDoObservers + 400\r\n[ERROR] 12 CoreFoundation 0x04acd93a __CFRunLoopRun + 1226\r\n[ERROR] 13 CoreFoundation 0x04acd1ab CFRunLoopRunSpecific + 443\r\n[ERROR] 14 CoreFoundation 0x04accfdb CFRunLoopRunInMode + 123\r\n[ERROR] 15 GraphicsServices 0x0519924f GSEventRunModal + 192\r\n[ERROR] 16 GraphicsServices 0x0519908c GSEventRun + 104\r\n[ERROR] 17 UIKit 0x014a9386 UIApplicationMain + 1526\r\n[ERROR] 18 od 0x00061828 main + 456\r\n[ERROR] 19 libdyld.dylib 0x05484ac9 start + 1\r\n[ERROR] )\r\n[ERROR] libc++abi.dylib: terminating with uncaught exception of type NSException\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS8: OptionDialog doesn't work in a Popover", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Failed: SDK 3.4.0-beta + iOS 8-beta5 on iPad Simulator\r\nWorks: SDK 3.3.0.GA + iOS 7.1 on iPad Device", "closedSprints": [ { "id": 220, "state": "closed", "name": "2014 Sprint 20 SDK", "startDate": "2014-09-29T22:32:25.224Z", "endDate": "2014-10-13T18:25:00.000Z", "completeDate": "2014-10-13T18:25:45.560Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "322840", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "The result of the above test case has changed with iOS 8 GM as a result of a fix by Apple documented in the [release notes|https://developer.apple.com/library/prerelease/ios/releasenotes/General/RN-iOSSDK-8.0/index.html#//apple_ref/doc/uid/TP40014223] as:\r\n\r\n> To use an action sheet-style UIAlertController on iPad, the sourceView of the alert controller's popoverPresentationController must be set.\r\n\r\nThe result of the test case is now:\r\n\r\n1. With {{view}} it now works\r\n2. Without {{view}} it is unchanged\r\n\r\nReading the above comment by Apple I guess we need to update the documentation and add a warning that {{view}} is now required for iPad, but *only* if it is used in a popover since TIMOB-17639 now *does* work without {{view}}.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-09-10T17:38:21.000+0000", "updated": "2014-09-10T17:41:10.000+0000" }, { "id": "323381", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Need to rewrite related proxies. Waiting for ticket from [~vduggal]. Likely to go into 3.4.1.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T18:38:59.000+0000", "updated": "2014-09-12T18:38:59.000+0000" }, { "id": "326802", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolved as part of TIMOB-17804", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-02T20:33:33.000+0000", "updated": "2014-10-02T20:33:33.000+0000" }, { "id": "326896", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed per [~jalter]comment.\r\nTested the above code and verified optionDialog does work in a Popover.\r\nEnvironment used\r\nMac osx 10.9.5 Mavericks\r\nAppcelerator Studio, build: 3.4.0.201409261245\r\nTitanium SDK, build: 3.4.1.v20141002135200\r\nacs@1.0.18\r\nalloy 1.5.1\r\ninstall@0.1.7\r\nnpm@1.4.23\r\nsudo@1.0.3\r\ntitanium 3.4.0\r\ntitanium-code-processor@1.1.1\r\nXcode6.1GM\r\nDevice:\r\niPad mini iOS 8.1\r\niPad mini iOS 7.0.3", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-03T17:56:49.000+0000", "updated": "2014-10-03T18:05:32.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }