When the instance method:init is unavailable, mark the class method:new unavailable. (flutter/engine#7532)

This commit is contained in:
KyleWong
2019-01-21 06:36:13 +08:00
committed by Dan Field
parent 1f528fef75
commit 6a671a1458
3 changed files with 4 additions and 0 deletions

View File

@@ -84,6 +84,8 @@ FLUTTER_EXPORT
*/
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
/**
* Runs a Dart program on an Isolate from the main Dart library (i.e. the library that
* contains `main()`).

View File

@@ -11,6 +11,7 @@
@interface FlutterPlatformPlugin : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)initWithEngine:(fml::WeakPtr<FlutterEngine>)engine NS_DESIGNATED_INITIALIZER;
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result;

View File

@@ -27,6 +27,7 @@
@interface FlutterView : UIView
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;