Chat photo images are blank in build with Xcode 12 on iOS 14
- Dominant language
- Swift
- Stars
- 4.6k
- Forks
- 588
- PR merge metrics
- No merged PRs in 30d
Description
Chat photo images are invisible in chat channel when App is built with any version of Xcode 12 and running in any version of iOS 14. App built with Xcode 11.7 and running in any version of iOS 14 does not exhibit bug.
Chatto/ChattoAdditions version 3.5.0 installed with CocoaPods.
Apparently with Xcode < 12 and iOS < 14 deriving a mask from a layer was okay, but with Xcode 12 and iOS 14 the effect is to make the image invisible.
Resolved by modifying in `PhotoBubbleView.swift updateImages()`:
`// self.imageView.layer.mask = UIImageView(image: self.photoMessageStyle.maskingImage(viewModel: self.photoMessageViewModel)).layer`
` self.imageView.layer.mask = UIImageView(image: self.photoMessageStyle.maskingImage(viewModel: self.photoMessageViewModel)).layer.mask`
I believe this is fixed in Chatto/ChattoAdditions 4.0.0 since the above line derives the mask differently than in 3.5.0.
Contributor guide
Research direction
Start in PhotoBubbleView.swift at updateImages() and compare the masking behavior between ChattoAdditions 3.5.0 and 4.0.0. Verify that chat photo images are visible when built with Xcode 12 and run on iOS 14; the issue is done when the regression is confirmed fixed or a focused regression test covers it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100