Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: iOS 13 compilation issues (#460)
## 馃摐 Description Fixed iOS 13 compatibility. ## 馃挕 Motivation and Context For projects that are targeting iOS 12.4 (for example react-native 0.72) `textFieldDidChangeSelection` method doesn't exist for `UITextFieldDelegate`. To fix it I added `@available` annotation that takes the method into compilation only for `iOS 13+`. Technically it's not very correct solution, because `onSelectionChange` will not be fired from my handler on iOS 12 - if we want to have this event we have to capture events from setter and forward it, but without subclassing it's pretty hard to achieve (only method swizzling as a last resort). But I don't want to spend too much time right now - if I get request that this functionality must be implemented for iOS 12, then I'll add it (otherwise I don't see a lot of sense in that right now, because RN already dropped minimal supported version, so I expect more and more people will move away from iOS 12 soon). Closes #459 ## 馃摙 Changelog ### iOS - added a guard for `textFieldDidChangeSelection` (iOS 13+); ## 馃 How Has This Been Tested? Tested on CI. ## 馃摑 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
- Loading branch information