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

feat: add ParsePush notifications #371

Closed cbaker6 closed 2 years ago

cbaker6 commented 2 years ago

New Pull Request Checklist

Issue Description

The SDK currently can't send push notifications.

Related issue: #n/a

Approach

Enable APN and FCM push notifications in the SDK. This should only be used when taking advantage of the Swift SDK on a server. To enable this feature, Query is made to conform to Codable. Make QueryWhere public.

The are some bugs on the server the SDK codes around to make this feature possible:

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 #371 (dcfe0bf) into main (c32e269) will increase coverage by 0.48%. The diff coverage is 97.74%.

@@            Coverage Diff             @@
##             main     #371      +/-   ##
==========================================
+ Coverage   88.51%   89.00%   +0.48%     
==========================================
  Files         125      137      +12     
  Lines       12970    13402     +432     
==========================================
+ Hits        11481    11929     +448     
+ Misses       1489     1473      -16     
Impacted Files Coverage Δ
Sources/ParseSwift/API/Responses.swift 95.00% <ø> (ø)
Sources/ParseSwift/Parse.swift 98.77% <ø> (ø)
Sources/ParseSwift/Types/ParseAnalytics.swift 96.24% <ø> (-0.17%) :arrow_down:
Sources/ParseSwift/Types/ParseSchema+combine.swift 100.00% <ø> (ø)
Sources/ParseSwift/Types/ParseSchema.swift 97.83% <ø> (ø)
Sources/ParseSwift/Types/Pointer.swift 98.41% <50.00%> (ø)
Sources/ParseSwift/Coding/AnyCodable.swift 65.71% <90.00%> (+6.69%) :arrow_up:
Sources/ParseSwift/Coding/AnyEncodable.swift 62.84% <90.00%> (+10.54%) :arrow_up:
...es/ParseSwift/Protocols/ParsePushPayloadable.swift 90.00% <90.00%> (ø)
...s/ParsePushPayload/Apple/ParsePushAppleSound.swift 90.00% <90.00%> (ø)
... and 30 more

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 c32e269...dcfe0bf. Read the comment docs.