Commit cb011a8
authored
fix: crash on catalyst (#1464)
## 📜 Description
Fixed a crash when using `ClippingScrollViewDecorator`
(`KeyboardAwareScrollView`/`KeyboardChatScrollView`) in MacCatalyst
apps.
## 💡 Motivation and Context
That crash happens because we try to exchange of methods that don't
exist in MacCatalyst implementation. When we run this code the UIKit
gets backed by AppKit and mobile-specific methods don't exist. The fix
is very simple - for mac catalyst we don't need to exchange the
implementations of methods that don't exist.
Fix:
#1454
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### iOS
- don't swizzle implementation of non-existing methods on MacCatalyst;
## 🤔 How Has This Been Tested?
Tested in example catalyst app:
<img width="750" height="345" alt="image"
src="https://github.com/user-attachments/assets/280faf74-ed59-4da2-99d7-c1e6b12e6ddd"
/>
## 📸 Screenshots (if appropriate):
|Before|After|
|-------|-----|
|<img width="1506" height="1030" alt="image"
src="https://github.com/user-attachments/assets/c727a030-f476-4260-922d-e1371feb5802"
/>|<img width="1026" height="767" alt="image"
src="https://github.com/user-attachments/assets/a6b765a4-1f06-4180-84a7-9bed5c85686c"
/>|
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed1 parent 7dcd70a commit cb011a8
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
216 | 221 | | |
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
220 | 225 | | |
| 226 | + | |
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
| |||
0 commit comments