twitter-archive / twitter-kit-ios

Twitter Kit is a native SDK to include Twitter content inside mobile apps.
Apache License 2.0
689 stars 449 forks source link

TWTRComposer image loop and crash on iPhone X #72

Closed DimMad closed 6 years ago

DimMad commented 6 years ago

Hello everyone,

I am using the composer for posting some text and an image (screenshot from device). On iPhone X that is causing the app to freeze, high CPU usage, and eventual background time limit crash. After playing around with images I realized that the problem was the aspect ratio of the image. The moment the image passes the 9:16 something is going wrong with the constraints of the UIImage handling in the composer (TWTRComposerViewController is used).

Expected behavior

The composer dialog with the expected text and image should appear

Actual behavior

The application freezes (iPhone X only), high CPU usage, background time limit reached and app crashes.

Steps to reproduce the behavior

djmason9 commented 6 years ago

I am having this exact same issue on iphone X

DimMad commented 6 years ago

Used this:

https://github.com/twitter/twitter-kit-ios/pull/71/commits/72f6a51ad79b1660cdb94be43ab717125665354b?utf8=%E2%9C%93&diff=split

to fix it for now. Not sure if it is the proper solution but it was the fastest one.

Had to rebuild the library and could not use the pod but it is better than nothing.

nickthedude commented 6 years ago

same issue. will try workaround.

rajul-arora commented 6 years ago

Your PR is included for the next TwitterKit release. Thanks for being patient!