Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS 14] Handle nil assetCollection and prevent crash #361

Merged
merged 4 commits into from
Oct 1, 2020

Conversation

frosty
Copy link
Contributor

@frosty frosty commented Sep 30, 2020

This PR is an alternative to #360, to fix wordpress-mobile/WordPress-iOS#14958. This fixes the issue by checking for a nil asset collection.

To test

  • Build and and run the associated WPiOS branch on iOS 14
  • Visit the Media Library, choose +, tap Choose From My Device, then Select More Photos (or Select Photos if this is the first time you've run the app). Ensure that no photos are selected and tap Done.
  • The media picker should be displayed with no content, and the app should not crash.

@diegoreymendez diegoreymendez self-requested a review September 30, 2020 19:52
@diegoreymendez
Copy link

Hey @frosty I just realized the tests are broken apparently.

@frosty
Copy link
Contributor Author

frosty commented Oct 1, 2020

I just ran the tests locally and they seem to be fine. I think the issue is just the podspec hash, so it should be fine when I get everything merged and the pod released.

@frosty frosty merged commit a426fe8 into develop Oct 1, 2020
@frosty frosty deleted the fix/ios-14-asset-crash branch October 1, 2020 10:18
Copy link

@diegoreymendez diegoreymendez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants