parse-community / Parse-Swift

The Swift SDK for Parse Platform (iOS, macOS, watchOS, tvOS, Linux, Android, Windows)
https://parseplatform.org
MIT License
308 stars 69 forks source link

refactor: add defaultClient to LiveQuery to replace getDefault() #342

Closed cbaker6 closed 2 years ago

cbaker6 commented 2 years ago

New Pull Request Checklist

Issue Description

ParseLiveQuery uses a static method, getDefault() to access the default client. A computed property is more swifty.

Also missing some documentation in LiveQuery.

Related issue: #n/a

Approach

Replace getDefault() with a the defaultClient static computed property. Set getDefault() for deprecation in ParseSwift 5.0.0.

TODOs before merging

parse-github-assistant[bot] commented 2 years ago

Thanks for opening this pull request!

codecov[bot] commented 2 years ago

Codecov Report

Merging #342 (31c1373) into main (c8252bc) will decrease coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #342      +/-   ##
==========================================
- Coverage   85.18%   85.16%   -0.02%     
==========================================
  Files         114      114              
  Lines       12195    12198       +3     
==========================================
+ Hits        10388    10389       +1     
- Misses       1807     1809       +2     
Impacted Files Coverage Δ
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 73.04% <100.00%> (+0.11%) :arrow_up:
Sources/ParseSwift/Objects/ParseUser.swift 83.00% <0.00%> (-0.18%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c8252bc...31c1373. Read the comment docs.