apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 986 forks source link

refactor: Modernize some ObjC code #1472

Closed dpogue closed 3 months ago

dpogue commented 3 months ago

Platforms affected

ios

Motivation and Context

Some of the code in CordovaLib dates back to the very early dates of cordova-ios and an era when iOS 4 introduced breaking changes and Objective C was having new language features introduced (yes, Cordova actually predates the transition to ObjC ARC 💀).

Nowadays there are some conventions that are pretty standard (like instancetype for initializer methods) that we should aim to adopt for consistency.

Also, refactored CDVConfigParser to avoid needing a round-trip through weird CDVViewController methods to do anything useful. I can split this commit out into its own PR if that makes it easier for review.

Description

Testing

All existing unit tests pass.

Checklist

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.22%. Comparing base (f3339a9) to head (26872aa).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1472 +/- ## ======================================= Coverage 80.22% 80.22% ======================================= Files 16 16 Lines 1871 1871 ======================================= Hits 1501 1501 Misses 370 370 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.