[macOS] Add explicit weak/strong/copy annotations (flutter/engine#37768)
This adds explicit strong/copy Objective-C property annotations where they were previously implied on NSObject properties and fixes on case where it was previously improperly specified.
This commit is contained in:
@@ -44,7 +44,7 @@ FLUTTER_DARWIN_EXPORT
|
||||
*
|
||||
* Set this to nil to pass no arguments to the Dart entrypoint.
|
||||
*/
|
||||
@property(nonatomic, nullable, strong) NSArray<NSString*>* dartEntrypointArguments;
|
||||
@property(nonatomic, nullable, copy) NSArray<NSString*>* dartEntrypointArguments;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -115,6 +115,6 @@ FLUTTER_DARWIN_EXPORT
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@property(readwrite, nonatomic, nullable) NSColor* backgroundColor;
|
||||
@property(readwrite, nonatomic, nullable, copy) NSColor* backgroundColor;
|
||||
|
||||
@end
|
||||
|
||||
@@ -285,7 +285,7 @@ struct FlutterKeyPendingResponse {
|
||||
* Only set in debug mode. Nil in release mode, or if the callback has not been
|
||||
* handled.
|
||||
*/
|
||||
@property(nonatomic) NSString* debugHandleSource;
|
||||
@property(nonatomic, copy) NSString* debugHandleSource;
|
||||
@end
|
||||
|
||||
@implementation FlutterKeyCallbackGuard {
|
||||
|
||||
@@ -31,6 +31,6 @@ typedef void (^FlutterAsyncKeyCallback)(BOOL handled);
|
||||
* deriving logical keys.
|
||||
*/
|
||||
@required
|
||||
@property(nonatomic) NSMutableDictionary<NSNumber*, NSNumber*>* _Nullable layoutMap;
|
||||
@property(nonatomic, nullable, strong) NSMutableDictionary<NSNumber*, NSNumber*>* layoutMap;
|
||||
|
||||
@end
|
||||
|
||||
@@ -211,8 +211,8 @@ void clearEvents(std::vector<FlutterKeyEvent>& events) {
|
||||
- (void)recordCallTypesTo:(nonnull NSMutableArray<NSNumber*>*)typeStorage
|
||||
forTypes:(uint32_t)typeMask;
|
||||
|
||||
@property(nonatomic) FlutterKeyboardManager* manager;
|
||||
@property(nonatomic) NSResponder* nextResponder;
|
||||
@property(readonly, nonatomic, strong) FlutterKeyboardManager* manager;
|
||||
@property(nonatomic, nullable, strong) NSResponder* nextResponder;
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
@interface FlutterTextFieldMock : FlutterTextField
|
||||
|
||||
@property(nonatomic) NSString* lastUpdatedString;
|
||||
@property(nonatomic, nullable, copy) NSString* lastUpdatedString;
|
||||
@property(nonatomic) NSRange lastUpdatedSelection;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user