DevMate / DevMateKit

Development and Distribution Assistance Platform for Mac Developers
https://devmate.com
21 stars 3 forks source link

Please annotate framework headers for nullability #29

Closed tonyarnold closed 6 years ago

tonyarnold commented 7 years ago

Using DevMateKit can be a little cumbersome from Swift right now, as none of the headers in the released version of the framework have been audited for nullability.

It ends up unnecessarily requiring nil checks in Swift code, i.e.:

if let controller = DMActivationController.shared() {
    // …
}

// Or worse:

let controller = DMActivationController.shared()!

If in this instance (and others I'm sure I am missing) the original headers should really be marked as nonnull, i.e.:

//! Main controller class for activation.
@interface DMActivationController : NSWindowController

/*! @brief Method for getting shared controller instance.
    @return Shared controller instance.
*/
+ (nonnull instancetype)sharedController;

/*! @brief Initializes new controller with default window.
    @discussion To use your own XIB for controller use \p-initWithWindowNibName: method instead.
    @return New autoreleased controller with default window.
*/
+ (nonnull instancetype)defaultController;

@end
dimaty commented 6 years ago

Hi all. Take a look at DevMateKit v1.9.

tonyarnold commented 6 years ago

Looks good, thanks! Any chance you could flesh out the Objective-C lightweight generics support on things like NSArrays and NSDictionaries?

dimaty commented 6 years ago

Maybe with next releases. You can add another issue for this. This one I'm closing.