parse-community / Parse-SDK-iOS-OSX

The Apple SDK for Parse Platform (iOS, macOS, watchOS, tvOS)
https://parseplatform.org
Other
2.81k stars 871 forks source link

ParseLiveQuery: 2 compilation errors related to Starscream #1738

Closed mathieulb closed 1 year ago

mathieulb commented 1 year ago

New Issue Checklist

Issue Description

Xcode 14.3.1 cannot compile ParseLiveQuery in ParseObjC 2.7.0 nor 2.3.0 (using StarScream 4.0.6, auto-installed as dep of ParseObjC)

Also cannot compile ParseLiveQuery & ParseObjC 1.19.4 recently (using pod), but 1.19.4 worked until updating pod.

Steps to reproduce

Actual Outcome

With two errors :

ParseLiveQuery/ParseLiveQuery/Internal/ClientPrivate.swift:116:1 Type 'Client' does not conform to protocol 'WebSocketDelegate' / fix: add public func didReceive(event: Starscream.WebSocketEvent, client: Starscream.WebSocketClient)

ParseLiveQuery/ParseLiveQuery/Internal/ClientPrivate.swift:118:9 Switch must be exhaustive / fix: add case .peerClosed

Attempts to apply the 2 fixes require unlocking the file if installed as pod ; but if "Add Packages..." is used instead, those fixes cannot be apply because the file is read-only (note: buggy Xcode lets you apply the fix, then denies the possibility to remove the placeholders or typing anything)

Expected Outcome

No errors

Environment

Client

Server

Database

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this issue!

mboyd1993 commented 1 year ago

Yes, I can confirm that I have this exact same issue after updating the Parse SDK in an existing project to version 2.7.0. The two fixes that @mathieulb suggested do get the compilation error to go away, but since the files in the Swift package are read-only, I can only make changes by opening the files in another editor and then there's still no way to save the files.