Skip to content
This repository was archived by the owner on Jul 21, 2022. It is now read-only.
This repository was archived by the owner on Jul 21, 2022. It is now read-only.

Error while sharing in iPad #85

Description

@elihaidv

Describe the bug
When I want to share in iPad, it throw exception. And nothing happen

To Reproduce
Execute app in iPad and see the exception

Smartphone (please complete the following information):

  • OS: iPad IOS 14.3

Additional context
Exception log:

2021-01-25 09:53:53.182092-0800 Runner[19490:117428] [LayoutConstraints] Unable to simultaneously satisfy constraints.

	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. 

(

    "<NSLayoutConstraint:0x60000108bbb0 LPLinkView:0x7f807473e690.leading == UILayoutGuide:0x600000abbb80'UIViewLayoutMarginsGuide'.leading   (active)>",

    "<NSLayoutConstraint:0x60000108ba20 H:[LPLinkView:0x7f807473e690]-(59)-|   (active, names: '|':_UIActivityContentTitleView:0x7f807473d080 )>",

    "<NSLayoutConstraint:0x600001091b30 H:|-(0)-[_UIActivityContentTitleView:0x7f807473d080]   (active, names: '|':_UINavigationBarContentView:0x7f8074460df0 )>",

    "<NSLayoutConstraint:0x600001091e00 _UIActivityContentTitleView:0x7f807473d080.trailing == _UINavigationBarContentView:0x7f8074460df0.trailing   (active)>",

    "<NSLayoutConstraint:0x600001093d90 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x7f8074460df0.width == 0   (active)>",

    "<NSLayoutConstraint:0x60000108bac0 'UIView-leftMargin-guide-constraint' H:|-(16)-[UILayoutGuide:0x600000abbb80'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UIActivityContentTitleView:0x7f807473d080 )>"

)


Will attempt to recover by breaking constraint 

<NSLayoutConstraint:0x60000108bbb0 LPLinkView:0x7f807473e690.leading == UILayoutGuide:0x600000abbb80'UIViewLayoutMarginsGuide'.leading   (active)>


Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.

The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

Similar issue: flutter/flutter#50764
My Code:

      Share.file(trans('share_chart'), "$name.$extension", bytes, type,text: 'Share your chart');

With this https://pub.dev/packages/share it working:

var path = (await getApplicationDocumentsDirectory()).path + "/file";
      await File(path).writeAsBytes(bytes);
      s.Share.shareFiles([path],
          mimeTypes: [type],
          text: 'Share your chart',
          subject: trans('share_chart'));

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions