yasirkula / UnityNativeShare

A Unity plugin to natively share files (images, videos, documents, etc.) and/or plain text on Android & iOS
MIT License
891 stars 131 forks source link

Unable to share via text message on iOS #99

Closed ahumblet closed 3 years ago

ahumblet commented 3 years ago

Description of the bug

The majority of the time (but not 100% of the time), I am unable to share via text message on my iPhone. I try to click on the blue arrow but it never engages. It's as if the focus were on the text message content behind the blue button. If press my finger directly over the blue arrow and then scroll up, but it ends up scrolling the background rather than engaging the button, as if the background were in the foreground of the button. These behaviors might be explained by some layout constraint errors that I found in the logs.

This issue went from never happening to happening frequently. It might coincide with iOS14.3 getting installed.

share problem

Reproduction steps

The app is only implemented in landscape mode. I get to the share page, I select 'Messages', I choose a recipient, I try to press the blue arrow but nothing happens. If I go back and select email or some other vehicle, it works fine. The issue does not occur on my iPad.

Platform specs

Please provide the following info if this is a Unity 3D repository.

Additional info

Xcode debugger logs:

2021-01-13 18:33:34.187715-0600 icbeta[49421:6632847] [User Defaults] Couldn't read values in CFPrefsPlistSource<0x283778d80> (Domain: com.apple.Sharing, User: kCFPreferencesCurrentUser, ByHost: No, Container: kCFPreferencesNoContainer, Contents Need Refresh: Yes): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access 2021-01-13 18:33:34.188403-0600 icbeta[49421:6632847] [User Defaults] Couldn't read values in CFPrefsPlistSource<0x283778d80> (Domain: com.apple.Sharing, User: kCFPreferencesCurrentUser, ByHost: No, Container: kCFPreferencesNoContainer, Contents Need Refresh: Yes): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access 2021-01-13 18:33:34.190776-0600 icbeta[49421:6632847] <CATransformLayer: 0x2818f3ca0> - changing property backgroundColor in transform-only layer, will have no effect 2021-01-13 18:33:38.569786-0600 icbeta[49421:6632847] [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. ( "= 22 (active)>", "<NSLayoutConstraint:0x2839eb2f0 V:|-(15)-[_UIActivityActionCellTitleLabel:0x121194900] (active, names: '|':UIView:0x121196130 )>", "<NSLayoutConstraint:0x2839eb340 V:[_UIActivityActionCellTitleLabel:0x121194900]-(15)-| (active, names: '|':UIView:0x121196130 )>", "<NSLayoutConstraint:0x2839ff0c0 'UIView-Encapsulated-Layout-Height' UIView:0x121196130.height == 50.3333 (active)>" )

Will attempt to recover by breaking constraint

= 22 (active)> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful. 2021-01-13 18:33:43.279980-0600 icbeta[49421:6632847] [PPT] Error creating the CFMessagePort needed to communicate with PPT. 2021-01-13 18:34:05.779676-0600 icbeta[49421:6632847] [External] -[UIInputViewController needsInputModeSwitchKey] was called before a connection was established to the host application. This will produce an inaccurate result. Please make sure to call this after your primary view controller has been initialized. 2021-01-13 18:34:06.063072-0600 icbeta[49421:6632847] [External] -[UIInputViewController needsInputModeSwitchKey] was called before a connection was established to the host application. This will produce an inaccurate result. Please make sure to call this after your primary view controller has been initialized. 2021-01-13 18:34:06.271542-0600 icbeta[49421:6632847] [External] -[UIInputViewController needsInputModeSwitchKey] was called before a connection was established to the host application. This will produce an inaccurate result. Please make sure to call this after your primary view controller has been initialized. 2021-01-13 18:34:06.380456-0600 icbeta[49421:6632847] [External] -[UIInputViewController needsInputModeSwitchKey] was called before a connection was established to the host application. This will produce an inaccurate result. Please make sure to call this after your primary view controller has been initialized.
yasirkula commented 3 years ago

Doesn't sharing from WhatsApp or any other app to iMessage have this issue?

ahumblet commented 3 years ago

I wasn't able to reproduce this in WhatsApp. Our latest hypothesis is that this only occurs on iPhones without a home button (I was mistaken that I could reproduce this on an iPhone6). We are currently trying to fix it on our side. I will close the bug once we have confirmation of a fix.

ahumblet commented 3 years ago

This was fixed on our side by updating our UI to follow safe areas on Iphone X and higher.

yasirkula commented 3 years ago

I'm guessing that you've changed a setting in Xcode? Making a change in Unity UI shouldn't affect the native UI.