Xcode 14 beta 1 is yelling at me that CKNotification initializer should return a non-optional value. This happens only AFTER letting Xcode upgrade my project settings.
The change that the upgrade project settings made was it merged my WatchKit and WatchKit extension targets into a single watch app target.
After doing so, this code will not compile which I know to be good.
// This line fails to compile with '
if let notification = CKNotification(fromRemoteNotificationDictionary: userInfo) {
// Do something
}
Compile error: "Initializer for conditional binding must have Optional type, not 'CKNotification'"
Feedback w/ sysdiagnose: FB10282805 - watchOS / CloudKit: CKNotification doesn't return optional, xcode build failing after updating project settings for Xcode 14
I could not reproduce this in a sample application. I tried making a standalone watch app with Xcode 13, upgrading the project file with Xcode 14 beta, and then creating a CKNotification object--but that worked fine. :/