This PR addresses the lack of nullability annotations when bridging to Swift. For example, object parameters in GBPingDelegate are currently imported into Swift as implicitly unwrapped optionals:
public protocol GBPingDelegate : NSObjectProtocol {
optional public func ping(_ pinger: GBPing!, didFailWithError error: Error!)
optional public func ping(_ pinger: GBPing!, didSendPingWith summary: GBPingSummary!)
optional public func ping(_ pinger: GBPing!, didFailToSendPingWith summary: GBPingSummary!, error: Error!)
optional public func ping(_ pinger: GBPing!, didTimeoutWith summary: GBPingSummary!)
optional public func ping(_ pinger: GBPing!, didReceiveReplyWith summary: GBPingSummary!)
optional public func ping(_ pinger: GBPing!, didReceiveUnexpectedReplyWith summary: GBPingSummary!)
}
With this PR, it will now be imported into Swift as:
public protocol GBPingDelegate : NSObjectProtocol {
optional public func ping(_ pinger: GBPing, didFailWithError error: Error)
optional public func ping(_ pinger: GBPing, didSendPingWith summary: GBPingSummary)
optional public func ping(_ pinger: GBPing, didFailToSendPingWith summary: GBPingSummary, error: Error)
optional public func ping(_ pinger: GBPing, didTimeoutWith summary: GBPingSummary)
optional public func ping(_ pinger: GBPing, didReceiveReplyWith summary: GBPingSummary)
optional public func ping(_ pinger: GBPing, didReceiveUnexpectedReplyWith summary: GBPingSummary)
There were also some warnings picked up by the static analyzer that have been resolved too.
This PR addresses the lack of nullability annotations when bridging to Swift. For example, object parameters in
GBPingDelegate
are currently imported into Swift as implicitly unwrapped optionals:With this PR, it will now be imported into Swift as:
There were also some warnings picked up by the static analyzer that have been resolved too.