2 Commits

Author SHA1 Message Date
Cal Stephens 09fe3ee70f Disable preferSwiftStringAPI by default due to iOS 16 / macOS 13 API availability (#2495) 2026-04-11 12:26:55 -07:00
SUTHEESH SUKUMARAN 78836b9959 Replace objc string methods with swift equivalents #2292 (#2491)
Add preferSwiftStringAPI rule (#2292)

Replaces the Objective-C bridged `replacingOccurrences(of:with:)` with
Swift-native `replacing(_:with:)`. The ObjC method has known Unicode
bugs (e.g. corrupting emoji flag sequences); the Swift equivalent is
safer, shorter, and available from Swift 5.7+.

Only the two-argument form is transformed — calls with `options:` or
`range:` are left unchanged as they have no direct Swift equivalent.
2026-04-11 12:26:55 -07:00