Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17639] iOS8: Ti.UI.OptionDialog.show() doesn't work without view-property on iPad

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-10-02T20:34:10.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.4.2, Release 3.5.0, Release 4.0.0
ComponentsiOS
LabelsTi.UI.OptionDialog, iPad, ios8, kitchensink, module_optiondialog, optiondialog, qe-manualtest
ReporterFokke Zandbergen
AssigneeVishal Duggal
Created2014-09-08T09:27:01.000+0000
Updated2014-12-02T00:39:13.000+0000

Description

*Problem* An Ti.UI.OptionDialog doesn't show on iPads running iOS8, giving the following (quiet) error in the device logs:
[DEBUG] 2014-09-08 11:25:30.767 od[8034:231901] Unable to simultaneously satisfy constraints.
[DEBUG]         Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
[DEBUG] (
[DEBUG]     "<NSLayoutConstraint:0x7ba87fc0 H:[UIView:0x7ba9f730(304)]>",
[DEBUG]     "<NSLayoutConstraint:0x7baa8e80 _UIAlertControllerView:0x7ba9f350.width >= UIView:0x7ba9f730.width>",
[DEBUG]     "<NSLayoutConstraint:0x79ed68e0 _UIAlertControllerView:0x7ba9f350.width == UIView:0x79ec3440.width>",
[DEBUG]     "<NSAutoresizingMaskLayoutConstraint:0x7b8f5770 h=--& v=--& H:[UIView:0x79ec3440(0)]>"
[DEBUG] )
[DEBUG]
[DEBUG] Will attempt to recover by breaking constraint
[DEBUG] <NSLayoutConstraint:0x7ba87fc0 H:[UIView:0x7ba9f730(304)]>
[DEBUG]
[DEBUG] Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
[DEBUG] The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
[DEBUG] 2014-09-08 11:25:30.768 od[8034:231901] Unable to simultaneously satisfy constraints.
[DEBUG]         Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
[DEBUG] (
[DEBUG]     "<NSLayoutConstraint:0x7baa87e0 UILabel:0x7baa1650.width == UIView:0x7ba9f7f0.width - 32>",
[DEBUG]     "<NSLayoutConstraint:0x7baa82a0 UIView:0x7ba9f7f0.width == UIView:0x7ba9f730.width>",
[DEBUG]     "<NSLayoutConstraint:0x7baa8e80 _UIAlertControllerView:0x7ba9f350.width >= UIView:0x7ba9f730.width>",
[DEBUG]     "<NSLayoutConstraint:0x79ed68e0 _UIAlertControllerView:0x7ba9f350.width == UIView:0x79ec3440.width>",
[DEBUG]     "<NSAutoresizingMaskLayoutConstraint:0x7b8f5770 h=--& v=--& H:[UIView:0x79ec3440(0)]>"
[DEBUG] )
[DEBUG]
[DEBUG] Will attempt to recover by breaking constraint
[DEBUG] <NSLayoutConstraint:0x7baa87e0 UILabel:0x7baa1650.width == UIView:0x7ba9f7f0.width - 32>
[DEBUG]
[DEBUG] Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
[DEBUG] The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
[DEBUG] 2014-09-08 11:25:30.770 od[8034:231901] Unable to simultaneously satisfy constraints.
[DEBUG]         Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
[DEBUG] (
[DEBUG]     "<NSLayoutConstraint:0x7baa8840 UILabel:0x7baa26f0.width == UIView:0x7ba9f7f0.width - 32>",
[DEBUG]     "<NSLayoutConstraint:0x7baa82a0 UIView:0x7ba9f7f0.width == UIView:0x7ba9f730.width>",
[DEBUG]     "<NSLayoutConstraint:0x7baa8e80 _UIAlertControllerView:0x7ba9f350.width >= UIView:0x7ba9f730.width>",
[DEBUG]     "<NSLayoutConstraint:0x79ed68e0 _UIAlertControllerView:0x7ba9f350.width == UIView:0x79ec3440.width>",
[DEBUG]     "<NSAutoresizingMaskLayoutConstraint:0x7b8f5770 h=--& v=--& H:[UIView:0x79ec3440(0)]>"
[DEBUG] )
[DEBUG]
[DEBUG] Will attempt to recover by breaking constraint
[DEBUG] <NSLayoutConstraint:0x7baa8840 UILabel:0x7baa26f0.width == UIView:0x7ba9f7f0.width - 32>
[DEBUG]
[DEBUG] Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
[DEBUG] The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
[DEBUG] 2014-09-08 11:25:30.771 od[8034:231901] Unable to simultaneously satisfy constraints.
[DEBUG]         Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
[DEBUG] (
[DEBUG]     "<NSLayoutConstraint:0x7baa8760 V:[UIView:0x7ba9f8b0(>=44)]>",
[DEBUG]     "<NSLayoutConstraint:0x7baa8580 V:|-(0)-[UIView:0x7ba9f8b0]   (Names: '|':UIView:0x7ba9f7f0 )>",
[DEBUG]     "<NSLayoutConstraint:0x7baa8700 V:[UICollectionView:0x7aada200]-(0)-|   (Names: '|':UIView:0x7ba9f8b0 )>",
[DEBUG]     "<NSLayoutConstraint:0x7baa82d0 UIView:0x7ba9f7f0.height == UIView:0x7ba9f730.height>",
[DEBUG]     "<NSLayoutConstraint:0x7baa8f00 _UIAlertControllerView:0x7ba9f350.height == UIView:0x7ba9f730.height>",
[DEBUG]     "<NSLayoutConstraint:0x79ed6910 _UIAlertControllerView:0x7ba9f350.height == UIView:0x79ec3440.height>",
[DEBUG]     "<NSLayoutConstraint:0x79ebc2e0 UIView:0x7ba9f7f0.bottom == UICollectionView:0x7aada200.bottom>",
[DEBUG]     "<NSAutoresizingMaskLayoutConstraint:0x7b8f57d0 h=--& v=--& V:[UIView:0x79ec3440(13)]>"
[DEBUG] )
[DEBUG]
[DEBUG] Will attempt to recover by breaking constraint
[DEBUG] <NSLayoutConstraint:0x7baa8760 V:[UIView:0x7ba9f8b0(>=44)]>
[DEBUG]
[DEBUG] Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
[DEBUG] The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
[DEBUG] 2014-09-08 11:25:30.772 od[8034:231901] Unable to simultaneously satisfy constraints.
[DEBUG]         Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
[DEBUG] (
[DEBUG]     "<NSLayoutConstraint:0x7baa8550 V:[UIView:0x7ba9f7f0(>=44)]>",
[DEBUG]     "<NSLayoutConstraint:0x7baa82d0 UIView:0x7ba9f7f0.height == UIView:0x7ba9f730.height>",
[DEBUG]     "<NSLayoutConstraint:0x7baa8f00 _UIAlertControllerView:0x7ba9f350.height == UIView:0x7ba9f730.height>",
[DEBUG]     "<NSLayoutConstraint:0x79ed6910 _UIAlertControllerView:0x7ba9f350.height == UIView:0x79ec3440.height>",
[DEBUG]     "<NSAutoresizingMaskLayoutConstraint:0x7b8f57d0 h=--& v=--& V:[UIView:0x79ec3440(13)]>"
[DEBUG] )
[DEBUG]
[DEBUG] Will attempt to recover by breaking constraint
[DEBUG] <NSLayoutConstraint:0x7baa8550 V:[UIView:0x7ba9f7f0(>=44)]>
[DEBUG]
[DEBUG] Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
[DEBUG] The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
*Steps to reproduce* With the following combinations, build and run the test case and click on the window to open the dialog. - SDK 3.4 / iOS8 / iPhone: OK - SDK 3.4 / iOS8 / iPad: *Error* - SDK 3.3 / iOS7.1 / iPhone: OK - SDK 3.3 / iOS7.1 / iPad: OK *Test case*
var win = Ti.UI.createWindow({
  backgroundColor: 'white'
});
win.addEventListener('click', function(e) {
  Ti.UI.createOptionDialog({
    options: ['a', 'b']
  }).show();
});
win.open();

Comments

  1. Steven van Loef 2014-09-08

    A work around (documented way http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.OptionDialog-method-show) is to specify a view and rect when showing the dialog:
       Ti.UI.createOptionDialog({
           options: ['a', 'b']
       }).show({view:win, rect:{width:1, height:1, x: 100, y: 200});
       
    For rect only x and y are used (see http://docs.appcelerator.com/platform/latest/#!/api/showParams).
  2. Fokke Zandbergen 2014-09-09

    [~ludolphus] you are right, (it doesn't even need rect in order to work), but of course - as documented - it should also work without and then show centered. I guess the title of the ticket should be *iOS8: Ti.UI.OptionDialog.show() doesn't work without view-property on iPad*
  3. Fokke Zandbergen 2014-09-09

  4. Fokke Zandbergen 2014-09-09

    This might be fixed in the iOS8 GM: > To use an action sheet-style UIAlertController on iPad, the sourceView of the alert controller's popoverPresentationController must be set. Release notes: https://developer.apple.com/library/prerelease/ios/releasenotes/General/RN-iOSSDK-8.0/index.html#//apple_ref/doc/uid/TP40014223
  5. Fokke Zandbergen 2014-09-10

    Since iOS 8 GM it now works again. The ticket can be closed.
  6. Shameer Jan 2014-09-11

    This issue does not reproduce with iOS 7.1 TiSDK 3.4.0 Appcelerator Studio, build: 3.3.0.201407111535 Titanium Command-Line Interface, CLI version 3.3.0,
  7. Fokke Zandbergen 2014-09-11

    [~shameerj] that's correct because the ticket was for iOS 8 beta 5 and as you can read in the comment above yours it was an Apple-bug that is now fixed in GM.
  8. Ingo Muschenetz 2014-09-12

    Vishal wishes to keep a ticket open to reflect the next to add a view property, so keeping this open for the moment. There might be something related that needs to be fixed for 3.4.1.
  9. Jon Alter 2014-10-02

    Resolved as part of TIMOB-17804
  10. Olga Romero 2014-10-03

    Tested with Mac osx 10.9.5 Mavericks Appcelerator Studio, build: 3.4.0.201409261245 Titanium SDK, build: 3.4.1.v20141002135200 acs@1.0.18 alloy 1.5.1 install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0 titanium-code-processor@1.1.1 Xcode6.1GM Devices: iPad mini iOS 8.1

JSON Source