Search Unity

Question I want to share screen shots on my iPad

Discussion in 'iOS and tvOS' started by nax_unity, May 17, 2023.

  1. nax_unity

    nax_unity

    Joined:
    Jan 24, 2018
    Posts:
    63
    We have introduced the following plug-ins to share screen screenshots on the iPad.
    // Social Connector v0.5.0
    https://github.com/anchan828/social-connector

    But nothing works, just an error is displayed on the console.

    as a flow
    1. Create screenshot
    2. Call "SocialConnector" by pressing the save button
    We are.
    In addition, "-fno-objc-arc" is entered in the Complie Flags section of "SocialConnector.mm" on Xcode.

    the code is
    Code (CSharp):
    1. using UnityEngine;
    2. using System.IO;
    3. using System.Collections;
    4.  
    5. public class FwShareController : MonoBehaviour
    6. {
    7.     public void share( string a_path )
    8.     {
    9.         SocialConnector.SocialConnector.Share( "photography", "http://www.hoge.co.jp/", a_path );
    10.     }
    11. }
    12.  
    will be

    The output error is
    Code (CSharp):
    1.  
    2. Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
    3. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
    4. 2023-05-16 21:58:54.987060+0900 HogeHoge[49283:7605584] [LayoutConstraints] Unable to simultaneously satisfy constraints.
    5.     Probably at least one of the constraints in the following list is one you don't want.
    6.    Try this:
    7.        (1) look at each constraint and try to figure out which you don't expect;
    8.         (2) find the code that added the unwanted constraint or constraints and fix it.
    9. (
    10.     "<NSLayoutConstraint:0x28bb53020 UILayoutGuide:0x282569ea0'BackButtonGuide(0x110cfa8b0)'.leading == UILayoutGuide:0x28256e140'UINavigationBarItemContentLayoutGuide'.leading   (active)>",
    11.     "<NSLayoutConstraint:0x28bb52cb0 H:[UILayoutGuide:0x282569ea0'BackButtonGuide(0x110cfa8b0)']-(0)-[UILayoutGuide:0x28256bf00'LeadingBarGuide(0x110cfa8b0)']   (active)>",
    12.     "<NSLayoutConstraint:0x28bb52da0 H:[UILayoutGuide:0x28256bf00'LeadingBarGuide(0x110cfa8b0)']-(0)-[UILayoutGuide:0x28256bc60'TitleViewGuide(0x110cfa8b0)']   (active)>",
    13.     "<NSLayoutConstraint:0x28bb52440 UILayoutGuide:0x28256bc60'TitleViewGuide(0x110cfa8b0)'.trailing <= UILayoutGuide:0x282563100'UIViewLayoutMarginsGuide'.trailing   (active)>",
    14.     "<NSLayoutConstraint:0x28bb52d00 'UINavItemContentGuide-leading' H:|-(0)-[UILayoutGuide:0x28256e140'UINavigationBarItemContentLayoutGuide']   (active, names: '|':_UINavigationBarContentView:0x110cfa570 )>",
    15.     "<NSLayoutConstraint:0x28bb56350 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x110cfa570.width == 6   (active)>",
    16.     "<NSLayoutConstraint:0x28bb525d0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x282563100'UIViewLayoutMarginsGuide']-(16)-|(LTR)   (active, names: '|':_UINavigationBarContentView:0x110cfa570 )>"
    17. )
    18.  
    19. Will attempt to recover by breaking constraint
    20. <NSLayoutConstraint:0x28bb52cb0 H:[UILayoutGuide:0x282569ea0'BackButtonGuide(0x110cfa8b0)']-(0)-[UILayoutGuide:0x28256bf00'LeadingBarGuide(0x110cfa8b0)']   (active)>
    21.  
    22. Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
    23. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
    24. 2023-05-16 21:58:54.990213+0900 HogeHoge[49283:7605584] [LayoutConstraints] Unable to simultaneously satisfy constraints.
    25.     Probably at least one of the constraints in the following list is one you don't want.
    26.    Try this:
    27.        (1) look at each constraint and try to figure out which you don't expect;
    28.         (2) find the code that added the unwanted constraint or constraints and fix it.
    29. (
    30.     "<NSLayoutConstraint:0x28bb52440 UILayoutGuide:0x28256bc60'TitleViewGuide(0x110cfa8b0)'.trailing <= UILayoutGuide:0x282563100'UIViewLayoutMarginsGuide'.trailing   (active)>",
    31.     "<NSLayoutConstraint:0x28bb52490 UILayoutGuide:0x28256bc60'TitleViewGuide(0x110cfa8b0)'.leading >= UILayoutGuide:0x282563100'UIViewLayoutMarginsGuide'.leading   (active)>",
    32.     "<NSLayoutConstraint:0x28bb56350 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x110cfa570.width == 6   (active)>",
    33.     "<NSLayoutConstraint:0x28bb52580 'UIView-leftMargin-guide-constraint' H:|-(16)-[UILayoutGuide:0x282563100'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UINavigationBarContentView:0x110cfa570 )>",
    34.     "<NSLayoutConstraint:0x28bb525d0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x282563100'UIViewLayoutMarginsGuide']-(16)-|(LTR)   (active, names: '|':_UINavigationBarContentView:0x110cfa570 )>"
    35. )
    36.  
    37. Will attempt to recover by breaking constraint
    38. <NSLayoutConstraint:0x28bb52440 UILayoutGuide:0x28256bc60'TitleViewGuide(0x110cfa8b0)'.trailing <= UILayoutGuide:0x282563100'UIViewLayoutMarginsGuide'.trailing   (active)>
    39.  
    40. Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
    41. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
    42. 2023-05-16 21:58:55.036905+0900 HogeHoge[49283:7605584] [UICollectionLayout] <_UIActivityCollectionViewCompositionalLayout 0x110cf56b0> ran into an error when computing the layout for section at index 0 in container <_UICollectionLayoutContainer: 0x28c453780 contentSize={-7, 0}; contentInsets={0, 0, 0, 0}}>. UICollectionView behavior with this layout is undefined. Break on UICollectionViewCompositionalLayoutAlertForInvalidLayout to catch this in the debugger.
    43. Error: NSCollectionLayoutItem created with invalid combination of spacing and size specified. This group cannot fit even a single item. Inspect the spacing and size of the items in this group and ensure that they fit into the group when its effective size is {42.666666666666657, 128}.
    44. Group: <NSCollectionLayoutGroup size={.absolute(42.6667), .estimated(128)};
    45.      edgeSpacing=<leading=.fixed(0); top=.fixed(0); trailing=.fixed(0); bottom=.fixed(0)>;
    46.      contentInsets={0, 0, 0, 0}>
    47.      group: subitems=
    48.          <NSCollectionLayoutItem size={.absolute(78), .estimated(128)};
    49.          edgeSpacing=<leading=.fixed(0); top=.fixed(0); trailing=.fixed(0); bottom=.fixed(0)>;
    50.          contentInsets={0, 0, 0, 0}>
    51.      interItemSpacing=.fixed(-95.66666666666667);
    52.      layoutDirection=.horizontal>
    53. 2023-05-16 21:58:55.037265+0900 HogeHoge[49283:7605584] [UICollectionLayout] <_UIActivityCollectionViewCompositionalLayout 0x110cf56b0> ran into an error when computing the layout for section at index 1 in container <_UICollectionLayoutContainer: 0x28c453900 contentSize={-7, 0}; contentInsets={0, 0, 0, 0}}>. UICollectionView behavior with this layout is undefined. Break on UICollectionViewCompositionalLayoutAlertForInvalidLayout to catch this in the debugger.
    54. Error: NSCollectionLayoutItem created with invalid combination of spacing and size specified. This group cannot fit even a single item. Inspect the spacing and size of the items in this group and ensure that they fit into the group when its effective size is {43.333333333333343, 128}.
    55. Group: <NSCollectionLayoutGroup size={.absolute(43.3333), .estimated(128)};
    56.      edgeSpacing=<leading=.fixed(0); top=.fixed(0); trailing=.fixed(0); bottom=.fixed(0)>;
    57.      contentInsets={0, 0, 0, 0}>
    58.      group: subitems=
    59.          <NSCollectionLayoutItem size={.absolute(78), .estimated(128)};
    60.          edgeSpacing=<leading=.fixed(0); top=.fixed(0); trailing=.fixed(0); bottom=.fixed(0)>;
    61.          contentInsets={0, 0, 0, 0}>
    62.      interItemSpacing=.fixed(-95.33333333333333);
    63.      layoutDirection=.horizontal>
    64.  
    will be
    Since it's not hanging, I think it's possible that the necessary declarations aren't being made.

    Do you know anything?

    environment
    Unity 2020.3.1f1
    Social Connector v0.5.0

    Device used
    iPad (7th generation)
    OS16.3