mirror of
https://github.com/flutter/packages.git
synced 2025-07-01 23:51:55 +08:00
[various] Standardize Obj-C doc comment style (#6232)
Standardizes Objective-C code on `///` for documentation comments, instead of a mix of that and `/** ... */`. This does not add enforcement, since my expectation is that if we start from a homogeneous style we will be much less likely to diverge again (and if some do creep in, it's harmless). This only changes comments, so is a no-op for package clients. Fixes https://github.com/flutter/flutter/issues/143868
This commit is contained in:
@ -9,9 +9,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
#pragma mark - flash mode
|
#pragma mark - flash mode
|
||||||
|
|
||||||
/**
|
/// Represents camera's flash mode. Mirrors `FlashMode` enum in flash_mode.dart.
|
||||||
* Represents camera's flash mode. Mirrors `FlashMode` enum in flash_mode.dart.
|
|
||||||
*/
|
|
||||||
typedef NS_ENUM(NSInteger, FLTFlashMode) {
|
typedef NS_ENUM(NSInteger, FLTFlashMode) {
|
||||||
FLTFlashModeOff,
|
FLTFlashModeOff,
|
||||||
FLTFlashModeAuto,
|
FLTFlashModeAuto,
|
||||||
@ -22,23 +20,17 @@ typedef NS_ENUM(NSInteger, FLTFlashMode) {
|
|||||||
FLTFlashModeInvalid,
|
FLTFlashModeInvalid,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/// Gets FLTFlashMode from its string representation.
|
||||||
* Gets FLTFlashMode from its string representation.
|
/// @param mode a string representation of the FLTFlashMode.
|
||||||
* @param mode a string representation of the FLTFlashMode.
|
|
||||||
*/
|
|
||||||
extern FLTFlashMode FLTGetFLTFlashModeForString(NSString *mode);
|
extern FLTFlashMode FLTGetFLTFlashModeForString(NSString *mode);
|
||||||
|
|
||||||
/**
|
/// Gets AVCaptureFlashMode from FLTFlashMode.
|
||||||
* Gets AVCaptureFlashMode from FLTFlashMode.
|
/// @param mode flash mode.
|
||||||
* @param mode flash mode.
|
|
||||||
*/
|
|
||||||
extern AVCaptureFlashMode FLTGetAVCaptureFlashModeForFLTFlashMode(FLTFlashMode mode);
|
extern AVCaptureFlashMode FLTGetAVCaptureFlashModeForFLTFlashMode(FLTFlashMode mode);
|
||||||
|
|
||||||
#pragma mark - exposure mode
|
#pragma mark - exposure mode
|
||||||
|
|
||||||
/**
|
/// Represents camera's exposure mode. Mirrors ExposureMode in camera.dart.
|
||||||
* Represents camera's exposure mode. Mirrors ExposureMode in camera.dart.
|
|
||||||
*/
|
|
||||||
typedef NS_ENUM(NSInteger, FLTExposureMode) {
|
typedef NS_ENUM(NSInteger, FLTExposureMode) {
|
||||||
FLTExposureModeAuto,
|
FLTExposureModeAuto,
|
||||||
FLTExposureModeLocked,
|
FLTExposureModeLocked,
|
||||||
@ -47,23 +39,17 @@ typedef NS_ENUM(NSInteger, FLTExposureMode) {
|
|||||||
FLTExposureModeInvalid,
|
FLTExposureModeInvalid,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/// Gets a string representation of exposure mode.
|
||||||
* Gets a string representation of exposure mode.
|
/// @param mode exposure mode
|
||||||
* @param mode exposure mode
|
|
||||||
*/
|
|
||||||
extern NSString *FLTGetStringForFLTExposureMode(FLTExposureMode mode);
|
extern NSString *FLTGetStringForFLTExposureMode(FLTExposureMode mode);
|
||||||
|
|
||||||
/**
|
/// Gets FLTExposureMode from its string representation.
|
||||||
* Gets FLTExposureMode from its string representation.
|
/// @param mode a string representation of the FLTExposureMode.
|
||||||
* @param mode a string representation of the FLTExposureMode.
|
|
||||||
*/
|
|
||||||
extern FLTExposureMode FLTGetFLTExposureModeForString(NSString *mode);
|
extern FLTExposureMode FLTGetFLTExposureModeForString(NSString *mode);
|
||||||
|
|
||||||
#pragma mark - focus mode
|
#pragma mark - focus mode
|
||||||
|
|
||||||
/**
|
/// Represents camera's focus mode. Mirrors FocusMode in camera.dart.
|
||||||
* Represents camera's focus mode. Mirrors FocusMode in camera.dart.
|
|
||||||
*/
|
|
||||||
typedef NS_ENUM(NSInteger, FLTFocusMode) {
|
typedef NS_ENUM(NSInteger, FLTFocusMode) {
|
||||||
FLTFocusModeAuto,
|
FLTFocusModeAuto,
|
||||||
FLTFocusModeLocked,
|
FLTFocusModeLocked,
|
||||||
@ -72,35 +58,25 @@ typedef NS_ENUM(NSInteger, FLTFocusMode) {
|
|||||||
FLTFocusModeInvalid,
|
FLTFocusModeInvalid,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/// Gets a string representation from FLTFocusMode.
|
||||||
* Gets a string representation from FLTFocusMode.
|
/// @param mode focus mode
|
||||||
* @param mode focus mode
|
|
||||||
*/
|
|
||||||
extern NSString *FLTGetStringForFLTFocusMode(FLTFocusMode mode);
|
extern NSString *FLTGetStringForFLTFocusMode(FLTFocusMode mode);
|
||||||
|
|
||||||
/**
|
/// Gets FLTFocusMode from its string representation.
|
||||||
* Gets FLTFocusMode from its string representation.
|
/// @param mode a string representation of focus mode.
|
||||||
* @param mode a string representation of focus mode.
|
|
||||||
*/
|
|
||||||
extern FLTFocusMode FLTGetFLTFocusModeForString(NSString *mode);
|
extern FLTFocusMode FLTGetFLTFocusModeForString(NSString *mode);
|
||||||
|
|
||||||
#pragma mark - device orientation
|
#pragma mark - device orientation
|
||||||
|
|
||||||
/**
|
/// Gets UIDeviceOrientation from its string representation.
|
||||||
* Gets UIDeviceOrientation from its string representation.
|
|
||||||
*/
|
|
||||||
extern UIDeviceOrientation FLTGetUIDeviceOrientationForString(NSString *orientation);
|
extern UIDeviceOrientation FLTGetUIDeviceOrientationForString(NSString *orientation);
|
||||||
|
|
||||||
/**
|
/// Gets a string representation of UIDeviceOrientation.
|
||||||
* Gets a string representation of UIDeviceOrientation.
|
|
||||||
*/
|
|
||||||
extern NSString *FLTGetStringForUIDeviceOrientation(UIDeviceOrientation orientation);
|
extern NSString *FLTGetStringForUIDeviceOrientation(UIDeviceOrientation orientation);
|
||||||
|
|
||||||
#pragma mark - resolution preset
|
#pragma mark - resolution preset
|
||||||
|
|
||||||
/**
|
/// Represents camera's resolution present. Mirrors ResolutionPreset in camera.dart.
|
||||||
* Represents camera's resolution present. Mirrors ResolutionPreset in camera.dart.
|
|
||||||
*/
|
|
||||||
typedef NS_ENUM(NSInteger, FLTResolutionPreset) {
|
typedef NS_ENUM(NSInteger, FLTResolutionPreset) {
|
||||||
FLTResolutionPresetVeryLow,
|
FLTResolutionPresetVeryLow,
|
||||||
FLTResolutionPresetLow,
|
FLTResolutionPresetLow,
|
||||||
@ -114,22 +90,16 @@ typedef NS_ENUM(NSInteger, FLTResolutionPreset) {
|
|||||||
FLTResolutionPresetInvalid,
|
FLTResolutionPresetInvalid,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/// Gets FLTResolutionPreset from its string representation.
|
||||||
* Gets FLTResolutionPreset from its string representation.
|
/// @param preset a string representation of FLTResolutionPreset.
|
||||||
* @param preset a string representation of FLTResolutionPreset.
|
|
||||||
*/
|
|
||||||
extern FLTResolutionPreset FLTGetFLTResolutionPresetForString(NSString *preset);
|
extern FLTResolutionPreset FLTGetFLTResolutionPresetForString(NSString *preset);
|
||||||
|
|
||||||
#pragma mark - video format
|
#pragma mark - video format
|
||||||
|
|
||||||
/**
|
/// Gets VideoFormat from its string representation.
|
||||||
* Gets VideoFormat from its string representation.
|
|
||||||
*/
|
|
||||||
extern OSType FLTGetVideoFormatFromString(NSString *videoFormatString);
|
extern OSType FLTGetVideoFormatFromString(NSString *videoFormatString);
|
||||||
|
|
||||||
/**
|
/// Represents image format. Mirrors ImageFileFormat in camera.dart.
|
||||||
* Represents image format. Mirrors ImageFileFormat in camera.dart.
|
|
||||||
*/
|
|
||||||
typedef NS_ENUM(NSInteger, FCPFileFormat) {
|
typedef NS_ENUM(NSInteger, FCPFileFormat) {
|
||||||
FCPFileFormatJPEG,
|
FCPFileFormatJPEG,
|
||||||
FCPFileFormatHEIF,
|
FCPFileFormatHEIF,
|
||||||
@ -138,9 +108,7 @@ typedef NS_ENUM(NSInteger, FCPFileFormat) {
|
|||||||
|
|
||||||
#pragma mark - image extension
|
#pragma mark - image extension
|
||||||
|
|
||||||
/**
|
/// Gets a string representation of ImageFileFormat.
|
||||||
* Gets a string representation of ImageFileFormat.
|
|
||||||
*/
|
|
||||||
extern FCPFileFormat FCPGetFileFormatFromString(NSString *fileFormatString);
|
extern FCPFileFormat FCPGetFileFormatFromString(NSString *fileFormatString);
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// A class that manages camera's state and performs camera operations.
|
||||||
* A class that manages camera's state and performs camera operations.
|
|
||||||
*/
|
|
||||||
@interface FLTCam : NSObject <FlutterTexture>
|
@interface FLTCam : NSObject <FlutterTexture>
|
||||||
|
|
||||||
@property(readonly, nonatomic) AVCaptureDevice *captureDevice;
|
@property(readonly, nonatomic) AVCaptureDevice *captureDevice;
|
||||||
@ -52,13 +50,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- (void)close;
|
- (void)close;
|
||||||
- (void)startVideoRecordingWithResult:(FLTThreadSafeFlutterResult *)result;
|
- (void)startVideoRecordingWithResult:(FLTThreadSafeFlutterResult *)result;
|
||||||
- (void)setImageFileFormat:(FCPFileFormat)fileFormat;
|
- (void)setImageFileFormat:(FCPFileFormat)fileFormat;
|
||||||
/**
|
/// Starts recording a video with an optional streaming messenger.
|
||||||
* Starts recording a video with an optional streaming messenger.
|
/// If the messenger is non-null then it will be called for each
|
||||||
* If the messenger is non-null then it will be called for each
|
/// captured frame, allowing streaming concurrently with recording.
|
||||||
* captured frame, allowing streaming concurrently with recording.
|
///
|
||||||
*
|
/// @param messenger Nullable messenger for capturing each frame.
|
||||||
* @param messenger Nullable messenger for capturing each frame.
|
|
||||||
*/
|
|
||||||
- (void)startVideoRecordingWithResult:(FLTThreadSafeFlutterResult *)result
|
- (void)startVideoRecordingWithResult:(FLTThreadSafeFlutterResult *)result
|
||||||
messengerForStreaming:(nullable NSObject<FlutterBinaryMessenger> *)messenger;
|
messengerForStreaming:(nullable NSObject<FlutterBinaryMessenger> *)messenger;
|
||||||
- (void)stopVideoRecordingWithResult:(FLTThreadSafeFlutterResult *)result;
|
- (void)stopVideoRecordingWithResult:(FLTThreadSafeFlutterResult *)result;
|
||||||
@ -72,28 +68,24 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- (void)setFocusModeWithResult:(FLTThreadSafeFlutterResult *)result mode:(NSString *)modeStr;
|
- (void)setFocusModeWithResult:(FLTThreadSafeFlutterResult *)result mode:(NSString *)modeStr;
|
||||||
- (void)applyFocusMode;
|
- (void)applyFocusMode;
|
||||||
|
|
||||||
/**
|
/// Acknowledges the receipt of one image stream frame.
|
||||||
* Acknowledges the receipt of one image stream frame.
|
///
|
||||||
*
|
/// This should be called each time a frame is received. Failing to call it may
|
||||||
* This should be called each time a frame is received. Failing to call it may
|
/// cause later frames to be dropped instead of streamed.
|
||||||
* cause later frames to be dropped instead of streamed.
|
|
||||||
*/
|
|
||||||
- (void)receivedImageStreamData;
|
- (void)receivedImageStreamData;
|
||||||
|
|
||||||
/**
|
/// Applies FocusMode on the AVCaptureDevice.
|
||||||
* Applies FocusMode on the AVCaptureDevice.
|
///
|
||||||
*
|
/// If the @c focusMode is set to FocusModeAuto the AVCaptureDevice is configured to use
|
||||||
* If the @c focusMode is set to FocusModeAuto the AVCaptureDevice is configured to use
|
/// AVCaptureFocusModeContinuousModeAutoFocus when supported, otherwise it is set to
|
||||||
* AVCaptureFocusModeContinuousModeAutoFocus when supported, otherwise it is set to
|
/// AVCaptureFocusModeAutoFocus. If neither AVCaptureFocusModeContinuousModeAutoFocus nor
|
||||||
* AVCaptureFocusModeAutoFocus. If neither AVCaptureFocusModeContinuousModeAutoFocus nor
|
/// AVCaptureFocusModeAutoFocus are supported focus mode will not be set.
|
||||||
* AVCaptureFocusModeAutoFocus are supported focus mode will not be set.
|
/// If @c focusMode is set to FocusModeLocked the AVCaptureDevice is configured to use
|
||||||
* If @c focusMode is set to FocusModeLocked the AVCaptureDevice is configured to use
|
/// AVCaptureFocusModeAutoFocus. If AVCaptureFocusModeAutoFocus is not supported focus mode will not
|
||||||
* AVCaptureFocusModeAutoFocus. If AVCaptureFocusModeAutoFocus is not supported focus mode will not
|
/// be set.
|
||||||
* be set.
|
///
|
||||||
*
|
/// @param focusMode The focus mode that should be applied to the @captureDevice instance.
|
||||||
* @param focusMode The focus mode that should be applied to the @captureDevice instance.
|
/// @param captureDevice The AVCaptureDevice to which the @focusMode will be applied.
|
||||||
* @param captureDevice The AVCaptureDevice to which the @focusMode will be applied.
|
|
||||||
*/
|
|
||||||
- (void)applyFocusMode:(FLTFocusMode)focusMode onDevice:(AVCaptureDevice *)captureDevice;
|
- (void)applyFocusMode:(FLTFocusMode)focusMode onDevice:(AVCaptureDevice *)captureDevice;
|
||||||
- (void)pausePreviewWithResult:(FLTThreadSafeFlutterResult *)result;
|
- (void)pausePreviewWithResult:(FLTThreadSafeFlutterResult *)result;
|
||||||
- (void)resumePreviewWithResult:(FLTThreadSafeFlutterResult *)result;
|
- (void)resumePreviewWithResult:(FLTThreadSafeFlutterResult *)result;
|
||||||
|
@ -18,18 +18,14 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
typedef void (^FLTSavePhotoDelegateCompletionHandler)(NSString *_Nullable path,
|
typedef void (^FLTSavePhotoDelegateCompletionHandler)(NSString *_Nullable path,
|
||||||
NSError *_Nullable error);
|
NSError *_Nullable error);
|
||||||
|
|
||||||
/**
|
/// Delegate object that handles photo capture results.
|
||||||
Delegate object that handles photo capture results.
|
|
||||||
*/
|
|
||||||
@interface FLTSavePhotoDelegate : NSObject <AVCapturePhotoCaptureDelegate>
|
@interface FLTSavePhotoDelegate : NSObject <AVCapturePhotoCaptureDelegate>
|
||||||
|
|
||||||
/**
|
/// Initialize a photo capture delegate.
|
||||||
* Initialize a photo capture delegate.
|
/// @param path the path for captured photo file.
|
||||||
* @param path the path for captured photo file.
|
/// @param ioQueue the queue on which captured photos are written to disk.
|
||||||
* @param ioQueue the queue on which captured photos are written to disk.
|
/// @param completionHandler The completion handler block for save photo operations. Can
|
||||||
* @param completionHandler The completion handler block for save photo operations. Can
|
/// be called from either main queue or IO queue.
|
||||||
* be called from either main queue or IO queue.
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithPath:(NSString *)path
|
- (instancetype)initWithPath:(NSString *)path
|
||||||
ioQueue:(dispatch_queue_t)ioQueue
|
ioQueue:(dispatch_queue_t)ioQueue
|
||||||
completionHandler:(FLTSavePhotoDelegateCompletionHandler)completionHandler;
|
completionHandler:(FLTSavePhotoDelegateCompletionHandler)completionHandler;
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
|
|
||||||
#import "FLTSavePhotoDelegate.h"
|
#import "FLTSavePhotoDelegate.h"
|
||||||
|
|
||||||
/**
|
/// API exposed for unit tests.
|
||||||
API exposed for unit tests.
|
|
||||||
*/
|
|
||||||
@interface FLTSavePhotoDelegate ()
|
@interface FLTSavePhotoDelegate ()
|
||||||
|
|
||||||
/// The completion handler block for capture and save photo operations.
|
/// The completion handler block for capture and save photo operations.
|
||||||
|
@ -6,22 +6,16 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// A thread safe wrapper for FlutterEventChannel that can be called from any thread, by dispatching
|
||||||
* A thread safe wrapper for FlutterEventChannel that can be called from any thread, by dispatching
|
/// its underlying engine calls to the main thread.
|
||||||
* its underlying engine calls to the main thread.
|
|
||||||
*/
|
|
||||||
@interface FLTThreadSafeEventChannel : NSObject
|
@interface FLTThreadSafeEventChannel : NSObject
|
||||||
|
|
||||||
/**
|
/// Creates a FLTThreadSafeEventChannel by wrapping a FlutterEventChannel object.
|
||||||
* Creates a FLTThreadSafeEventChannel by wrapping a FlutterEventChannel object.
|
/// @param channel The FlutterEventChannel object to be wrapped.
|
||||||
* @param channel The FlutterEventChannel object to be wrapped.
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithEventChannel:(FlutterEventChannel *)channel;
|
- (instancetype)initWithEventChannel:(FlutterEventChannel *)channel;
|
||||||
|
|
||||||
/*
|
/// Registers a handler on the main thread for stream setup requests from the Flutter side.
|
||||||
* Registers a handler on the main thread for stream setup requests from the Flutter side.
|
/// The completion block runs on the main thread.
|
||||||
# The completion block runs on the main thread.
|
|
||||||
*/
|
|
||||||
- (void)setStreamHandler:(nullable NSObject<FlutterStreamHandler> *)handler
|
- (void)setStreamHandler:(nullable NSObject<FlutterStreamHandler> *)handler
|
||||||
completion:(void (^)(void))completion;
|
completion:(void (^)(void))completion;
|
||||||
|
|
||||||
|
@ -6,56 +6,38 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// A thread safe wrapper for FlutterResult that can be called from any thread, by dispatching its
|
||||||
* A thread safe wrapper for FlutterResult that can be called from any thread, by dispatching its
|
/// underlying engine calls to the main thread.
|
||||||
* underlying engine calls to the main thread.
|
|
||||||
*/
|
|
||||||
@interface FLTThreadSafeFlutterResult : NSObject
|
@interface FLTThreadSafeFlutterResult : NSObject
|
||||||
|
|
||||||
/**
|
/// Gets the original FlutterResult object wrapped by this FLTThreadSafeFlutterResult instance.
|
||||||
* Gets the original FlutterResult object wrapped by this FLTThreadSafeFlutterResult instance.
|
|
||||||
*/
|
|
||||||
@property(readonly, nonatomic) FlutterResult flutterResult;
|
@property(readonly, nonatomic) FlutterResult flutterResult;
|
||||||
|
|
||||||
/**
|
/// Initializes with a FlutterResult object.
|
||||||
* Initializes with a FlutterResult object.
|
/// @param result The FlutterResult object that the result will be given to.
|
||||||
* @param result The FlutterResult object that the result will be given to.
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithResult:(FlutterResult)result;
|
- (instancetype)initWithResult:(FlutterResult)result;
|
||||||
|
|
||||||
/**
|
/// Sends a successful result on the main thread without any data.
|
||||||
* Sends a successful result on the main thread without any data.
|
|
||||||
*/
|
|
||||||
- (void)sendSuccess;
|
- (void)sendSuccess;
|
||||||
|
|
||||||
/**
|
/// Sends a successful result on the main thread with data.
|
||||||
* Sends a successful result on the main thread with data.
|
/// @param data Result data that is send to the Flutter Dart side.
|
||||||
* @param data Result data that is send to the Flutter Dart side.
|
|
||||||
*/
|
|
||||||
- (void)sendSuccessWithData:(id)data;
|
- (void)sendSuccessWithData:(id)data;
|
||||||
|
|
||||||
/**
|
/// Sends an NSError as result on the main thread.
|
||||||
* Sends an NSError as result on the main thread.
|
/// @param error Error that will be send as FlutterError.
|
||||||
* @param error Error that will be send as FlutterError.
|
|
||||||
*/
|
|
||||||
- (void)sendError:(NSError *)error;
|
- (void)sendError:(NSError *)error;
|
||||||
|
|
||||||
/**
|
/// Sends a FlutterError as result on the main thread.
|
||||||
* Sends a FlutterError as result on the main thread.
|
/// @param flutterError FlutterError that will be sent to the Flutter Dart side.
|
||||||
* @param flutterError FlutterError that will be sent to the Flutter Dart side.
|
|
||||||
*/
|
|
||||||
- (void)sendFlutterError:(FlutterError *)flutterError;
|
- (void)sendFlutterError:(FlutterError *)flutterError;
|
||||||
|
|
||||||
/**
|
/// Sends a FlutterError as result on the main thread.
|
||||||
* Sends a FlutterError as result on the main thread.
|
|
||||||
*/
|
|
||||||
- (void)sendErrorWithCode:(NSString *)code
|
- (void)sendErrorWithCode:(NSString *)code
|
||||||
message:(nullable NSString *)message
|
message:(nullable NSString *)message
|
||||||
details:(nullable id)details;
|
details:(nullable id)details;
|
||||||
|
|
||||||
/**
|
/// Sends FlutterMethodNotImplemented as result on the main thread.
|
||||||
* Sends FlutterMethodNotImplemented as result on the main thread.
|
|
||||||
*/
|
|
||||||
- (void)sendNotImplemented;
|
- (void)sendNotImplemented;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -47,9 +47,7 @@
|
|||||||
[self send:FlutterMethodNotImplemented];
|
[self send:FlutterMethodNotImplemented];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Sends result to flutterResult on the main thread.
|
||||||
* Sends result to flutterResult on the main thread.
|
|
||||||
*/
|
|
||||||
- (void)send:(id _Nullable)result {
|
- (void)send:(id _Nullable)result {
|
||||||
FLTEnsureToRunOnMainQueue(^{
|
FLTEnsureToRunOnMainQueue(^{
|
||||||
// WARNING: Should not use weak self, because `FlutterResult`s are passed as arguments
|
// WARNING: Should not use weak self, because `FlutterResult`s are passed as arguments
|
||||||
|
@ -6,21 +6,15 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// A thread safe wrapper for FlutterMethodChannel that can be called from any thread, by
|
||||||
* A thread safe wrapper for FlutterMethodChannel that can be called from any thread, by dispatching
|
/// dispatching its underlying engine calls to the main thread.
|
||||||
* its underlying engine calls to the main thread.
|
|
||||||
*/
|
|
||||||
@interface FLTThreadSafeMethodChannel : NSObject
|
@interface FLTThreadSafeMethodChannel : NSObject
|
||||||
|
|
||||||
/**
|
/// Creates a FLTThreadSafeMethodChannel by wrapping a FlutterMethodChannel object.
|
||||||
* Creates a FLTThreadSafeMethodChannel by wrapping a FlutterMethodChannel object.
|
/// @param channel The FlutterMethodChannel object to be wrapped.
|
||||||
* @param channel The FlutterMethodChannel object to be wrapped.
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithMethodChannel:(FlutterMethodChannel *)channel;
|
- (instancetype)initWithMethodChannel:(FlutterMethodChannel *)channel;
|
||||||
|
|
||||||
/**
|
/// Invokes the specified flutter method on the main thread with the specified arguments.
|
||||||
* Invokes the specified flutter method on the main thread with the specified arguments.
|
|
||||||
*/
|
|
||||||
- (void)invokeMethod:(NSString *)method arguments:(nullable id)arguments;
|
- (void)invokeMethod:(NSString *)method arguments:(nullable id)arguments;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -6,39 +6,29 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// A thread safe wrapper for FlutterTextureRegistry that can be called from any thread, by
|
||||||
* A thread safe wrapper for FlutterTextureRegistry that can be called from any thread, by
|
/// dispatching its underlying engine calls to the main thread.
|
||||||
* dispatching its underlying engine calls to the main thread.
|
|
||||||
*/
|
|
||||||
@interface FLTThreadSafeTextureRegistry : NSObject
|
@interface FLTThreadSafeTextureRegistry : NSObject
|
||||||
|
|
||||||
/**
|
/// Creates a FLTThreadSafeTextureRegistry by wrapping an object conforming to
|
||||||
* Creates a FLTThreadSafeTextureRegistry by wrapping an object conforming to
|
/// FlutterTextureRegistry.
|
||||||
* FlutterTextureRegistry.
|
/// @param registry The FlutterTextureRegistry object to be wrapped.
|
||||||
* @param registry The FlutterTextureRegistry object to be wrapped.
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithTextureRegistry:(NSObject<FlutterTextureRegistry> *)registry;
|
- (instancetype)initWithTextureRegistry:(NSObject<FlutterTextureRegistry> *)registry;
|
||||||
|
|
||||||
/**
|
/// Registers a `FlutterTexture` on the main thread for usage in Flutter and returns an id that can
|
||||||
* Registers a `FlutterTexture` on the main thread for usage in Flutter and returns an id that can
|
/// be used to reference that texture when calling into Flutter with channels.
|
||||||
* be used to reference that texture when calling into Flutter with channels.
|
///
|
||||||
*
|
/// On success the completion block completes with the pointer to the registered texture, else with
|
||||||
* On success the completion block completes with the pointer to the registered texture, else with
|
/// 0. The completion block runs on the main thread.
|
||||||
* 0. The completion block runs on the main thread.
|
|
||||||
*/
|
|
||||||
- (void)registerTexture:(NSObject<FlutterTexture> *)texture
|
- (void)registerTexture:(NSObject<FlutterTexture> *)texture
|
||||||
completion:(void (^)(int64_t))completion;
|
completion:(void (^)(int64_t))completion;
|
||||||
|
|
||||||
/**
|
/// Notifies the Flutter engine on the main thread that the given texture has been updated.
|
||||||
* Notifies the Flutter engine on the main thread that the given texture has been updated.
|
|
||||||
*/
|
|
||||||
- (void)textureFrameAvailable:(int64_t)textureId;
|
- (void)textureFrameAvailable:(int64_t)textureId;
|
||||||
|
|
||||||
/**
|
/// Notifies the Flutter engine on the main thread to unregister a `FlutterTexture` that has been
|
||||||
* Notifies the Flutter engine on the main thread to unregister a `FlutterTexture` that has been
|
/// previously registered with `registerTexture:`.
|
||||||
* previously registered with `registerTexture:`.
|
/// @param textureId The result that was previously returned from `registerTexture:`.
|
||||||
* @param textureId The result that was previously returned from `registerTexture:`.
|
|
||||||
*/
|
|
||||||
- (void)unregisterTexture:(int64_t)textureId;
|
- (void)unregisterTexture:(int64_t)textureId;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -9,14 +9,10 @@
|
|||||||
// This header is available in the Test module. Import via "@import file_selector_ios.Test;".
|
// This header is available in the Test module. Import via "@import file_selector_ios.Test;".
|
||||||
@interface FFSFileSelectorPlugin () <FFSFileSelectorApi, UIDocumentPickerDelegate>
|
@interface FFSFileSelectorPlugin () <FFSFileSelectorApi, UIDocumentPickerDelegate>
|
||||||
|
|
||||||
/**
|
/// Overrides the view controller used for presenting the document picker.
|
||||||
* Overrides the view controller used for presenting the document picker.
|
|
||||||
*/
|
|
||||||
@property(nonatomic) UIViewController *_Nullable presentingViewControllerOverride;
|
@property(nonatomic) UIViewController *_Nullable presentingViewControllerOverride;
|
||||||
|
|
||||||
/**
|
/// Overrides the UIDocumentPickerViewController used for file picking.
|
||||||
* Overrides the UIDocumentPickerViewController used for file picking.
|
|
||||||
*/
|
|
||||||
@property(nonatomic) UIDocumentPickerViewController *_Nullable documentPickerViewControllerOverride;
|
@property(nonatomic) UIDocumentPickerViewController *_Nullable documentPickerViewControllerOverride;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -9,14 +9,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface FLTGoogleMapController (Test)
|
@interface FLTGoogleMapController (Test)
|
||||||
|
|
||||||
/**
|
/// Initializes a map controller with a concrete map view.
|
||||||
* Initializes a map controller with a concrete map view.
|
///
|
||||||
*
|
/// @param mapView A map view that will be displayed by the controller
|
||||||
* @param mapView A map view that will be displayed by the controller
|
/// @param viewId A unique identifier for the controller.
|
||||||
* @param viewId A unique identifier for the controller.
|
/// @param args Parameters for initialising the map view.
|
||||||
* @param args Parameters for initialising the map view.
|
/// @param registrar The plugin registrar passed from Flutter.
|
||||||
* @param registrar The plugin registrar passed from Flutter.
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithMapView:(GMSMapView *)mapView
|
- (instancetype)initWithMapView:(GMSMapView *)mapView
|
||||||
viewIdentifier:(int64_t)viewId
|
viewIdentifier:(int64_t)viewId
|
||||||
arguments:(id _Nullable)args
|
arguments:(id _Nullable)args
|
||||||
|
@ -329,18 +329,16 @@ static FlutterError *getFlutterError(NSError *error) {
|
|||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// This method recursively iterate through the view hierarchy
|
||||||
* This method recursively iterate through the view hierarchy
|
/// to return the top most view controller.
|
||||||
* to return the top most view controller.
|
///
|
||||||
*
|
/// It supports the following scenarios:
|
||||||
* It supports the following scenarios:
|
///
|
||||||
*
|
/// - The view controller is presenting another view.
|
||||||
* - The view controller is presenting another view.
|
/// - The view controller is a UINavigationController.
|
||||||
* - The view controller is a UINavigationController.
|
/// - The view controller is a UITabBarController.
|
||||||
* - The view controller is a UITabBarController.
|
///
|
||||||
*
|
/// @return The top most view controller.
|
||||||
* @return The top most view controller.
|
|
||||||
*/
|
|
||||||
- (UIViewController *)topViewControllerFromViewController:(UIViewController *)viewController {
|
- (UIViewController *)topViewControllerFromViewController:(UIViewController *)viewController {
|
||||||
if ([viewController isKindOfClass:[UINavigationController class]]) {
|
if ([viewController isKindOfClass:[UINavigationController class]]) {
|
||||||
UINavigationController *navigationController = (UINavigationController *)viewController;
|
UINavigationController *navigationController = (UINavigationController *)viewController;
|
||||||
|
@ -31,12 +31,10 @@
|
|||||||
|
|
||||||
@interface FLTImagePickerPlugin ()
|
@interface FLTImagePickerPlugin ()
|
||||||
|
|
||||||
/**
|
/// The UIImagePickerController instances that will be used when a new
|
||||||
* The UIImagePickerController instances that will be used when a new
|
/// controller would normally be created. Each call to
|
||||||
* controller would normally be created. Each call to
|
/// createImagePickerController will remove the current first element from
|
||||||
* createImagePickerController will remove the current first element from
|
/// the array.
|
||||||
* the array.
|
|
||||||
*/
|
|
||||||
@property(strong, nonatomic)
|
@property(strong, nonatomic)
|
||||||
NSMutableArray<UIImagePickerController *> *imagePickerControllerOverrides;
|
NSMutableArray<UIImagePickerController *> *imagePickerControllerOverrides;
|
||||||
|
|
||||||
@ -84,11 +82,9 @@ typedef NS_ENUM(NSInteger, ImagePickerClassType) { UIImagePickerClassType, PHPic
|
|||||||
return topController;
|
return topController;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Returns the UIImagePickerControllerCameraDevice to use given [source].
|
||||||
* Returns the UIImagePickerControllerCameraDevice to use given [source].
|
///
|
||||||
*
|
/// @param source The source specification from Dart.
|
||||||
* @param source The source specification from Dart.
|
|
||||||
*/
|
|
||||||
- (UIImagePickerControllerCameraDevice)cameraDeviceForSource:(FLTSourceSpecification *)source {
|
- (UIImagePickerControllerCameraDevice)cameraDeviceForSource:(FLTSourceSpecification *)source {
|
||||||
switch (source.camera) {
|
switch (source.camera) {
|
||||||
case FLTSourceCameraFront:
|
case FLTSourceCameraFront:
|
||||||
@ -287,12 +283,10 @@ typedef NS_ENUM(NSInteger, ImagePickerClassType) { UIImagePickerClassType, PHPic
|
|||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
/**
|
/// If a call is still in progress, cancels it by returning an error and then clearing state.
|
||||||
* If a call is still in progress, cancels it by returning an error and then clearing state.
|
///
|
||||||
*
|
/// TODO(stuartmorgan): Eliminate this, and instead track context per image picker (e.g., using
|
||||||
* TODO(stuartmorgan): Eliminate this, and instead track context per image picker (e.g., using
|
/// associated objects).
|
||||||
* associated objects).
|
|
||||||
*/
|
|
||||||
- (void)cancelInProgressCall {
|
- (void)cancelInProgressCall {
|
||||||
if (self.callContext) {
|
if (self.callContext) {
|
||||||
[self sendCallResultWithError:[FlutterError errorWithCode:@"multiple_request"
|
[self sendCallResultWithError:[FlutterError errorWithCode:@"multiple_request"
|
||||||
@ -687,12 +681,10 @@ typedef NS_ENUM(NSInteger, ImagePickerClassType) { UIImagePickerClassType, PHPic
|
|||||||
self.callContext = nil;
|
self.callContext = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Sends the given error via `callContext.result` as the result of the original platform channel
|
||||||
* Sends the given error via `callContext.result` as the result of the original platform channel
|
/// method call, clearing the in-progress call state.
|
||||||
* method call, clearing the in-progress call state.
|
///
|
||||||
*
|
/// @param error The error to return.
|
||||||
* @param error The error to return.
|
|
||||||
*/
|
|
||||||
- (void)sendCallResultWithError:(FlutterError *)error {
|
- (void)sendCallResultWithError:(FlutterError *)error {
|
||||||
if (!self.callContext) {
|
if (!self.callContext) {
|
||||||
return;
|
return;
|
||||||
|
@ -10,95 +10,77 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// The return handler used for all method calls, which internally adapts the provided result list
|
||||||
* The return handler used for all method calls, which internally adapts the provided result list
|
/// to return either a list or a single element depending on the original call.
|
||||||
* to return either a list or a single element depending on the original call.
|
|
||||||
*/
|
|
||||||
typedef void (^FlutterResultAdapter)(NSArray<NSString *> *_Nullable, FlutterError *_Nullable);
|
typedef void (^FlutterResultAdapter)(NSArray<NSString *> *_Nullable, FlutterError *_Nullable);
|
||||||
|
|
||||||
/**
|
/// A container class for context to use when handling a method call from the Dart side.
|
||||||
* A container class for context to use when handling a method call from the Dart side.
|
|
||||||
*/
|
|
||||||
@interface FLTImagePickerMethodCallContext : NSObject
|
@interface FLTImagePickerMethodCallContext : NSObject
|
||||||
|
|
||||||
/**
|
/// Initializes a new context that calls |result| on completion of the operation.
|
||||||
* Initializes a new context that calls |result| on completion of the operation.
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithResult:(nonnull FlutterResultAdapter)result;
|
- (instancetype)initWithResult:(nonnull FlutterResultAdapter)result;
|
||||||
|
|
||||||
/** The callback to provide results to the Dart caller. */
|
/// The callback to provide results to the Dart caller.
|
||||||
@property(nonatomic, copy, nonnull) FlutterResultAdapter result;
|
@property(nonatomic, copy, nonnull) FlutterResultAdapter result;
|
||||||
|
|
||||||
/**
|
/// The maximum size to enforce on the results.
|
||||||
* The maximum size to enforce on the results.
|
///
|
||||||
*
|
/// If nil, no resizing is done.
|
||||||
* If nil, no resizing is done.
|
|
||||||
*/
|
|
||||||
@property(nonatomic, strong, nullable) FLTMaxSize *maxSize;
|
@property(nonatomic, strong, nullable) FLTMaxSize *maxSize;
|
||||||
|
|
||||||
/**
|
/// The image quality to resample the results to.
|
||||||
* The image quality to resample the results to.
|
///
|
||||||
*
|
/// If nil, no resampling is done.
|
||||||
* If nil, no resampling is done.
|
|
||||||
*/
|
|
||||||
@property(nonatomic, strong, nullable) NSNumber *imageQuality;
|
@property(nonatomic, strong, nullable) NSNumber *imageQuality;
|
||||||
|
|
||||||
/** Maximum number of images to select. 0 indicates no maximum. */
|
/// Maximum number of images to select. 0 indicates no maximum.
|
||||||
@property(nonatomic, assign) int maxImageCount;
|
@property(nonatomic, assign) int maxImageCount;
|
||||||
|
|
||||||
/** Whether the image should be picked with full metadata (requires gallery permissions) */
|
/// Whether the image should be picked with full metadata (requires gallery permissions)
|
||||||
@property(nonatomic, assign) BOOL requestFullMetadata;
|
@property(nonatomic, assign) BOOL requestFullMetadata;
|
||||||
|
|
||||||
/** Whether the picker should include videos in the list*/
|
/// Whether the picker should include videos in the list*/
|
||||||
@property(nonatomic, assign) BOOL includeVideo;
|
@property(nonatomic, assign) BOOL includeVideo;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
/** Methods exposed for unit testing. */
|
/// Methods exposed for unit testing.
|
||||||
@interface FLTImagePickerPlugin () <FLTImagePickerApi,
|
@interface FLTImagePickerPlugin () <FLTImagePickerApi,
|
||||||
UINavigationControllerDelegate,
|
UINavigationControllerDelegate,
|
||||||
UIImagePickerControllerDelegate,
|
UIImagePickerControllerDelegate,
|
||||||
PHPickerViewControllerDelegate,
|
PHPickerViewControllerDelegate,
|
||||||
UIAdaptivePresentationControllerDelegate>
|
UIAdaptivePresentationControllerDelegate>
|
||||||
|
|
||||||
/**
|
/// The context of the Flutter method call that is currently being handled, if any.
|
||||||
* The context of the Flutter method call that is currently being handled, if any.
|
|
||||||
*/
|
|
||||||
@property(strong, nonatomic, nullable) FLTImagePickerMethodCallContext *callContext;
|
@property(strong, nonatomic, nullable) FLTImagePickerMethodCallContext *callContext;
|
||||||
|
|
||||||
- (UIViewController *)viewControllerWithWindow:(nullable UIWindow *)window;
|
- (UIViewController *)viewControllerWithWindow:(nullable UIWindow *)window;
|
||||||
|
|
||||||
/**
|
/// Validates the provided paths list, then sends it via `callContext.result` as the result of the
|
||||||
* Validates the provided paths list, then sends it via `callContext.result` as the result of the
|
/// original platform channel method call, clearing the in-progress call state.
|
||||||
* original platform channel method call, clearing the in-progress call state.
|
///
|
||||||
*
|
/// @param pathList The paths to return. nil indicates a cancelled operation.
|
||||||
* @param pathList The paths to return. nil indicates a cancelled operation.
|
|
||||||
*/
|
|
||||||
- (void)sendCallResultWithSavedPathList:(nullable NSArray *)pathList;
|
- (void)sendCallResultWithSavedPathList:(nullable NSArray *)pathList;
|
||||||
|
|
||||||
/**
|
/// Tells the delegate that the user cancelled the pick operation.
|
||||||
* Tells the delegate that the user cancelled the pick operation.
|
///
|
||||||
*
|
/// Your delegate’s implementation of this method should dismiss the picker view
|
||||||
* Your delegate’s implementation of this method should dismiss the picker view
|
/// by calling the dismissModalViewControllerAnimated: method of the parent
|
||||||
* by calling the dismissModalViewControllerAnimated: method of the parent
|
/// view controller.
|
||||||
* view controller.
|
///
|
||||||
*
|
/// Implementation of this method is optional, but expected.
|
||||||
* Implementation of this method is optional, but expected.
|
///
|
||||||
*
|
/// @param picker The controller object managing the image picker interface.
|
||||||
* @param picker The controller object managing the image picker interface.
|
|
||||||
*/
|
|
||||||
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker;
|
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker;
|
||||||
|
|
||||||
/**
|
/// Sets UIImagePickerController instances that will be used when a new
|
||||||
* Sets UIImagePickerController instances that will be used when a new
|
/// controller would normally be created. Each call to
|
||||||
* controller would normally be created. Each call to
|
/// createImagePickerController will remove the current first element from
|
||||||
* createImagePickerController will remove the current first element from
|
/// the array.
|
||||||
* the array.
|
///
|
||||||
*
|
/// Should be used for testing purposes only.
|
||||||
* Should be used for testing purposes only.
|
|
||||||
*/
|
|
||||||
- (void)setImagePickerControllerOverrides:
|
- (void)setImagePickerControllerOverrides:
|
||||||
(NSArray<UIImagePickerController *> *)imagePickerControllers;
|
(NSArray<UIImagePickerController *> *)imagePickerControllers;
|
||||||
|
|
||||||
|
@ -14,17 +14,15 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// Returns either the saved path, or an error. Both cannot be set.
|
/// Returns either the saved path, or an error. Both cannot be set.
|
||||||
typedef void (^FLTGetSavedPath)(NSString *_Nullable savedPath, FlutterError *_Nullable error);
|
typedef void (^FLTGetSavedPath)(NSString *_Nullable savedPath, FlutterError *_Nullable error);
|
||||||
|
|
||||||
/*!
|
/// @class FLTPHPickerSaveImageToPathOperation
|
||||||
@class FLTPHPickerSaveImageToPathOperation
|
///
|
||||||
|
/// @brief The FLTPHPickerSaveImageToPathOperation class
|
||||||
@brief The FLTPHPickerSaveImageToPathOperation class
|
///
|
||||||
|
/// @discussion This class was implemented to handle saved image paths and populate the pathList
|
||||||
@discussion This class was implemented to handle saved image paths and populate the pathList
|
/// with the final result by using GetSavedPath type block.
|
||||||
with the final result by using GetSavedPath type block.
|
///
|
||||||
|
/// @superclass SuperClass: NSOperation\n
|
||||||
@superclass SuperClass: NSOperation\n
|
/// @helps It helps FLTImagePickerPlugin class.
|
||||||
@helps It helps FLTImagePickerPlugin class.
|
|
||||||
*/
|
|
||||||
@interface FLTPHPickerSaveImageToPathOperation : NSOperation
|
@interface FLTPHPickerSaveImageToPathOperation : NSOperation
|
||||||
|
|
||||||
- (instancetype)initWithResult:(PHPickerResult *)result
|
- (instancetype)initWithResult:(PHPickerResult *)result
|
||||||
|
@ -124,9 +124,7 @@ API_AVAILABLE(ios(14))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Processes the image.
|
||||||
* Processes the image.
|
|
||||||
*/
|
|
||||||
- (void)processImage:(NSData *)pickerImageData API_AVAILABLE(ios(14)) {
|
- (void)processImage:(NSData *)pickerImageData API_AVAILABLE(ios(14)) {
|
||||||
UIImage *localImage = [[UIImage alloc] initWithData:pickerImageData];
|
UIImage *localImage = [[UIImage alloc] initWithData:pickerImageData];
|
||||||
|
|
||||||
@ -190,9 +188,7 @@ API_AVAILABLE(ios(14))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// Processes the video.
|
||||||
* Processes the video.
|
|
||||||
*/
|
|
||||||
- (void)processVideo API_AVAILABLE(ios(14)) {
|
- (void)processVideo API_AVAILABLE(ios(14)) {
|
||||||
NSString *typeIdentifier = self.result.itemProvider.registeredTypeIdentifiers.firstObject;
|
NSString *typeIdentifier = self.result.itemProvider.registeredTypeIdentifiers.firstObject;
|
||||||
[self.result.itemProvider
|
[self.result.itemProvider
|
||||||
|
@ -8,9 +8,7 @@
|
|||||||
|
|
||||||
typedef void (^FLADAuthCompletion)(FLADAuthResultDetails *_Nullable, FlutterError *_Nullable);
|
typedef void (^FLADAuthCompletion)(FLADAuthResultDetails *_Nullable, FlutterError *_Nullable);
|
||||||
|
|
||||||
/**
|
/// A default context factory that wraps standard LAContext allocation.
|
||||||
* A default context factory that wraps standard LAContext allocation.
|
|
||||||
*/
|
|
||||||
@interface FLADefaultAuthContextFactory : NSObject <FLADAuthContextFactory>
|
@interface FLADefaultAuthContextFactory : NSObject <FLADAuthContextFactory>
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@ -22,9 +20,7 @@ typedef void (^FLADAuthCompletion)(FLADAuthResultDetails *_Nullable, FlutterErro
|
|||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
/**
|
/// A data container for sticky auth state.
|
||||||
* A data container for sticky auth state.
|
|
||||||
*/
|
|
||||||
@interface FLAStickyAuthState : NSObject
|
@interface FLAStickyAuthState : NSObject
|
||||||
@property(nonatomic, strong, nonnull) FLADAuthOptions *options;
|
@property(nonatomic, strong, nonnull) FLADAuthOptions *options;
|
||||||
@property(nonatomic, strong, nonnull) FLADAuthStrings *strings;
|
@property(nonatomic, strong, nonnull) FLADAuthStrings *strings;
|
||||||
|
@ -5,17 +5,13 @@
|
|||||||
#import <Flutter/Flutter.h>
|
#import <Flutter/Flutter.h>
|
||||||
#import <LocalAuthentication/LocalAuthentication.h>
|
#import <LocalAuthentication/LocalAuthentication.h>
|
||||||
|
|
||||||
/**
|
/// Protocol for a source of LAContext instances. Used to allow context injection in unit tests.
|
||||||
* Protocol for a source of LAContext instances. Used to allow context injection in unit tests.
|
|
||||||
*/
|
|
||||||
@protocol FLADAuthContextFactory <NSObject>
|
@protocol FLADAuthContextFactory <NSObject>
|
||||||
- (LAContext *)createAuthContext;
|
- (LAContext *)createAuthContext;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface FLALocalAuthPlugin ()
|
@interface FLALocalAuthPlugin ()
|
||||||
/**
|
/// Returns an instance that uses the given factory to create LAContexts.
|
||||||
* Returns an instance that uses the given factory to create LAContexts.
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithContextFactory:(NSObject<FLADAuthContextFactory> *)factory
|
- (instancetype)initWithContextFactory:(NSObject<FLADAuthContextFactory> *)factory
|
||||||
NS_DESIGNATED_INITIALIZER;
|
NS_DESIGNATED_INITIALIZER;
|
||||||
@end
|
@end
|
||||||
|
@ -10,9 +10,7 @@
|
|||||||
@property(nonatomic) FlutterIntegrationCoreApi *flutterAPI;
|
@property(nonatomic) FlutterIntegrationCoreApi *flutterAPI;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// This plugin handles the native side of the integration tests in example/integration_test/.
|
||||||
* This plugin handles the native side of the integration tests in example/integration_test/.
|
|
||||||
*/
|
|
||||||
@implementation AlternateLanguageTestPlugin
|
@implementation AlternateLanguageTestPlugin
|
||||||
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
|
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
|
||||||
AlternateLanguageTestPlugin *plugin = [[AlternateLanguageTestPlugin alloc] init];
|
AlternateLanguageTestPlugin *plugin = [[AlternateLanguageTestPlugin alloc] init];
|
||||||
|
@ -10,9 +10,7 @@
|
|||||||
@property(nonatomic) FlutterIntegrationCoreApi *flutterAPI;
|
@property(nonatomic) FlutterIntegrationCoreApi *flutterAPI;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// This plugin handles the native side of the integration tests in example/integration_test/.
|
||||||
* This plugin handles the native side of the integration tests in example/integration_test/.
|
|
||||||
*/
|
|
||||||
@implementation AlternateLanguageTestPlugin
|
@implementation AlternateLanguageTestPlugin
|
||||||
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
|
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
|
||||||
AlternateLanguageTestPlugin *plugin = [[AlternateLanguageTestPlugin alloc] init];
|
AlternateLanguageTestPlugin *plugin = [[AlternateLanguageTestPlugin alloc] init];
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
|
|
||||||
#import <AVFoundation/AVFoundation.h>
|
#import <AVFoundation/AVFoundation.h>
|
||||||
|
|
||||||
/**
|
/// Returns a standardized transform
|
||||||
* Returns a standardized transform
|
/// according to the orientation of the track.
|
||||||
* according to the orientation of the track.
|
///
|
||||||
*
|
/// Note: https://stackoverflow.com/questions/64161544
|
||||||
* Note: https://stackoverflow.com/questions/64161544
|
/// `AVAssetTrack.preferredTransform` can have wrong `tx` and `ty`.
|
||||||
* `AVAssetTrack.preferredTransform` can have wrong `tx` and `ty`.
|
|
||||||
*/
|
|
||||||
CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack* track);
|
CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack* track);
|
||||||
|
@ -13,19 +13,15 @@
|
|||||||
// A cross-platform display link abstraction.
|
// A cross-platform display link abstraction.
|
||||||
@interface FVPDisplayLink : NSObject
|
@interface FVPDisplayLink : NSObject
|
||||||
|
|
||||||
/**
|
/// Whether the display link is currently running (i.e., firing events).
|
||||||
* Whether the display link is currently running (i.e., firing events).
|
///
|
||||||
*
|
/// Defaults to NO.
|
||||||
* Defaults to NO.
|
|
||||||
*/
|
|
||||||
@property(nonatomic, assign) BOOL running;
|
@property(nonatomic, assign) BOOL running;
|
||||||
|
|
||||||
/**
|
/// Initializes a display link that calls the given callback when fired.
|
||||||
* Initializes a display link that calls the given callback when fired.
|
///
|
||||||
*
|
/// The display link starts paused, so must be started, by setting 'running' to YES, before the
|
||||||
* The display link starts paused, so must be started, by setting 'running' to YES, before the
|
/// callback will fire.
|
||||||
* callback will fire.
|
|
||||||
*/
|
|
||||||
- (instancetype)initWithRegistrar:(id<FlutterPluginRegistrar>)registrar
|
- (instancetype)initWithRegistrar:(id<FlutterPluginRegistrar>)registrar
|
||||||
callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER;
|
callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER;
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/** Non-test implementation of the diplay link factory. */
|
/// Non-test implementation of the diplay link factory.
|
||||||
@interface FVPDefaultDisplayLinkFactory : NSObject <FVPDisplayLinkFactory>
|
@interface FVPDefaultDisplayLinkFactory : NSObject <FVPDisplayLinkFactory>
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -7,17 +7,15 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <QuartzCore/QuartzCore.h>
|
#import <QuartzCore/QuartzCore.h>
|
||||||
|
|
||||||
/**
|
/// A proxy object to act as a CADisplayLink target, to avoid retain loops, since FVPDisplayLink
|
||||||
* A proxy object to act as a CADisplayLink target, to avoid retain loops, since FVPDisplayLink
|
/// owns its CADisplayLink, but CADisplayLink retains its target.
|
||||||
* owns its CADisplayLink, but CADisplayLink retains its target.
|
|
||||||
*/
|
|
||||||
@interface FVPDisplayLinkTarget : NSObject
|
@interface FVPDisplayLinkTarget : NSObject
|
||||||
@property(nonatomic) void (^callback)(void);
|
@property(nonatomic) void (^callback)(void);
|
||||||
|
|
||||||
/** Initializes a target object that runs the given callback when onDisplayLink: is called. */
|
/// Initializes a target object that runs the given callback when onDisplayLink: is called.
|
||||||
- (instancetype)initWithCallback:(void (^)(void))callback;
|
- (instancetype)initWithCallback:(void (^)(void))callback;
|
||||||
|
|
||||||
/** Method to be called when a CADisplayLink fires. */
|
/// Method to be called when a CADisplayLink fires.
|
||||||
- (void)onDisplayLink:(CADisplayLink *)link;
|
- (void)onDisplayLink:(CADisplayLink *)link;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -8,209 +8,168 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Converts an FWFNSUrlRequestData to an NSURLRequest.
|
||||||
* Converts an FWFNSUrlRequestData to an NSURLRequest.
|
///
|
||||||
*
|
/// @param data The data object containing information to create an NSURLRequest.
|
||||||
* @param data The data object containing information to create an NSURLRequest.
|
///
|
||||||
*
|
/// @return An NSURLRequest or nil if data could not be converted.
|
||||||
* @return An NSURLRequest or nil if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern NSURLRequest *_Nullable FWFNativeNSURLRequestFromRequestData(FWFNSUrlRequestData *data);
|
extern NSURLRequest *_Nullable FWFNativeNSURLRequestFromRequestData(FWFNSUrlRequestData *data);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFNSHttpCookieData to an NSHTTPCookie.
|
||||||
* Converts an FWFNSHttpCookieData to an NSHTTPCookie.
|
///
|
||||||
*
|
/// @param data The data object containing information to create an NSHTTPCookie.
|
||||||
* @param data The data object containing information to create an NSHTTPCookie.
|
///
|
||||||
*
|
/// @return An NSHTTPCookie or nil if data could not be converted.
|
||||||
* @return An NSHTTPCookie or nil if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern NSHTTPCookie *_Nullable FWFNativeNSHTTPCookieFromCookieData(FWFNSHttpCookieData *data);
|
extern NSHTTPCookie *_Nullable FWFNativeNSHTTPCookieFromCookieData(FWFNSHttpCookieData *data);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFNSKeyValueObservingOptionsEnumData to an NSKeyValueObservingOptions.
|
||||||
* Converts an FWFNSKeyValueObservingOptionsEnumData to an NSKeyValueObservingOptions.
|
///
|
||||||
*
|
/// @param data The data object containing information to create an NSKeyValueObservingOptions.
|
||||||
* @param data The data object containing information to create an NSKeyValueObservingOptions.
|
///
|
||||||
*
|
/// @return An NSKeyValueObservingOptions or -1 if data could not be converted.
|
||||||
* @return An NSKeyValueObservingOptions or -1 if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern NSKeyValueObservingOptions FWFNativeNSKeyValueObservingOptionsFromEnumData(
|
extern NSKeyValueObservingOptions FWFNativeNSKeyValueObservingOptionsFromEnumData(
|
||||||
FWFNSKeyValueObservingOptionsEnumData *data);
|
FWFNSKeyValueObservingOptionsEnumData *data);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFNSHTTPCookiePropertyKeyEnumData to an NSHTTPCookiePropertyKey.
|
||||||
* Converts an FWFNSHTTPCookiePropertyKeyEnumData to an NSHTTPCookiePropertyKey.
|
///
|
||||||
*
|
/// @param data The data object containing information to create an NSHTTPCookiePropertyKey.
|
||||||
* @param data The data object containing information to create an NSHTTPCookiePropertyKey.
|
///
|
||||||
*
|
/// @return An NSHttpCookiePropertyKey or nil if data could not be converted.
|
||||||
* @return An NSHttpCookiePropertyKey or nil if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern NSHTTPCookiePropertyKey _Nullable FWFNativeNSHTTPCookiePropertyKeyFromEnumData(
|
extern NSHTTPCookiePropertyKey _Nullable FWFNativeNSHTTPCookiePropertyKeyFromEnumData(
|
||||||
FWFNSHttpCookiePropertyKeyEnumData *data);
|
FWFNSHttpCookiePropertyKeyEnumData *data);
|
||||||
|
|
||||||
/**
|
/// Converts a WKUserScriptData to a WKUserScript.
|
||||||
* Converts a WKUserScriptData to a WKUserScript.
|
///
|
||||||
*
|
/// @param data The data object containing information to create a WKUserScript.
|
||||||
* @param data The data object containing information to create a WKUserScript.
|
///
|
||||||
*
|
/// @return A WKUserScript or nil if data could not be converted.
|
||||||
* @return A WKUserScript or nil if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern WKUserScript *FWFNativeWKUserScriptFromScriptData(FWFWKUserScriptData *data);
|
extern WKUserScript *FWFNativeWKUserScriptFromScriptData(FWFWKUserScriptData *data);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFWKUserScriptInjectionTimeEnumData to a WKUserScriptInjectionTime.
|
||||||
* Converts an FWFWKUserScriptInjectionTimeEnumData to a WKUserScriptInjectionTime.
|
///
|
||||||
*
|
/// @param data The data object containing information to create a WKUserScriptInjectionTime.
|
||||||
* @param data The data object containing information to create a WKUserScriptInjectionTime.
|
///
|
||||||
*
|
/// @return A WKUserScriptInjectionTime or -1 if data could not be converted.
|
||||||
* @return A WKUserScriptInjectionTime or -1 if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern WKUserScriptInjectionTime FWFNativeWKUserScriptInjectionTimeFromEnumData(
|
extern WKUserScriptInjectionTime FWFNativeWKUserScriptInjectionTimeFromEnumData(
|
||||||
FWFWKUserScriptInjectionTimeEnumData *data);
|
FWFWKUserScriptInjectionTimeEnumData *data);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFWKAudiovisualMediaTypeEnumData to a WKAudiovisualMediaTypes.
|
||||||
* Converts an FWFWKAudiovisualMediaTypeEnumData to a WKAudiovisualMediaTypes.
|
///
|
||||||
*
|
/// @param data The data object containing information to create a WKAudiovisualMediaTypes.
|
||||||
* @param data The data object containing information to create a WKAudiovisualMediaTypes.
|
///
|
||||||
*
|
/// @return A WKAudiovisualMediaType or -1 if data could not be converted.
|
||||||
* @return A WKAudiovisualMediaType or -1 if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern WKAudiovisualMediaTypes FWFNativeWKAudiovisualMediaTypeFromEnumData(
|
extern WKAudiovisualMediaTypes FWFNativeWKAudiovisualMediaTypeFromEnumData(
|
||||||
FWFWKAudiovisualMediaTypeEnumData *data);
|
FWFWKAudiovisualMediaTypeEnumData *data);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFWKWebsiteDataTypeEnumData to a WKWebsiteDataType.
|
||||||
* Converts an FWFWKWebsiteDataTypeEnumData to a WKWebsiteDataType.
|
///
|
||||||
*
|
/// @param data The data object containing information to create a WKWebsiteDataType.
|
||||||
* @param data The data object containing information to create a WKWebsiteDataType.
|
///
|
||||||
*
|
/// @return A WKWebsiteDataType or nil if data could not be converted.
|
||||||
* @return A WKWebsiteDataType or nil if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern NSString *_Nullable FWFNativeWKWebsiteDataTypeFromEnumData(
|
extern NSString *_Nullable FWFNativeWKWebsiteDataTypeFromEnumData(
|
||||||
FWFWKWebsiteDataTypeEnumData *data);
|
FWFWKWebsiteDataTypeEnumData *data);
|
||||||
|
|
||||||
/**
|
/// Converts a WKNavigationAction to an FWFWKNavigationActionData.
|
||||||
* Converts a WKNavigationAction to an FWFWKNavigationActionData.
|
///
|
||||||
*
|
/// @param action The object containing information to create a WKNavigationActionData.
|
||||||
* @param action The object containing information to create a WKNavigationActionData.
|
///
|
||||||
*
|
/// @return A FWFWKNavigationActionData.
|
||||||
* @return A FWFWKNavigationActionData.
|
|
||||||
*/
|
|
||||||
extern FWFWKNavigationActionData *FWFWKNavigationActionDataFromNativeWKNavigationAction(
|
extern FWFWKNavigationActionData *FWFWKNavigationActionDataFromNativeWKNavigationAction(
|
||||||
WKNavigationAction *action);
|
WKNavigationAction *action);
|
||||||
|
|
||||||
/**
|
/// Converts a NSURLRequest to an FWFNSUrlRequestData.
|
||||||
* Converts a NSURLRequest to an FWFNSUrlRequestData.
|
///
|
||||||
*
|
/// @param request The object containing information to create a WKNavigationActionData.
|
||||||
* @param request The object containing information to create a WKNavigationActionData.
|
///
|
||||||
*
|
/// @return A FWFNSUrlRequestData.
|
||||||
* @return A FWFNSUrlRequestData.
|
|
||||||
*/
|
|
||||||
extern FWFNSUrlRequestData *FWFNSUrlRequestDataFromNativeNSURLRequest(NSURLRequest *request);
|
extern FWFNSUrlRequestData *FWFNSUrlRequestDataFromNativeNSURLRequest(NSURLRequest *request);
|
||||||
|
|
||||||
/**
|
/// Converts a WKFrameInfo to an FWFWKFrameInfoData.
|
||||||
* Converts a WKFrameInfo to an FWFWKFrameInfoData.
|
///
|
||||||
*
|
/// @param info The object containing information to create a FWFWKFrameInfoData.
|
||||||
* @param info The object containing information to create a FWFWKFrameInfoData.
|
///
|
||||||
*
|
/// @return A FWFWKFrameInfoData.
|
||||||
* @return A FWFWKFrameInfoData.
|
|
||||||
*/
|
|
||||||
extern FWFWKFrameInfoData *FWFWKFrameInfoDataFromNativeWKFrameInfo(WKFrameInfo *info);
|
extern FWFWKFrameInfoData *FWFWKFrameInfoDataFromNativeWKFrameInfo(WKFrameInfo *info);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFWKNavigationActionPolicyEnumData to a WKNavigationActionPolicy.
|
||||||
* Converts an FWFWKNavigationActionPolicyEnumData to a WKNavigationActionPolicy.
|
///
|
||||||
*
|
/// @param data The data object containing information to create a WKNavigationActionPolicy.
|
||||||
* @param data The data object containing information to create a WKNavigationActionPolicy.
|
///
|
||||||
*
|
/// @return A WKNavigationActionPolicy or -1 if data could not be converted.
|
||||||
* @return A WKNavigationActionPolicy or -1 if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern WKNavigationActionPolicy FWFNativeWKNavigationActionPolicyFromEnumData(
|
extern WKNavigationActionPolicy FWFNativeWKNavigationActionPolicyFromEnumData(
|
||||||
FWFWKNavigationActionPolicyEnumData *data);
|
FWFWKNavigationActionPolicyEnumData *data);
|
||||||
|
|
||||||
/**
|
/// Converts a NSError to an FWFNSErrorData.
|
||||||
* Converts a NSError to an FWFNSErrorData.
|
///
|
||||||
*
|
/// @param error The object containing information to create a FWFNSErrorData.
|
||||||
* @param error The object containing information to create a FWFNSErrorData.
|
///
|
||||||
*
|
/// @return A FWFNSErrorData.
|
||||||
* @return A FWFNSErrorData.
|
|
||||||
*/
|
|
||||||
extern FWFNSErrorData *FWFNSErrorDataFromNativeNSError(NSError *error);
|
extern FWFNSErrorData *FWFNSErrorDataFromNativeNSError(NSError *error);
|
||||||
|
|
||||||
/**
|
/// Converts an NSKeyValueChangeKey to a FWFNSKeyValueChangeKeyEnumData.
|
||||||
* Converts an NSKeyValueChangeKey to a FWFNSKeyValueChangeKeyEnumData.
|
///
|
||||||
*
|
/// @param key The data object containing information to create a FWFNSKeyValueChangeKeyEnumData.
|
||||||
* @param key The data object containing information to create a FWFNSKeyValueChangeKeyEnumData.
|
///
|
||||||
*
|
/// @return A FWFNSKeyValueChangeKeyEnumData.
|
||||||
* @return A FWFNSKeyValueChangeKeyEnumData.
|
|
||||||
*/
|
|
||||||
extern FWFNSKeyValueChangeKeyEnumData *FWFNSKeyValueChangeKeyEnumDataFromNativeNSKeyValueChangeKey(
|
extern FWFNSKeyValueChangeKeyEnumData *FWFNSKeyValueChangeKeyEnumDataFromNativeNSKeyValueChangeKey(
|
||||||
NSKeyValueChangeKey key);
|
NSKeyValueChangeKey key);
|
||||||
|
|
||||||
/**
|
/// Converts a WKScriptMessage to an FWFWKScriptMessageData.
|
||||||
* Converts a WKScriptMessage to an FWFWKScriptMessageData.
|
///
|
||||||
*
|
/// @param message The object containing information to create a FWFWKScriptMessageData.
|
||||||
* @param message The object containing information to create a FWFWKScriptMessageData.
|
///
|
||||||
*
|
/// @return A FWFWKScriptMessageData.
|
||||||
* @return A FWFWKScriptMessageData.
|
|
||||||
*/
|
|
||||||
extern FWFWKScriptMessageData *FWFWKScriptMessageDataFromNativeWKScriptMessage(
|
extern FWFWKScriptMessageData *FWFWKScriptMessageDataFromNativeWKScriptMessage(
|
||||||
WKScriptMessage *message);
|
WKScriptMessage *message);
|
||||||
|
|
||||||
/**
|
/// Converts a WKNavigationType to an FWFWKNavigationType.
|
||||||
* Converts a WKNavigationType to an FWFWKNavigationType.
|
///
|
||||||
*
|
/// @param type The object containing information to create a FWFWKNavigationType
|
||||||
* @param type The object containing information to create a FWFWKNavigationType
|
///
|
||||||
*
|
/// @return A FWFWKNavigationType.
|
||||||
* @return A FWFWKNavigationType.
|
|
||||||
*/
|
|
||||||
extern FWFWKNavigationType FWFWKNavigationTypeFromNativeWKNavigationType(WKNavigationType type);
|
extern FWFWKNavigationType FWFWKNavigationTypeFromNativeWKNavigationType(WKNavigationType type);
|
||||||
|
|
||||||
/**
|
/// Converts a WKSecurityOrigin to an FWFWKSecurityOriginData.
|
||||||
* Converts a WKSecurityOrigin to an FWFWKSecurityOriginData.
|
///
|
||||||
*
|
/// @param origin The object containing information to create an FWFWKSecurityOriginData.
|
||||||
* @param origin The object containing information to create an FWFWKSecurityOriginData.
|
///
|
||||||
*
|
/// @return An FWFWKSecurityOriginData.
|
||||||
* @return An FWFWKSecurityOriginData.
|
|
||||||
*/
|
|
||||||
extern FWFWKSecurityOriginData *FWFWKSecurityOriginDataFromNativeWKSecurityOrigin(
|
extern FWFWKSecurityOriginData *FWFWKSecurityOriginDataFromNativeWKSecurityOrigin(
|
||||||
WKSecurityOrigin *origin);
|
WKSecurityOrigin *origin);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFWKPermissionDecisionData to a WKPermissionDecision.
|
||||||
* Converts an FWFWKPermissionDecisionData to a WKPermissionDecision.
|
///
|
||||||
*
|
/// @param data The data object containing information to create a WKPermissionDecision.
|
||||||
* @param data The data object containing information to create a WKPermissionDecision.
|
///
|
||||||
*
|
/// @return A WKPermissionDecision or -1 if data could not be converted.
|
||||||
* @return A WKPermissionDecision or -1 if data could not be converted.
|
|
||||||
*/
|
|
||||||
API_AVAILABLE(ios(15.0))
|
API_AVAILABLE(ios(15.0))
|
||||||
extern WKPermissionDecision FWFNativeWKPermissionDecisionFromData(
|
extern WKPermissionDecision FWFNativeWKPermissionDecisionFromData(
|
||||||
FWFWKPermissionDecisionData *data);
|
FWFWKPermissionDecisionData *data);
|
||||||
|
|
||||||
/**
|
/// Converts an WKMediaCaptureType to a FWFWKMediaCaptureTypeData.
|
||||||
* Converts an WKMediaCaptureType to a FWFWKMediaCaptureTypeData.
|
///
|
||||||
*
|
/// @param type The data object containing information to create a FWFWKMediaCaptureTypeData.
|
||||||
* @param type The data object containing information to create a FWFWKMediaCaptureTypeData.
|
///
|
||||||
*
|
/// @return A FWFWKMediaCaptureTypeData or nil if data could not be converted.
|
||||||
* @return A FWFWKMediaCaptureTypeData or nil if data could not be converted.
|
|
||||||
*/
|
|
||||||
API_AVAILABLE(ios(15.0))
|
API_AVAILABLE(ios(15.0))
|
||||||
extern FWFWKMediaCaptureTypeData *FWFWKMediaCaptureTypeDataFromNativeWKMediaCaptureType(
|
extern FWFWKMediaCaptureTypeData *FWFWKMediaCaptureTypeDataFromNativeWKMediaCaptureType(
|
||||||
WKMediaCaptureType type);
|
WKMediaCaptureType type);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFNSUrlSessionAuthChallengeDisposition to an NSURLSessionAuthChallengeDisposition.
|
||||||
* Converts an FWFNSUrlSessionAuthChallengeDisposition to an NSURLSessionAuthChallengeDisposition.
|
///
|
||||||
*
|
/// @param value The object containing information to create an
|
||||||
* @param value The object containing information to create an NSURLSessionAuthChallengeDisposition.
|
/// NSURLSessionAuthChallengeDisposition.
|
||||||
*
|
///
|
||||||
* @return A NSURLSessionAuthChallengeDisposition or -1 if data could not be converted.
|
/// @return A NSURLSessionAuthChallengeDisposition or -1 if data could not be converted.
|
||||||
*/
|
|
||||||
extern NSURLSessionAuthChallengeDisposition
|
extern NSURLSessionAuthChallengeDisposition
|
||||||
FWFNativeNSURLSessionAuthChallengeDispositionFromFWFNSUrlSessionAuthChallengeDisposition(
|
FWFNativeNSURLSessionAuthChallengeDispositionFromFWFNSUrlSessionAuthChallengeDisposition(
|
||||||
FWFNSUrlSessionAuthChallengeDisposition value);
|
FWFNSUrlSessionAuthChallengeDisposition value);
|
||||||
|
|
||||||
/**
|
/// Converts an FWFNSUrlCredentialPersistence to an NSURLCredentialPersistence.
|
||||||
* Converts an FWFNSUrlCredentialPersistence to an NSURLCredentialPersistence.
|
///
|
||||||
*
|
/// @param value The object containing information to create an NSURLCredentialPersistence.
|
||||||
* @param value The object containing information to create an NSURLCredentialPersistence.
|
///
|
||||||
*
|
/// @return A NSURLCredentialPersistence or -1 if data could not be converted.
|
||||||
* @return A NSURLCredentialPersistence or -1 if data could not be converted.
|
|
||||||
*/
|
|
||||||
extern NSURLCredentialPersistence
|
extern NSURLCredentialPersistence
|
||||||
FWFNativeNSURLCredentialPersistenceFromFWFNSUrlCredentialPersistence(
|
FWFNativeNSURLCredentialPersistenceFromFWFNSUrlCredentialPersistence(
|
||||||
FWFNSUrlCredentialPersistence value);
|
FWFNSUrlCredentialPersistence value);
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Host api implementation for WKHTTPCookieStore.
|
||||||
* Host api implementation for WKHTTPCookieStore.
|
///
|
||||||
*
|
/// Handles creating WKHTTPCookieStore that intercommunicate with a paired Dart object.
|
||||||
* Handles creating WKHTTPCookieStore that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFHTTPCookieStoreHostApiImpl : NSObject <FWFWKHttpCookieStoreHostApi>
|
@interface FWFHTTPCookieStoreHostApiImpl : NSObject <FWFWKHttpCookieStoreHostApi>
|
||||||
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
@ -8,89 +8,76 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
typedef void (^FWFOnDeallocCallback)(long identifier);
|
typedef void (^FWFOnDeallocCallback)(long identifier);
|
||||||
|
|
||||||
/**
|
/// Maintains instances used to communicate with the corresponding objects in Dart.
|
||||||
* Maintains instances used to communicate with the corresponding objects in Dart.
|
///
|
||||||
*
|
/// When an instance is added with an identifier, either can be used to retrieve the other.
|
||||||
* When an instance is added with an identifier, either can be used to retrieve the other.
|
///
|
||||||
*
|
/// Added instances are added as a weak reference and a strong reference. When the strong reference
|
||||||
* Added instances are added as a weak reference and a strong reference. When the strong reference
|
/// is removed with `removeStrongReferenceWithIdentifier:` and the weak reference is deallocated,
|
||||||
* is removed with `removeStrongReferenceWithIdentifier:` and the weak reference is deallocated,
|
/// the `deallocCallback` is made with the instance's identifier. However, if the strong reference
|
||||||
* the `deallocCallback` is made with the instance's identifier. However, if the strong reference is
|
/// is removed and then the identifier is retrieved with the intention to pass the identifier to
|
||||||
* removed and then the identifier is retrieved with the intention to pass the identifier to Dart
|
/// Dart (e.g. calling `identifierForInstance:identifierWillBePassedToFlutter:` with
|
||||||
* (e.g. calling `identifierForInstance:identifierWillBePassedToFlutter:` with
|
/// `identifierWillBePassedToFlutter` set to YES), the strong reference to the instance is
|
||||||
* `identifierWillBePassedToFlutter` set to YES), the strong reference to the instance is recreated.
|
/// recreated. The strong reference will then need to be removed manually again.
|
||||||
* The strong reference will then need to be removed manually again.
|
///
|
||||||
*
|
/// Accessing and inserting to an InstanceManager is thread safe.
|
||||||
* Accessing and inserting to an InstanceManager is thread safe.
|
|
||||||
*/
|
|
||||||
@interface FWFInstanceManager : NSObject
|
@interface FWFInstanceManager : NSObject
|
||||||
@property(readonly) FWFOnDeallocCallback deallocCallback;
|
@property(readonly) FWFOnDeallocCallback deallocCallback;
|
||||||
- (instancetype)initWithDeallocCallback:(FWFOnDeallocCallback)callback;
|
- (instancetype)initWithDeallocCallback:(FWFOnDeallocCallback)callback;
|
||||||
|
|
||||||
// TODO(bparrishMines): Pairs should not be able to be overwritten and this feature
|
// TODO(bparrishMines): Pairs should not be able to be overwritten and this feature
|
||||||
// should be replaced with a call to clear the manager in the event of a hot restart.
|
// should be replaced with a call to clear the manager in the event of a hot restart.
|
||||||
/**
|
/// Adds a new instance that was instantiated from Dart.
|
||||||
* Adds a new instance that was instantiated from Dart.
|
///
|
||||||
*
|
/// If an instance or identifier has already been added, it will be replaced by the new values. The
|
||||||
* If an instance or identifier has already been added, it will be replaced by the new values. The
|
/// Dart InstanceManager is considered the source of truth and has the capability to overwrite
|
||||||
* Dart InstanceManager is considered the source of truth and has the capability to overwrite stored
|
/// stored pairs in response to hot restarts.
|
||||||
* pairs in response to hot restarts.
|
///
|
||||||
*
|
/// @param instance The instance to be stored.
|
||||||
* @param instance The instance to be stored.
|
/// @param instanceIdentifier The identifier to be paired with instance. This value must be >= 0.
|
||||||
* @param instanceIdentifier The identifier to be paired with instance. This value must be >= 0.
|
|
||||||
*/
|
|
||||||
- (void)addDartCreatedInstance:(NSObject *)instance withIdentifier:(long)instanceIdentifier;
|
- (void)addDartCreatedInstance:(NSObject *)instance withIdentifier:(long)instanceIdentifier;
|
||||||
|
|
||||||
/**
|
/// Adds a new instance that was instantiated from the host platform.
|
||||||
* Adds a new instance that was instantiated from the host platform.
|
///
|
||||||
*
|
/// @param instance The instance to be stored.
|
||||||
* @param instance The instance to be stored.
|
/// @return The unique identifier stored with instance.
|
||||||
* @return The unique identifier stored with instance.
|
|
||||||
*/
|
|
||||||
- (long)addHostCreatedInstance:(nonnull NSObject *)instance;
|
- (long)addHostCreatedInstance:(nonnull NSObject *)instance;
|
||||||
|
|
||||||
/**
|
/// Removes `instanceIdentifier` and its associated strongly referenced instance, if present, from
|
||||||
* Removes `instanceIdentifier` and its associated strongly referenced instance, if present, from
|
/// the manager.
|
||||||
* the manager.
|
///
|
||||||
*
|
/// @param instanceIdentifier The identifier paired to an instance.
|
||||||
* @param instanceIdentifier The identifier paired to an instance.
|
///
|
||||||
*
|
/// @return The removed instance if the manager contains the given instanceIdentifier, otherwise
|
||||||
* @return The removed instance if the manager contains the given instanceIdentifier, otherwise
|
/// nil.
|
||||||
* nil.
|
|
||||||
*/
|
|
||||||
- (nullable NSObject *)removeInstanceWithIdentifier:(long)instanceIdentifier;
|
- (nullable NSObject *)removeInstanceWithIdentifier:(long)instanceIdentifier;
|
||||||
|
|
||||||
/**
|
/// Retrieves the instance associated with identifier.
|
||||||
* Retrieves the instance associated with identifier.
|
///
|
||||||
*
|
/// @param instanceIdentifier The identifier paired to an instance.
|
||||||
* @param instanceIdentifier The identifier paired to an instance.
|
///
|
||||||
*
|
/// @return The instance associated with `instanceIdentifier` if the manager contains the value,
|
||||||
* @return The instance associated with `instanceIdentifier` if the manager contains the value,
|
/// otherwise nil.
|
||||||
* otherwise nil.
|
|
||||||
*/
|
|
||||||
- (nullable NSObject *)instanceForIdentifier:(long)instanceIdentifier;
|
- (nullable NSObject *)instanceForIdentifier:(long)instanceIdentifier;
|
||||||
|
|
||||||
/**
|
/// Retrieves the identifier paired with an instance.
|
||||||
* Retrieves the identifier paired with an instance.
|
///
|
||||||
*
|
/// If the manager contains `instance`, as a strong or weak reference, the strong reference to
|
||||||
* If the manager contains `instance`, as a strong or weak reference, the strong reference to
|
/// `instance` will be recreated and will need to be removed again with
|
||||||
* `instance` will be recreated and will need to be removed again with
|
/// `removeInstanceWithIdentifier:`.
|
||||||
* `removeInstanceWithIdentifier:`.
|
///
|
||||||
*
|
/// This method also expects the Dart `InstanceManager` to have, or recreate, a weak reference to
|
||||||
* This method also expects the Dart `InstanceManager` to have, or recreate, a weak reference to the
|
/// the instance the identifier is associated with once it receives it.
|
||||||
* instance the identifier is associated with once it receives it.
|
///
|
||||||
*
|
/// @param instance An instance that may be stored in the manager.
|
||||||
* @param instance An instance that may be stored in the manager.
|
///
|
||||||
*
|
/// @return The identifier associated with `instance` if the manager contains the value, otherwise
|
||||||
* @return The identifier associated with `instance` if the manager contains the value, otherwise
|
/// NSNotFound.
|
||||||
* NSNotFound.
|
|
||||||
*/
|
|
||||||
- (long)identifierWithStrongReferenceForInstance:(nonnull NSObject *)instance;
|
- (long)identifierWithStrongReferenceForInstance:(nonnull NSObject *)instance;
|
||||||
|
|
||||||
/**
|
/// Returns whether this manager contains the given `instance`.
|
||||||
* Returns whether this manager contains the given `instance`.
|
///
|
||||||
*
|
/// @return Whether this manager contains the given `instance`.
|
||||||
* @return Whether this manager contains the given `instance`.
|
|
||||||
*/
|
|
||||||
- (BOOL)containsInstance:(nonnull NSObject *)instance;
|
- (BOOL)containsInstance:(nonnull NSObject *)instance;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -7,24 +7,18 @@
|
|||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface FWFInstanceManager ()
|
@interface FWFInstanceManager ()
|
||||||
/**
|
/// The next identifier that will be used for a host-created instance.
|
||||||
* The next identifier that will be used for a host-created instance.
|
|
||||||
*/
|
|
||||||
@property long nextIdentifier;
|
@property long nextIdentifier;
|
||||||
|
|
||||||
/**
|
/// The number of instances stored as a strong reference.
|
||||||
* The number of instances stored as a strong reference.
|
///
|
||||||
*
|
/// Added for debugging purposes.
|
||||||
* Added for debugging purposes.
|
|
||||||
*/
|
|
||||||
- (NSUInteger)strongInstanceCount;
|
- (NSUInteger)strongInstanceCount;
|
||||||
|
|
||||||
/**
|
/// The number of instances stored as a weak reference.
|
||||||
* The number of instances stored as a weak reference.
|
///
|
||||||
*
|
/// Added for debugging purposes. NSMapTables that store keys or objects as weak reference will be
|
||||||
* Added for debugging purposes. NSMapTables that store keys or objects as weak reference will be
|
/// reclaimed nondeterministically.
|
||||||
* reclaimed nondeterministically.
|
|
||||||
*/
|
|
||||||
- (NSUInteger)weakInstanceCount;
|
- (NSUInteger)weakInstanceCount;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -12,19 +12,15 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Flutter api implementation for WKNavigationDelegate.
|
||||||
* Flutter api implementation for WKNavigationDelegate.
|
///
|
||||||
*
|
/// Handles making callbacks to Dart for a WKNavigationDelegate.
|
||||||
* Handles making callbacks to Dart for a WKNavigationDelegate.
|
|
||||||
*/
|
|
||||||
@interface FWFNavigationDelegateFlutterApiImpl : FWFWKNavigationDelegateFlutterApi
|
@interface FWFNavigationDelegateFlutterApiImpl : FWFWKNavigationDelegateFlutterApi
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Implementation of WKNavigationDelegate for FWFNavigationDelegateHostApiImpl.
|
||||||
* Implementation of WKNavigationDelegate for FWFNavigationDelegateHostApiImpl.
|
|
||||||
*/
|
|
||||||
@interface FWFNavigationDelegate : FWFObject <WKNavigationDelegate>
|
@interface FWFNavigationDelegate : FWFObject <WKNavigationDelegate>
|
||||||
@property(readonly, nonnull, nonatomic) FWFNavigationDelegateFlutterApiImpl *navigationDelegateAPI;
|
@property(readonly, nonnull, nonatomic) FWFNavigationDelegateFlutterApiImpl *navigationDelegateAPI;
|
||||||
|
|
||||||
@ -32,11 +28,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Host api implementation for WKNavigationDelegate.
|
||||||
* Host api implementation for WKNavigationDelegate.
|
///
|
||||||
*
|
/// Handles creating WKNavigationDelegate that intercommunicate with a paired Dart object.
|
||||||
* Handles creating WKNavigationDelegate that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFNavigationDelegateHostApiImpl : NSObject <FWFWKNavigationDelegateHostApi>
|
@interface FWFNavigationDelegateHostApiImpl : NSObject <FWFWKNavigationDelegateHostApi>
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
|
@ -9,11 +9,9 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Flutter api implementation for NSObject.
|
||||||
* Flutter api implementation for NSObject.
|
///
|
||||||
*
|
/// Handles making callbacks to Dart for an NSObject.
|
||||||
* Handles making callbacks to Dart for an NSObject.
|
|
||||||
*/
|
|
||||||
@interface FWFObjectFlutterApiImpl : FWFNSObjectFlutterApi
|
@interface FWFObjectFlutterApiImpl : FWFNSObjectFlutterApi
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@ -25,9 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
completion:(void (^)(FlutterError *_Nullable))completion;
|
completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Implementation of NSObject for FWFObjectHostApiImpl.
|
||||||
* Implementation of NSObject for FWFObjectHostApiImpl.
|
|
||||||
*/
|
|
||||||
@interface FWFObject : NSObject
|
@interface FWFObject : NSObject
|
||||||
@property(readonly, nonnull, nonatomic) FWFObjectFlutterApiImpl *objectApi;
|
@property(readonly, nonnull, nonatomic) FWFObjectFlutterApiImpl *objectApi;
|
||||||
|
|
||||||
@ -35,11 +31,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Host api implementation for NSObject.
|
||||||
* Host api implementation for NSObject.
|
///
|
||||||
*
|
/// Handles creating NSObject that intercommunicate with a paired Dart object.
|
||||||
* Handles creating NSObject that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFObjectHostApiImpl : NSObject <FWFNSObjectHostApi>
|
@interface FWFObjectHostApiImpl : NSObject <FWFNSObjectHostApi>
|
||||||
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Host api implementation for WKPreferences.
|
||||||
* Host api implementation for WKPreferences.
|
///
|
||||||
*
|
/// Handles creating WKPreferences that intercommunicate with a paired Dart object.
|
||||||
* Handles creating WKPreferences that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFPreferencesHostApiImpl : NSObject <FWFWKPreferencesHostApi>
|
@interface FWFPreferencesHostApiImpl : NSObject <FWFWKPreferencesHostApi>
|
||||||
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
@ -11,19 +11,15 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Flutter api implementation for WKScriptMessageHandler.
|
||||||
* Flutter api implementation for WKScriptMessageHandler.
|
///
|
||||||
*
|
/// Handles making callbacks to Dart for a WKScriptMessageHandler.
|
||||||
* Handles making callbacks to Dart for a WKScriptMessageHandler.
|
|
||||||
*/
|
|
||||||
@interface FWFScriptMessageHandlerFlutterApiImpl : FWFWKScriptMessageHandlerFlutterApi
|
@interface FWFScriptMessageHandlerFlutterApiImpl : FWFWKScriptMessageHandlerFlutterApi
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Implementation of WKScriptMessageHandler for FWFScriptMessageHandlerHostApiImpl.
|
||||||
* Implementation of WKScriptMessageHandler for FWFScriptMessageHandlerHostApiImpl.
|
|
||||||
*/
|
|
||||||
@interface FWFScriptMessageHandler : FWFObject <WKScriptMessageHandler>
|
@interface FWFScriptMessageHandler : FWFObject <WKScriptMessageHandler>
|
||||||
@property(readonly, nonnull, nonatomic)
|
@property(readonly, nonnull, nonatomic)
|
||||||
FWFScriptMessageHandlerFlutterApiImpl *scriptMessageHandlerAPI;
|
FWFScriptMessageHandlerFlutterApiImpl *scriptMessageHandlerAPI;
|
||||||
@ -32,11 +28,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Host api implementation for WKScriptMessageHandler.
|
||||||
* Host api implementation for WKScriptMessageHandler.
|
///
|
||||||
*
|
/// Handles creating WKScriptMessageHandler that intercommunicate with a paired Dart object.
|
||||||
* Handles creating WKScriptMessageHandler that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFScriptMessageHandlerHostApiImpl : NSObject <FWFWKScriptMessageHandlerHostApi>
|
@interface FWFScriptMessageHandlerHostApiImpl : NSObject <FWFWKScriptMessageHandlerHostApi>
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
|
@ -11,20 +11,16 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Flutter api implementation for UIScrollViewDelegate.
|
||||||
* Flutter api implementation for UIScrollViewDelegate.
|
///
|
||||||
*
|
/// Handles making callbacks to Dart for a UIScrollViewDelegate.
|
||||||
* Handles making callbacks to Dart for a UIScrollViewDelegate.
|
|
||||||
*/
|
|
||||||
@interface FWFScrollViewDelegateFlutterApiImpl : FWFUIScrollViewDelegateFlutterApi
|
@interface FWFScrollViewDelegateFlutterApiImpl : FWFUIScrollViewDelegateFlutterApi
|
||||||
|
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Implementation of WKUIScrollViewDelegate for FWFUIScrollViewDelegateHostApiImpl.
|
||||||
* Implementation of WKUIScrollViewDelegate for FWFUIScrollViewDelegateHostApiImpl.
|
|
||||||
*/
|
|
||||||
@interface FWFScrollViewDelegate : FWFObject <UIScrollViewDelegate>
|
@interface FWFScrollViewDelegate : FWFObject <UIScrollViewDelegate>
|
||||||
@property(readonly, nonnull, nonatomic) FWFScrollViewDelegateFlutterApiImpl *scrollViewDelegateAPI;
|
@property(readonly, nonnull, nonatomic) FWFScrollViewDelegateFlutterApiImpl *scrollViewDelegateAPI;
|
||||||
|
|
||||||
@ -33,11 +29,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Host api implementation for UIScrollViewDelegate.
|
||||||
* Host api implementation for UIScrollViewDelegate.
|
///
|
||||||
*
|
/// Handles creating UIScrollView that intercommunicate with a paired Dart object.
|
||||||
* Handles creating UIScrollView that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFScrollViewDelegateHostApiImpl : NSObject <FWFUIScrollViewDelegateHostApi>
|
@interface FWFScrollViewDelegateHostApiImpl : NSObject <FWFUIScrollViewDelegateHostApi>
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Host api implementation for UIScrollView.
|
||||||
* Host api implementation for UIScrollView.
|
///
|
||||||
*
|
/// Handles creating UIScrollView that intercommunicate with a paired Dart object.
|
||||||
* Handles creating UIScrollView that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFScrollViewHostApiImpl : NSObject <FWFUIScrollViewHostApi>
|
@interface FWFScrollViewHostApiImpl : NSObject <FWFUIScrollViewHostApi>
|
||||||
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
@ -12,11 +12,9 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Flutter api implementation for WKUIDelegate.
|
||||||
* Flutter api implementation for WKUIDelegate.
|
///
|
||||||
*
|
/// Handles making callbacks to Dart for a WKUIDelegate.
|
||||||
* Handles making callbacks to Dart for a WKUIDelegate.
|
|
||||||
*/
|
|
||||||
@interface FWFUIDelegateFlutterApiImpl : FWFWKUIDelegateFlutterApi
|
@interface FWFUIDelegateFlutterApiImpl : FWFWKUIDelegateFlutterApi
|
||||||
@property(readonly, nonatomic)
|
@property(readonly, nonatomic)
|
||||||
FWFWebViewConfigurationFlutterApiImpl *webViewConfigurationFlutterApi;
|
FWFWebViewConfigurationFlutterApiImpl *webViewConfigurationFlutterApi;
|
||||||
@ -25,9 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Implementation of WKUIDelegate for FWFUIDelegateHostApiImpl.
|
||||||
* Implementation of WKUIDelegate for FWFUIDelegateHostApiImpl.
|
|
||||||
*/
|
|
||||||
@interface FWFUIDelegate : FWFObject <WKUIDelegate>
|
@interface FWFUIDelegate : FWFObject <WKUIDelegate>
|
||||||
@property(readonly, nonnull, nonatomic) FWFUIDelegateFlutterApiImpl *UIDelegateAPI;
|
@property(readonly, nonnull, nonatomic) FWFUIDelegateFlutterApiImpl *UIDelegateAPI;
|
||||||
|
|
||||||
@ -35,11 +31,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Host api implementation for WKUIDelegate.
|
||||||
* Host api implementation for WKUIDelegate.
|
///
|
||||||
*
|
/// Handles creating WKUIDelegate that intercommunicate with a paired Dart object.
|
||||||
* Handles creating WKUIDelegate that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFUIDelegateHostApiImpl : NSObject <FWFWKUIDelegateHostApi>
|
@interface FWFUIDelegateHostApiImpl : NSObject <FWFWKUIDelegateHostApi>
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
|
@ -9,11 +9,9 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Host api implementation for UIView.
|
||||||
* Host api implementation for UIView.
|
///
|
||||||
*
|
/// Handles creating UIView that intercommunicate with a paired Dart object.
|
||||||
* Handles creating UIView that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFUIViewHostApiImpl : NSObject <FWFUIViewHostApi>
|
@interface FWFUIViewHostApiImpl : NSObject <FWFUIViewHostApi>
|
||||||
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
@ -9,22 +9,16 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Flutter API implementation for `NSURLAuthenticationChallenge`.
|
||||||
* Flutter API implementation for `NSURLAuthenticationChallenge`.
|
///
|
||||||
*
|
/// This class may handle instantiating and adding Dart instances that are attached to a native
|
||||||
* This class may handle instantiating and adding Dart instances that are attached to a native
|
/// instance or sending callback methods from an overridden native class.
|
||||||
* instance or sending callback methods from an overridden native class.
|
|
||||||
*/
|
|
||||||
@interface FWFURLAuthenticationChallengeFlutterApiImpl : NSObject
|
@interface FWFURLAuthenticationChallengeFlutterApiImpl : NSObject
|
||||||
/**
|
/// The Flutter API used to send messages back to Dart.
|
||||||
* The Flutter API used to send messages back to Dart.
|
|
||||||
*/
|
|
||||||
@property FWFNSUrlAuthenticationChallengeFlutterApi *api;
|
@property FWFNSUrlAuthenticationChallengeFlutterApi *api;
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
/**
|
/// Sends a message to Dart to create a new Dart instance and add it to the `InstanceManager`.
|
||||||
* Sends a message to Dart to create a new Dart instance and add it to the `InstanceManager`.
|
|
||||||
*/
|
|
||||||
- (void)createWithInstance:(NSURLAuthenticationChallenge *)instance
|
- (void)createWithInstance:(NSURLAuthenticationChallenge *)instance
|
||||||
protectionSpace:(NSURLProtectionSpace *)protectionSpace
|
protectionSpace:(NSURLProtectionSpace *)protectionSpace
|
||||||
completion:(void (^)(FlutterError *_Nullable))completion;
|
completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
|
@ -10,12 +10,10 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Host API implementation for `NSURLCredential`.
|
||||||
* Host API implementation for `NSURLCredential`.
|
///
|
||||||
*
|
/// This class may handle instantiating and adding native object instances that are attached to a
|
||||||
* This class may handle instantiating and adding native object instances that are attached to a
|
/// Dart instance or method calls on the associated native class or an instance of the class.
|
||||||
* Dart instance or method calls on the associated native class or an instance of the class.
|
|
||||||
*/
|
|
||||||
@interface FWFURLCredentialHostApiImpl : NSObject <FWFNSUrlCredentialHostApi>
|
@interface FWFURLCredentialHostApiImpl : NSObject <FWFNSUrlCredentialHostApi>
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
|
@ -9,33 +9,26 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Host API implementation for `NSURL`.
|
||||||
* Host API implementation for `NSURL`.
|
///
|
||||||
*
|
/// This class may handle instantiating and adding native object instances that are attached to a
|
||||||
* This class may handle instantiating and adding native object instances that are attached to a
|
/// Dart instance or method calls on the associated native class or an instance of the class.
|
||||||
* Dart instance or method calls on the associated native class or an instance of the class.
|
|
||||||
*/
|
|
||||||
@interface FWFURLHostApiImpl : NSObject <FWFNSUrlHostApi>
|
@interface FWFURLHostApiImpl : NSObject <FWFNSUrlHostApi>
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Flutter API implementation for `NSURL`.
|
||||||
* Flutter API implementation for `NSURL`.
|
///
|
||||||
*
|
/// This class may handle instantiating and adding Dart instances that are attached to a native
|
||||||
* This class may handle instantiating and adding Dart instances that are attached to a native
|
/// instance or sending callback methods from an overridden native class.
|
||||||
* instance or sending callback methods from an overridden native class.
|
|
||||||
*/
|
|
||||||
@interface FWFURLFlutterApiImpl : NSObject
|
@interface FWFURLFlutterApiImpl : NSObject
|
||||||
/**
|
/// The Flutter API used to send messages back to Dart.
|
||||||
* The Flutter API used to send messages back to Dart.
|
|
||||||
*/
|
|
||||||
@property FWFNSUrlFlutterApi *api;
|
@property FWFNSUrlFlutterApi *api;
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
/**
|
|
||||||
* Sends a message to Dart to create a new Dart instance and add it to the `InstanceManager`.
|
/// Sends a message to Dart to create a new Dart instance and add it to the `InstanceManager`.
|
||||||
*/
|
|
||||||
- (void)create:(NSURL *)instance completion:(void (^)(FlutterError *_Nullable))completion;
|
- (void)create:(NSURL *)instance completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -9,22 +9,16 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Flutter API implementation for `NSURLProtectionSpace`.
|
||||||
* Flutter API implementation for `NSURLProtectionSpace`.
|
///
|
||||||
*
|
/// This class may handle instantiating and adding Dart instances that are attached to a native
|
||||||
* This class may handle instantiating and adding Dart instances that are attached to a native
|
/// instance or sending callback methods from an overridden native class.
|
||||||
* instance or sending callback methods from an overridden native class.
|
|
||||||
*/
|
|
||||||
@interface FWFURLProtectionSpaceFlutterApiImpl : NSObject
|
@interface FWFURLProtectionSpaceFlutterApiImpl : NSObject
|
||||||
/**
|
/// The Flutter API used to send messages back to Dart.
|
||||||
* The Flutter API used to send messages back to Dart.
|
|
||||||
*/
|
|
||||||
@property FWFNSUrlProtectionSpaceFlutterApi *api;
|
@property FWFNSUrlProtectionSpaceFlutterApi *api;
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
/**
|
/// Sends a message to Dart to create a new Dart instance and add it to the `InstanceManager`.
|
||||||
* Sends a message to Dart to create a new Dart instance and add it to the `InstanceManager`.
|
|
||||||
*/
|
|
||||||
- (void)createWithInstance:(NSURLProtectionSpace *)instance
|
- (void)createWithInstance:(NSURLProtectionSpace *)instance
|
||||||
host:(nullable NSString *)host
|
host:(nullable NSString *)host
|
||||||
realm:(nullable NSString *)realm
|
realm:(nullable NSString *)realm
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Host api implementation for WKUserContentController.
|
||||||
* Host api implementation for WKUserContentController.
|
///
|
||||||
*
|
/// Handles creating WKUserContentController that intercommunicate with a paired Dart object.
|
||||||
* Handles creating WKUserContentController that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFUserContentControllerHostApiImpl : NSObject <FWFWKUserContentControllerHostApi>
|
@interface FWFUserContentControllerHostApiImpl : NSObject <FWFWKUserContentControllerHostApi>
|
||||||
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
@ -11,11 +11,9 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Flutter api implementation for WKWebViewConfiguration.
|
||||||
* Flutter api implementation for WKWebViewConfiguration.
|
///
|
||||||
*
|
/// Handles making callbacks to Dart for a WKWebViewConfiguration.
|
||||||
* Handles making callbacks to Dart for a WKWebViewConfiguration.
|
|
||||||
*/
|
|
||||||
@interface FWFWebViewConfigurationFlutterApiImpl : FWFWKWebViewConfigurationFlutterApi
|
@interface FWFWebViewConfigurationFlutterApiImpl : FWFWKWebViewConfigurationFlutterApi
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@ -24,9 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
completion:(void (^)(FlutterError *_Nullable))completion;
|
completion:(void (^)(FlutterError *_Nullable))completion;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Implementation of WKWebViewConfiguration for FWFWebViewConfigurationHostApiImpl.
|
||||||
* Implementation of WKWebViewConfiguration for FWFWebViewConfigurationHostApiImpl.
|
|
||||||
*/
|
|
||||||
@interface FWFWebViewConfiguration : WKWebViewConfiguration
|
@interface FWFWebViewConfiguration : WKWebViewConfiguration
|
||||||
@property(readonly, nonnull, nonatomic) FWFObjectFlutterApiImpl *objectApi;
|
@property(readonly, nonnull, nonatomic) FWFObjectFlutterApiImpl *objectApi;
|
||||||
|
|
||||||
@ -34,11 +30,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Host api implementation for WKWebViewConfiguration.
|
||||||
* Host api implementation for WKWebViewConfiguration.
|
///
|
||||||
*
|
/// Handles creating WKWebViewConfiguration that intercommunicate with a paired Dart object.
|
||||||
* Handles creating WKWebViewConfiguration that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFWebViewConfigurationHostApiImpl : NSObject <FWFWKWebViewConfigurationHostApi>
|
@interface FWFWebViewConfigurationHostApiImpl : NSObject <FWFWKWebViewConfigurationHostApi>
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
|
@ -8,28 +8,24 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// App and package facing native API provided by the `webview_flutter_wkwebview` plugin.
|
||||||
* App and package facing native API provided by the `webview_flutter_wkwebview` plugin.
|
///
|
||||||
*
|
/// This class follows the convention of breaking changes of the Dart API, which means that any
|
||||||
* This class follows the convention of breaking changes of the Dart API, which means that any
|
/// changes to the class that are not backwards compatible will only be made with a major version
|
||||||
* changes to the class that are not backwards compatible will only be made with a major version
|
/// change of the plugin. Native code other than this external API does not follow breaking change
|
||||||
* change of the plugin. Native code other than this external API does not follow breaking change
|
/// conventions, so app or plugin clients should not use any other native APIs.
|
||||||
* conventions, so app or plugin clients should not use any other native APIs.
|
|
||||||
*/
|
|
||||||
@interface FWFWebViewFlutterWKWebViewExternalAPI : NSObject
|
@interface FWFWebViewFlutterWKWebViewExternalAPI : NSObject
|
||||||
/**
|
/// Retrieves the `WKWebView` that is associated with `identifier`.
|
||||||
* Retrieves the `WKWebView` that is associated with `identifier`.
|
///
|
||||||
*
|
/// See the Dart method `WebKitWebViewController.webViewIdentifier` to get the identifier of an
|
||||||
* See the Dart method `WebKitWebViewController.webViewIdentifier` to get the identifier of an
|
/// underlying `WKWebView`.
|
||||||
* underlying `WKWebView`.
|
///
|
||||||
*
|
/// @param identifier The associated identifier of the `WebView`.
|
||||||
* @param identifier The associated identifier of the `WebView`.
|
/// @param registry The plugin registry the `FLTWebViewFlutterPlugin` should belong to. If
|
||||||
* @param registry The plugin registry the `FLTWebViewFlutterPlugin` should belong to. If
|
/// the registry doesn't contain an attached instance of `FLTWebViewFlutterPlugin`,
|
||||||
* the registry doesn't contain an attached instance of `FLTWebViewFlutterPlugin`,
|
/// this method returns nil.
|
||||||
* this method returns nil.
|
/// @return The `WKWebView` associated with `identifier` or nil if a `WKWebView` instance associated
|
||||||
* @return The `WKWebView` associated with `identifier` or nil if a `WKWebView` instance associated
|
/// with `identifier` could not be found.
|
||||||
* with `identifier` could not be found.
|
|
||||||
*/
|
|
||||||
+ (nullable WKWebView *)webViewForIdentifier:(long)identifier
|
+ (nullable WKWebView *)webViewForIdentifier:(long)identifier
|
||||||
withPluginRegistry:(id<FlutterPluginRegistry>)registry;
|
withPluginRegistry:(id<FlutterPluginRegistry>)registry;
|
||||||
@end
|
@end
|
||||||
|
@ -11,18 +11,14 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// A set of Flutter and Dart assets used by a `FlutterEngine` to initialize execution.
|
||||||
* A set of Flutter and Dart assets used by a `FlutterEngine` to initialize execution.
|
///
|
||||||
*
|
/// Default implementation delegates methods to FlutterDartProject.
|
||||||
* Default implementation delegates methods to FlutterDartProject.
|
|
||||||
*/
|
|
||||||
@interface FWFAssetManager : NSObject
|
@interface FWFAssetManager : NSObject
|
||||||
- (NSString *)lookupKeyForAsset:(NSString *)asset;
|
- (NSString *)lookupKeyForAsset:(NSString *)asset;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Implementation of WKWebView that can be used as a FlutterPlatformView.
|
||||||
* Implementation of WKWebView that can be used as a FlutterPlatformView.
|
|
||||||
*/
|
|
||||||
@interface FWFWebView : WKWebView <FlutterPlatformView>
|
@interface FWFWebView : WKWebView <FlutterPlatformView>
|
||||||
@property(readonly, nonnull, nonatomic) FWFObjectFlutterApiImpl *objectApi;
|
@property(readonly, nonnull, nonatomic) FWFObjectFlutterApiImpl *objectApi;
|
||||||
|
|
||||||
@ -32,11 +28,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/// Host api implementation for WKWebView.
|
||||||
* Host api implementation for WKWebView.
|
///
|
||||||
*
|
/// Handles creating WKWebViews that intercommunicate with a paired Dart object.
|
||||||
* Handles creating WKWebViews that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFWebViewHostApiImpl : NSObject <FWFWKWebViewHostApi>
|
@interface FWFWebViewHostApiImpl : NSObject <FWFWKWebViewHostApi>
|
||||||
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
|
||||||
instanceManager:(FWFInstanceManager *)instanceManager;
|
instanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/// Host api implementation for WKWebsiteDataStore.
|
||||||
* Host api implementation for WKWebsiteDataStore.
|
///
|
||||||
*
|
/// Handles creating WKWebsiteDataStore that intercommunicate with a paired Dart object.
|
||||||
* Handles creating WKWebsiteDataStore that intercommunicate with a paired Dart object.
|
|
||||||
*/
|
|
||||||
@interface FWFWebsiteDataStoreHostApiImpl : NSObject <FWFWKWebsiteDataStoreHostApi>
|
@interface FWFWebsiteDataStoreHostApiImpl : NSObject <FWFWKWebsiteDataStoreHostApi>
|
||||||
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
- (instancetype)initWithInstanceManager:(FWFInstanceManager *)instanceManager;
|
||||||
@end
|
@end
|
||||||
|
Reference in New Issue
Block a user