ios build
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>POSapp Joys</string>
|
||||
<string>POSapp Joys 2</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -8,6 +8,20 @@
|
||||
/**
|
||||
BREAKING CHANGES:
|
||||
|
||||
October 5, 2018:
|
||||
- Removed FlutterNavigationController.h/.mm
|
||||
- Changed return signature of `FlutterDartHeadlessCodeRunner.run*` from void
|
||||
to bool
|
||||
- Removed HeadlessPlatformViewIOS
|
||||
- Marked FlutterDartHeadlessCodeRunner deprecated
|
||||
|
||||
August 31, 2018: Marked -[FlutterDartProject
|
||||
initFromDefaultSourceForConfiguration] and FlutterStandardBigInteger as
|
||||
unavailable.
|
||||
|
||||
July 26, 2018: Marked -[FlutterDartProject
|
||||
initFromDefaultSourceForConfiguration] deprecated.
|
||||
|
||||
February 28, 2018: Removed "initWithFLXArchive" and
|
||||
"initWithFLXArchiveWithScriptSnapshot".
|
||||
|
||||
@@ -36,13 +50,16 @@
|
||||
|
||||
#include "FlutterAppDelegate.h"
|
||||
#include "FlutterBinaryMessenger.h"
|
||||
#include "FlutterCallbackCache.h"
|
||||
#include "FlutterChannels.h"
|
||||
#include "FlutterCodecs.h"
|
||||
#include "FlutterDartProject.h"
|
||||
#include "FlutterEngine.h"
|
||||
#include "FlutterHeadlessDartRunner.h"
|
||||
#include "FlutterMacros.h"
|
||||
#include "FlutterNavigationController.h"
|
||||
#include "FlutterPlatformViews.h"
|
||||
#include "FlutterPlugin.h"
|
||||
#include "FlutterPluginAppLifeCycleDelegate.h"
|
||||
#include "FlutterTexture.h"
|
||||
#include "FlutterViewController.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
#include "FlutterPlugin.h"
|
||||
|
||||
/**
|
||||
* UIApplicationDelegate subclass for simple apps that want default behavior.
|
||||
* `UIApplicationDelegate` subclass for simple apps that want default behavior.
|
||||
*
|
||||
* This class provides the following behaviors:
|
||||
* This class implements the following behaviors:
|
||||
* * Status bar touches are forwarded to the key window's root view
|
||||
* FlutterViewController, in order to trigger scroll to top.
|
||||
* `FlutterViewController`, in order to trigger scroll to top.
|
||||
* * Keeps the Flutter connection open in debug mode when the phone screen
|
||||
* locks.
|
||||
*
|
||||
@@ -24,22 +24,11 @@
|
||||
* code as necessary from FlutterAppDelegate.mm.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterAppDelegate : UIResponder<UIApplicationDelegate, FlutterPluginRegistry>
|
||||
@interface FlutterAppDelegate
|
||||
: UIResponder <UIApplicationDelegate, FlutterPluginRegistry, FlutterAppLifeCycleProvider>
|
||||
|
||||
@property(strong, nonatomic) UIWindow* window;
|
||||
|
||||
// Can be overriden by subclasses to provide a custom FlutterBinaryMessenger,
|
||||
// typically a FlutterViewController, for plugin interop.
|
||||
//
|
||||
// Defaults to window's rootViewController.
|
||||
- (NSObject<FlutterBinaryMessenger>*)binaryMessenger;
|
||||
|
||||
// Can be overriden by subclasses to provide a custom FlutterTextureRegistry,
|
||||
// typically a FlutterViewController, for plugin interop.
|
||||
//
|
||||
// Defaults to window's rootViewController.
|
||||
- (NSObject<FlutterTextureRegistry>*)textures;
|
||||
|
||||
@end
|
||||
|
||||
#endif // FLUTTER_FLUTTERDARTPROJECT_H_
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -11,72 +11,67 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
A message reply callback.
|
||||
|
||||
Used for submitting a binary reply back to a Flutter message sender. Also used
|
||||
in the dual capacity for handling a binary message reply received from Flutter.
|
||||
|
||||
- Parameters:
|
||||
- reply: The reply.
|
||||
* A message reply callback.
|
||||
*
|
||||
* Used for submitting a binary reply back to a Flutter message sender. Also used
|
||||
* in for handling a binary message reply received from Flutter.
|
||||
*
|
||||
* @param reply The reply.
|
||||
*/
|
||||
typedef void (^FlutterBinaryReply)(NSData* _Nullable reply);
|
||||
|
||||
/**
|
||||
A strategy for handling incoming binary messages from Flutter and to send
|
||||
asynchronous replies back to Flutter.
|
||||
|
||||
- Parameters:
|
||||
- message: The message.
|
||||
- reply: A callback for submitting a reply to the sender.
|
||||
* A strategy for handling incoming binary messages from Flutter and to send
|
||||
* asynchronous replies back to Flutter.
|
||||
*
|
||||
* @param message The message.
|
||||
* @param reply A callback for submitting an asynchronous reply to the sender.
|
||||
*/
|
||||
typedef void (^FlutterBinaryMessageHandler)(NSData* _Nullable message, FlutterBinaryReply reply);
|
||||
|
||||
/**
|
||||
A facility for communicating with the Flutter side using asynchronous message
|
||||
passing with binary messages.
|
||||
|
||||
- SeeAlso:
|
||||
- `FlutterBasicMessageChannel`, which supports communication using structured
|
||||
messages.
|
||||
- `FlutterMethodChannel`, which supports communication using asynchronous
|
||||
method calls.
|
||||
- `FlutterEventChannel`, which supports commuication using event streams.
|
||||
* A facility for communicating with the Flutter side using asynchronous message
|
||||
* passing with binary messages.
|
||||
*
|
||||
* Implementated by:
|
||||
* - `FlutterBasicMessageChannel`, which supports communication using structured
|
||||
* messages.
|
||||
* - `FlutterMethodChannel`, which supports communication using asynchronous
|
||||
* method calls.
|
||||
* - `FlutterEventChannel`, which supports commuication using event streams.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@protocol FlutterBinaryMessenger<NSObject>
|
||||
@protocol FlutterBinaryMessenger <NSObject>
|
||||
/**
|
||||
Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
no reply.
|
||||
|
||||
- Parameters:
|
||||
- channel: The channel name.
|
||||
- message: The message.
|
||||
* Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
* no reply.
|
||||
*
|
||||
* @param channel The channel name.
|
||||
* @param message The message.
|
||||
*/
|
||||
- (void)sendOnChannel:(NSString*)channel message:(NSData* _Nullable)message;
|
||||
|
||||
/**
|
||||
Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
an asynchronous reply.
|
||||
|
||||
- Parameters:
|
||||
- channel: The channel name.
|
||||
- message: The message.
|
||||
- callback: A callback for receiving a reply.
|
||||
* Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
* an asynchronous reply.
|
||||
*
|
||||
* @param channel The channel name.
|
||||
* @param message The message.
|
||||
* @param callback A callback for receiving a reply.
|
||||
*/
|
||||
- (void)sendOnChannel:(NSString*)channel
|
||||
message:(NSData* _Nullable)message
|
||||
binaryReply:(FlutterBinaryReply _Nullable)callback;
|
||||
|
||||
/**
|
||||
Registers a message handler for incoming binary messages from the Flutter side
|
||||
on the specified channel.
|
||||
|
||||
Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
existing handler.
|
||||
|
||||
- Parameters:
|
||||
- channel: The channel name.
|
||||
- handler: The message handler.
|
||||
* Registers a message handler for incoming binary messages from the Flutter side
|
||||
* on the specified channel.
|
||||
*
|
||||
* Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
* existing handler.
|
||||
*
|
||||
* @param channel The channel name.
|
||||
* @param handler The message handler.
|
||||
*/
|
||||
- (void)setMessageHandlerOnChannel:(NSString*)channel
|
||||
binaryMessageHandler:(FlutterBinaryMessageHandler _Nullable)handler;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -10,372 +10,359 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
A message reply callback.
|
||||
|
||||
Used for submitting a reply back to a Flutter message sender. Also used in
|
||||
the dual capacity for handling a message reply received from Flutter.
|
||||
|
||||
- Parameter reply: The reply.
|
||||
* A message reply callback.
|
||||
*
|
||||
* Used for submitting a reply back to a Flutter message sender. Also used in
|
||||
* the dual capacity for handling a message reply received from Flutter.
|
||||
*
|
||||
* @param reply The reply.
|
||||
*/
|
||||
typedef void (^FlutterReply)(id _Nullable reply);
|
||||
|
||||
/**
|
||||
A strategy for handling incoming messages from Flutter and to send
|
||||
asynchronous replies back to Flutter.
|
||||
|
||||
- Parameters:
|
||||
- message: The message.
|
||||
- reply: A callback for submitting a reply to the sender.
|
||||
* A strategy for handling incoming messages from Flutter and to send
|
||||
* asynchronous replies back to Flutter.
|
||||
*
|
||||
* @param message The message.
|
||||
* @param callback A callback for submitting a reply to the sender.
|
||||
*/
|
||||
typedef void (^FlutterMessageHandler)(id _Nullable message, FlutterReply callback);
|
||||
|
||||
/**
|
||||
A channel for communicating with the Flutter side using basic, asynchronous
|
||||
message passing.
|
||||
* A channel for communicating with the Flutter side using basic, asynchronous
|
||||
* message passing.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterBasicMessageChannel : NSObject
|
||||
/**
|
||||
Creates a `FlutterBasicMessageChannel` with the specified name and binary
|
||||
messenger.
|
||||
|
||||
The channel name logically identifies the channel; identically named channels
|
||||
interfere with each other's communication.
|
||||
|
||||
The binary messenger is a facility for sending raw, binary messages to the
|
||||
Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
|
||||
The channel uses `FlutterStandardMessageCodec` to encode and decode messages.
|
||||
|
||||
- Parameters:
|
||||
- name: The channel name.
|
||||
- messenger: The binary messenger.
|
||||
* Creates a `FlutterBasicMessageChannel` with the specified name and binary
|
||||
* messenger.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* The channel uses `FlutterStandardMessageCodec` to encode and decode messages.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
*/
|
||||
+ (instancetype)messageChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
|
||||
|
||||
/**
|
||||
Creates a `FlutterBasicMessageChannel` with the specified name, binary
|
||||
messenger,
|
||||
and message codec.
|
||||
|
||||
The channel name logically identifies the channel; identically named channels
|
||||
interfere with each other's communication.
|
||||
|
||||
The binary messenger is a facility for sending raw, binary messages to the
|
||||
Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
|
||||
- Parameters:
|
||||
- name: The channel name.
|
||||
- messenger: The binary messenger.
|
||||
- codec: The message codec.
|
||||
* Creates a `FlutterBasicMessageChannel` with the specified name, binary
|
||||
* messenger, and message codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The message codec.
|
||||
*/
|
||||
+ (instancetype)messageChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMessageCodec>*)codec;
|
||||
|
||||
/**
|
||||
Initializes a `FlutterBasicMessageChannel` with the specified name, binary
|
||||
messenger, and message codec.
|
||||
|
||||
The channel name logically identifies the channel; identically named channels
|
||||
interfere with each other's communication.
|
||||
|
||||
The binary messenger is a facility for sending raw, binary messages to the
|
||||
Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
|
||||
- Parameters:
|
||||
- name: The channel name.
|
||||
- messenger: The binary messenger.
|
||||
- codec: The message codec.
|
||||
* Initializes a `FlutterBasicMessageChannel` with the specified name, binary
|
||||
* messenger, and message codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The message codec.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMessageCodec>*)codec;
|
||||
|
||||
/**
|
||||
Sends the specified message to the Flutter side, ignoring any reply.
|
||||
|
||||
- Parameter message: The message. Must be supported by the codec of this
|
||||
channel.
|
||||
* Sends the specified message to the Flutter side, ignoring any reply.
|
||||
*
|
||||
* @param message The message. Must be supported by the codec of this
|
||||
* channel.
|
||||
*/
|
||||
- (void)sendMessage:(id _Nullable)message;
|
||||
|
||||
/**
|
||||
Sends the specified message to the Flutter side, expecting an asynchronous
|
||||
reply.
|
||||
|
||||
- Parameters:
|
||||
- message: The message. Must be supported by the codec of this channel.
|
||||
- callback: A callback to be invoked with the message reply from Flutter.
|
||||
* Sends the specified message to the Flutter side, expecting an asynchronous
|
||||
* reply.
|
||||
*
|
||||
* @param message The message. Must be supported by the codec of this channel.
|
||||
* @param callback A callback to be invoked with the message reply from Flutter.
|
||||
*/
|
||||
- (void)sendMessage:(id _Nullable)message reply:(FlutterReply _Nullable)callback;
|
||||
|
||||
/**
|
||||
Registers a message handler with this channel.
|
||||
|
||||
Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
existing handler.
|
||||
|
||||
- Parameter handler: The message handler.
|
||||
* Registers a message handler with this channel.
|
||||
*
|
||||
* Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
* existing handler.
|
||||
*
|
||||
* @param handler The message handler.
|
||||
*/
|
||||
- (void)setMessageHandler:(FlutterMessageHandler _Nullable)handler;
|
||||
@end
|
||||
|
||||
/**
|
||||
A method call result callback.
|
||||
|
||||
Used for submitting a method call result back to a Flutter caller. Also used in
|
||||
the dual capacity for handling a method call result received from Flutter.
|
||||
|
||||
- Parameter result: The result.
|
||||
* A method call result callback.
|
||||
*
|
||||
* Used for submitting a method call result back to a Flutter caller. Also used in
|
||||
* the dual capacity for handling a method call result received from Flutter.
|
||||
*
|
||||
* @param result The result.
|
||||
*/
|
||||
typedef void (^FlutterResult)(id _Nullable result);
|
||||
|
||||
/**
|
||||
A strategy for handling method calls.
|
||||
|
||||
- Parameters:
|
||||
- call: The incoming method call.
|
||||
- result: A callback to asynchronously submit the result of the call.
|
||||
Invoke the callback with a `FlutterError` to indicate that the call failed.
|
||||
Invoke the callback with `FlutterMethodNotImplemented` to indicate that the
|
||||
method was unknown. Any other values, including `nil`, are interpreted as
|
||||
successful results.
|
||||
* A strategy for handling method calls.
|
||||
*
|
||||
* @param call The incoming method call.
|
||||
* @param result A callback to asynchronously submit the result of the call.
|
||||
* Invoke the callback with a `FlutterError` to indicate that the call failed.
|
||||
* Invoke the callback with `FlutterMethodNotImplemented` to indicate that the
|
||||
* method was unknown. Any other values, including `nil`, are interpreted as
|
||||
* successful results.
|
||||
*/
|
||||
typedef void (^FlutterMethodCallHandler)(FlutterMethodCall* call, FlutterResult result);
|
||||
|
||||
/**
|
||||
A constant used with `FlutterMethodCallHandler` to respond to the call of an
|
||||
unknown method.
|
||||
* A constant used with `FlutterMethodCallHandler` to respond to the call of an
|
||||
* unknown method.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
extern NSObject const* FlutterMethodNotImplemented;
|
||||
|
||||
/**
|
||||
A channel for communicating with the Flutter side using invocation of
|
||||
asynchronous methods.
|
||||
* A channel for communicating with the Flutter side using invocation of
|
||||
* asynchronous methods.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterMethodChannel : NSObject
|
||||
/**
|
||||
Creates a `FlutterMethodChannel` with the specified name and binary messenger.
|
||||
|
||||
The channel name logically identifies the channel; identically named channels
|
||||
interfere with each other's communication.
|
||||
|
||||
The binary messenger is a facility for sending raw, binary messages to the
|
||||
Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
|
||||
The channel uses `FlutterStandardMethodCodec` to encode and decode method calls
|
||||
and result envelopes.
|
||||
|
||||
- Parameters:
|
||||
- name: The channel name.
|
||||
- messenger: The binary messenger.
|
||||
* Creates a `FlutterMethodChannel` with the specified name and binary messenger.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* The channel uses `FlutterStandardMethodCodec` to encode and decode method calls
|
||||
* and result envelopes.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
*/
|
||||
+ (instancetype)methodChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
|
||||
|
||||
/**
|
||||
Creates a `FlutterMethodChannel` with the specified name, binary messenger, and
|
||||
method codec.
|
||||
|
||||
The channel name logically identifies the channel; identically named channels
|
||||
interfere with each other's communication.
|
||||
|
||||
The binary messenger is a facility for sending raw, binary messages to the
|
||||
Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
|
||||
- Parameters:
|
||||
- name: The channel name.
|
||||
- messenger: The binary messenger.
|
||||
- codec: The method codec.
|
||||
* Creates a `FlutterMethodChannel` with the specified name, binary messenger, and
|
||||
* method codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
*/
|
||||
+ (instancetype)methodChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec;
|
||||
|
||||
/**
|
||||
Initializes a `FlutterMethodChannel` with the specified name, binary messenger,
|
||||
and method codec.
|
||||
|
||||
The channel name logically identifies the channel; identically named channels
|
||||
interfere with each other's communication.
|
||||
|
||||
The binary messenger is a facility for sending raw, binary messages to the
|
||||
Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
|
||||
- Parameters:
|
||||
- name: The channel name.
|
||||
- messenger: The binary messenger.
|
||||
- codec: The method codec.
|
||||
* Initializes a `FlutterMethodChannel` with the specified name, binary messenger,
|
||||
* and method codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec;
|
||||
|
||||
// clang-format off
|
||||
/**
|
||||
Invokes the specified Flutter method with the specified arguments, expecting
|
||||
no results.
|
||||
|
||||
- Parameters:
|
||||
- method: The name of the method to invoke.
|
||||
- arguments: The arguments. Must be a value supported by the codec of this
|
||||
channel.
|
||||
* Invokes the specified Flutter method with the specified arguments, expecting
|
||||
* no results.
|
||||
*
|
||||
* @see [MethodChannel.setMethodCallHandler](https://docs.flutter.io/flutter/services/MethodChannel/setMethodCallHandler.html)
|
||||
*
|
||||
* @param method The name of the method to invoke.
|
||||
* @param arguments The arguments. Must be a value supported by the codec of this
|
||||
* channel.
|
||||
*/
|
||||
// clang-format on
|
||||
- (void)invokeMethod:(NSString*)method arguments:(id _Nullable)arguments;
|
||||
|
||||
/**
|
||||
Invokes the specified Flutter method with the specified arguments, expecting
|
||||
an asynchronous result.
|
||||
|
||||
- Parameters:
|
||||
- method: The name of the method to invoke.
|
||||
- arguments: The arguments. Must be a value supported by the codec of this
|
||||
channel.
|
||||
- result: A callback that will be invoked with the asynchronous result.
|
||||
The result will be a `FlutterError` instance, if the method call resulted
|
||||
in an error on the Flutter side. Will be `FlutterMethodNotImplemented`, if
|
||||
the method called was not implemented on the Flutter side. Any other value,
|
||||
including `nil`, should be interpreted as successful results.
|
||||
* Invokes the specified Flutter method with the specified arguments, expecting
|
||||
* an asynchronous result.
|
||||
*
|
||||
* @param method The name of the method to invoke.
|
||||
* @param arguments The arguments. Must be a value supported by the codec of this
|
||||
* channel.
|
||||
* @param callback A callback that will be invoked with the asynchronous result.
|
||||
* The result will be a `FlutterError` instance, if the method call resulted
|
||||
* in an error on the Flutter side. Will be `FlutterMethodNotImplemented`, if
|
||||
* the method called was not implemented on the Flutter side. Any other value,
|
||||
* including `nil`, should be interpreted as successful results.
|
||||
*/
|
||||
- (void)invokeMethod:(NSString*)method
|
||||
arguments:(id _Nullable)arguments
|
||||
result:(FlutterResult _Nullable)callback;
|
||||
|
||||
/**
|
||||
Registers a handler for method calls from the Flutter side.
|
||||
|
||||
Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
existing handler.
|
||||
|
||||
- Parameter handler: The method call handler.
|
||||
* Registers a handler for method calls from the Flutter side.
|
||||
*
|
||||
* Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
* existing handler.
|
||||
*
|
||||
* @param handler The method call handler.
|
||||
*/
|
||||
- (void)setMethodCallHandler:(FlutterMethodCallHandler _Nullable)handler;
|
||||
@end
|
||||
|
||||
/**
|
||||
An event sink callback.
|
||||
|
||||
- Parameter event: The event.
|
||||
* An event sink callback.
|
||||
*
|
||||
* @param event The event.
|
||||
*/
|
||||
typedef void (^FlutterEventSink)(id _Nullable event);
|
||||
|
||||
/**
|
||||
A strategy for exposing an event stream to the Flutter side.
|
||||
* A strategy for exposing an event stream to the Flutter side.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@protocol FlutterStreamHandler
|
||||
/**
|
||||
Sets up an event stream and begin emitting events.
|
||||
|
||||
Invoked when the first listener is registered with the Stream associated to
|
||||
this channel on the Flutter side.
|
||||
|
||||
- Parameters:
|
||||
- arguments: Arguments for the stream.
|
||||
- events: A callback to asynchronously emit events. Invoke the
|
||||
callback with a `FlutterError` to emit an error event. Invoke the
|
||||
callback with `FlutterEndOfEventStream` to indicate that no more
|
||||
events will be emitted. Any other value, including `nil` are emitted as
|
||||
successful events.
|
||||
- Returns: A FlutterError instance, if setup fails.
|
||||
* Sets up an event stream and begin emitting events.
|
||||
*
|
||||
* Invoked when the first listener is registered with the Stream associated to
|
||||
* this channel on the Flutter side.
|
||||
*
|
||||
* @param arguments Arguments for the stream.
|
||||
* @param events A callback to asynchronously emit events. Invoke the
|
||||
* callback with a `FlutterError` to emit an error event. Invoke the
|
||||
* callback with `FlutterEndOfEventStream` to indicate that no more
|
||||
* events will be emitted. Any other value, including `nil` are emitted as
|
||||
* successful events.
|
||||
* @return A FlutterError instance, if setup fails.
|
||||
*/
|
||||
- (FlutterError* _Nullable)onListenWithArguments:(id _Nullable)arguments
|
||||
eventSink:(FlutterEventSink)events;
|
||||
|
||||
/**
|
||||
Tears down an event stream.
|
||||
|
||||
Invoked when the last listener is deregistered from the Stream associated to
|
||||
this channel on the Flutter side.
|
||||
|
||||
The channel implementation may call this method with `nil` arguments
|
||||
to separate a pair of two consecutive set up requests. Such request pairs
|
||||
may occur during Flutter hot restart.
|
||||
|
||||
- Parameter arguments: Arguments for the stream.
|
||||
- Returns: A FlutterError instance, if teardown fails.
|
||||
* Tears down an event stream.
|
||||
*
|
||||
* Invoked when the last listener is deregistered from the Stream associated to
|
||||
* this channel on the Flutter side.
|
||||
*
|
||||
* The channel implementation may call this method with `nil` arguments
|
||||
* to separate a pair of two consecutive set up requests. Such request pairs
|
||||
* may occur during Flutter hot restart.
|
||||
*
|
||||
* @param arguments Arguments for the stream.
|
||||
* @return A FlutterError instance, if teardown fails.
|
||||
*/
|
||||
- (FlutterError* _Nullable)onCancelWithArguments:(id _Nullable)arguments;
|
||||
@end
|
||||
|
||||
/**
|
||||
A constant used with `FlutterEventChannel` to indicate end of stream.
|
||||
* A constant used with `FlutterEventChannel` to indicate end of stream.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
extern NSObject const* FlutterEndOfEventStream;
|
||||
|
||||
/**
|
||||
A channel for communicating with the Flutter side using event streams.
|
||||
* A channel for communicating with the Flutter side using event streams.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterEventChannel : NSObject
|
||||
/**
|
||||
Creates a `FlutterEventChannel` with the specified name and binary messenger.
|
||||
|
||||
The channel name logically identifies the channel; identically named channels
|
||||
interfere with each other's communication.
|
||||
|
||||
The binary messenger is a facility for sending raw, binary messages to the
|
||||
Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
|
||||
The channel uses `FlutterStandardMethodCodec` to decode stream setup and
|
||||
teardown requests, and to encode event envelopes.
|
||||
|
||||
- Parameters:
|
||||
- name: The channel name.
|
||||
- messenger: The binary messenger.
|
||||
- codec: The method codec.
|
||||
* Creates a `FlutterEventChannel` with the specified name and binary messenger.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
*
|
||||
* The channel uses `FlutterStandardMethodCodec` to decode stream setup and
|
||||
* teardown requests, and to encode event envelopes.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
*/
|
||||
+ (instancetype)eventChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
|
||||
|
||||
/**
|
||||
Creates a `FlutterEventChannel` with the specified name, binary messenger,
|
||||
and method codec.
|
||||
|
||||
The channel name logically identifies the channel; identically named channels
|
||||
interfere with each other's communication.
|
||||
|
||||
The binary messenger is a facility for sending raw, binary messages to the
|
||||
Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
|
||||
- Parameters:
|
||||
- name: The channel name.
|
||||
- messenger: The binary messenger.
|
||||
- codec: The method codec.
|
||||
* Creates a `FlutterEventChannel` with the specified name, binary messenger,
|
||||
* and method codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
*/
|
||||
+ (instancetype)eventChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec;
|
||||
|
||||
/**
|
||||
Initializes a `FlutterEventChannel` with the specified name, binary messenger,
|
||||
and method codec.
|
||||
|
||||
The channel name logically identifies the channel; identically named channels
|
||||
interfere with each other's communication.
|
||||
|
||||
The binary messenger is a facility for sending raw, binary messages to the
|
||||
Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
|
||||
- Parameters:
|
||||
- name: The channel name.
|
||||
- messenger: The binary messenger.
|
||||
- codec: The method codec.
|
||||
* Initializes a `FlutterEventChannel` with the specified name, binary messenger,
|
||||
* and method codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec;
|
||||
/**
|
||||
Registers a handler for stream setup requests from the Flutter side.
|
||||
|
||||
Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
existing handler.
|
||||
|
||||
- Parameter handler: The stream handler.
|
||||
* Registers a handler for stream setup requests from the Flutter side.
|
||||
*
|
||||
* Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
* existing handler.
|
||||
*
|
||||
* @param handler The stream handler.
|
||||
*/
|
||||
- (void)setStreamHandler:(NSObject<FlutterStreamHandler>* _Nullable)handler;
|
||||
@end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -16,76 +16,76 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
FLUTTER_EXPORT
|
||||
@protocol FlutterMessageCodec
|
||||
/**
|
||||
Returns a shared instance of this `FlutterMessageCodec`.
|
||||
* Returns a shared instance of this `FlutterMessageCodec`.
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
Encodes the specified message into binary.
|
||||
|
||||
- Parameter message: The message.
|
||||
- Returns: The binary encoding, or `nil`, if `message` was `nil`.
|
||||
* Encodes the specified message into binary.
|
||||
*
|
||||
* @param message The message.
|
||||
* @return The binary encoding, or `nil`, if `message` was `nil`.
|
||||
*/
|
||||
- (NSData* _Nullable)encode:(id _Nullable)message;
|
||||
|
||||
/**
|
||||
Decodes the specified message from binary.
|
||||
|
||||
- Parameter message: The message.
|
||||
- Returns: The decoded message, or `nil`, if `message` was `nil`.
|
||||
* Decodes the specified message from binary.
|
||||
*
|
||||
* @param message The message.
|
||||
* @return The decoded message, or `nil`, if `message` was `nil`.
|
||||
*/
|
||||
- (id _Nullable)decode:(NSData* _Nullable)message;
|
||||
@end
|
||||
|
||||
/**
|
||||
A `FlutterMessageCodec` using unencoded binary messages, represented as
|
||||
`NSData` instances.
|
||||
|
||||
This codec is guaranteed to be compatible with the corresponding
|
||||
[BinaryCodec](https://docs.flutter.io/flutter/services/BinaryCodec-class.html)
|
||||
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
|
||||
On the Dart side, messages are represented using `ByteData`.
|
||||
* A `FlutterMessageCodec` using unencoded binary messages, represented as
|
||||
* `NSData` instances.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [BinaryCodec](https://docs.flutter.io/flutter/services/BinaryCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* On the Dart side, messages are represented using `ByteData`.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterBinaryCodec : NSObject <FlutterMessageCodec>
|
||||
@end
|
||||
|
||||
/**
|
||||
A `FlutterMessageCodec` using UTF-8 encoded `NSString` messages.
|
||||
|
||||
This codec is guaranteed to be compatible with the corresponding
|
||||
[StringCodec](https://docs.flutter.io/flutter/services/StringCodec-class.html)
|
||||
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
* A `FlutterMessageCodec` using UTF-8 encoded `NSString` messages.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [StringCodec](https://docs.flutter.io/flutter/services/StringCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterStringCodec : NSObject <FlutterMessageCodec>
|
||||
@end
|
||||
|
||||
/**
|
||||
A `FlutterMessageCodec` using UTF-8 encoded JSON messages.
|
||||
|
||||
This codec is guaranteed to be compatible with the corresponding
|
||||
[JSONMessageCodec](https://docs.flutter.io/flutter/services/JSONMessageCodec-class.html)
|
||||
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
|
||||
Supports values accepted by `NSJSONSerialization` plus top-level
|
||||
`nil`, `NSNumber`, and `NSString`.
|
||||
|
||||
On the Dart side, JSON messages are handled by the JSON facilities of the
|
||||
[`dart:convert`](https://api.dartlang.org/stable/dart-convert/JSON-constant.html)
|
||||
package.
|
||||
* A `FlutterMessageCodec` using UTF-8 encoded JSON messages.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [JSONMessageCodec](https://docs.flutter.io/flutter/services/JSONMessageCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* Supports values accepted by `NSJSONSerialization` plus top-level
|
||||
* `nil`, `NSNumber`, and `NSString`.
|
||||
*
|
||||
* On the Dart side, JSON messages are handled by the JSON facilities of the
|
||||
* [`dart:convert`](https://api.dartlang.org/stable/dart-convert/JSON-constant.html)
|
||||
* package.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterJSONMessageCodec : NSObject <FlutterMessageCodec>
|
||||
@end
|
||||
|
||||
/**
|
||||
A writer of the Flutter standard binary encoding.
|
||||
|
||||
See `FlutterStandardMessageCodec` for details on the encoding.
|
||||
|
||||
The encoding is extensible via subclasses overriding `writeValue`.
|
||||
* A writer of the Flutter standard binary encoding.
|
||||
*
|
||||
* See `FlutterStandardMessageCodec` for details on the encoding.
|
||||
*
|
||||
* The encoding is extensible via subclasses overriding `writeValue`.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterStandardWriter : NSObject
|
||||
@@ -100,11 +100,11 @@ FLUTTER_EXPORT
|
||||
@end
|
||||
|
||||
/**
|
||||
A reader of the Flutter standard binary encoding.
|
||||
|
||||
See `FlutterStandardMessageCodec` for details on the encoding.
|
||||
|
||||
The encoding is extensible via subclasses overriding `readValueOfType`.
|
||||
* A reader of the Flutter standard binary encoding.
|
||||
*
|
||||
* See `FlutterStandardMessageCodec` for details on the encoding.
|
||||
*
|
||||
* The encoding is extensible via subclasses overriding `readValueOfType`.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterStandardReader : NSObject
|
||||
@@ -121,8 +121,8 @@ FLUTTER_EXPORT
|
||||
@end
|
||||
|
||||
/**
|
||||
A factory of compatible reader/writer instances using the Flutter standard
|
||||
binary encoding or extensions thereof.
|
||||
* A factory of compatible reader/writer instances using the Flutter standard
|
||||
* binary encoding or extensions thereof.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterStandardReaderWriter : NSObject
|
||||
@@ -131,36 +131,29 @@ FLUTTER_EXPORT
|
||||
@end
|
||||
|
||||
/**
|
||||
A `FlutterMessageCodec` using the Flutter standard binary encoding.
|
||||
|
||||
This codec is guaranteed to be compatible with the corresponding
|
||||
[StandardMessageCodec](https://docs.flutter.io/flutter/services/StandardMessageCodec-class.html)
|
||||
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
|
||||
Supported messages are acyclic values of these forms:
|
||||
|
||||
- `nil` or `NSNull`
|
||||
- `NSNumber` (including their representation of Boolean values)
|
||||
- `NSString`
|
||||
- `FlutterStandardTypedData`
|
||||
- `NSArray` of supported values
|
||||
- `NSDictionary` with supported keys and values
|
||||
|
||||
On the Dart side, these values are represented as follows:
|
||||
|
||||
- `nil` or `NSNull`: null
|
||||
- `NSNumber`: `bool`, `int`, or `double`, depending on the contained value.
|
||||
- `NSString`: `String`
|
||||
- `FlutterStandardTypedData`: `Uint8List`, `Int32List`, `Int64List`, or `Float64List`
|
||||
- `NSArray`: `List`
|
||||
- `NSDictionary`: `Map`
|
||||
|
||||
Support for `FlutterStandardBigInteger` has been deprecated on 2018-01-09 to be
|
||||
made unavailable four weeks after this change is available on the Flutter alpha
|
||||
branch. `FlutterStandardBigInteger` were needed because the Dart 1.0 `int` type
|
||||
had no size limit. With Dart 2.0, the `int` type is a fixed-size, 64-bit signed
|
||||
integer. If you need to communicate larger integers, use `NSString` encoding
|
||||
instead.
|
||||
* A `FlutterMessageCodec` using the Flutter standard binary encoding.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [StandardMessageCodec](https://docs.flutter.io/flutter/services/StandardMessageCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* Supported messages are acyclic values of these forms:
|
||||
*
|
||||
* - `nil` or `NSNull`
|
||||
* - `NSNumber` (including their representation of Boolean values)
|
||||
* - `NSString`
|
||||
* - `FlutterStandardTypedData`
|
||||
* - `NSArray` of supported values
|
||||
* - `NSDictionary` with supported keys and values
|
||||
*
|
||||
* On the Dart side, these values are represented as follows:
|
||||
*
|
||||
* - `nil` or `NSNull`: null
|
||||
* - `NSNumber`: `bool`, `int`, or `double`, depending on the contained value.
|
||||
* - `NSString`: `String`
|
||||
* - `FlutterStandardTypedData`: `Uint8List`, `Int32List`, `Int64List`, or `Float64List`
|
||||
* - `NSArray`: `List`
|
||||
* - `NSDictionary`: `Map`
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterStandardMessageCodec : NSObject <FlutterMessageCodec>
|
||||
@@ -173,39 +166,37 @@ FLUTTER_EXPORT
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterMethodCall : NSObject
|
||||
/**
|
||||
Creates a method call for invoking the specified named method with the
|
||||
specified arguments.
|
||||
|
||||
- Parameters:
|
||||
- method: the name of the method to call.
|
||||
- arguments: the arguments value.
|
||||
* Creates a method call for invoking the specified named method with the
|
||||
* specified arguments.
|
||||
*
|
||||
* @param method the name of the method to call.
|
||||
* @param arguments the arguments value.
|
||||
*/
|
||||
+ (instancetype)methodCallWithMethodName:(NSString*)method arguments:(id _Nullable)arguments;
|
||||
|
||||
/**
|
||||
The method name.
|
||||
* The method name.
|
||||
*/
|
||||
@property(readonly, nonatomic) NSString* method;
|
||||
|
||||
/**
|
||||
The arguments.
|
||||
* The arguments.
|
||||
*/
|
||||
@property(readonly, nonatomic, nullable) id arguments;
|
||||
@end
|
||||
|
||||
/**
|
||||
Error object representing an unsuccessful outcome of invoking a method
|
||||
on a `FlutterMethodChannel`, or an error event on a `FlutterEventChannel`.
|
||||
* Error object representing an unsuccessful outcome of invoking a method
|
||||
* on a `FlutterMethodChannel`, or an error event on a `FlutterEventChannel`.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterError : NSObject
|
||||
/**
|
||||
Creates a `FlutterError` with the specified error code, message, and details.
|
||||
|
||||
- Parameters:
|
||||
- code: An error code string for programmatic use.
|
||||
- message: A human-readable error message.
|
||||
- details: Custom error details.
|
||||
* Creates a `FlutterError` with the specified error code, message, and details.
|
||||
*
|
||||
* @param code An error code string for programmatic use.
|
||||
* @param message A human-readable error message.
|
||||
* @param details Custom error details.
|
||||
*/
|
||||
+ (instancetype)errorWithCode:(NSString*)code
|
||||
message:(NSString* _Nullable)message
|
||||
@@ -227,12 +218,12 @@ FLUTTER_EXPORT
|
||||
@end
|
||||
|
||||
/**
|
||||
Type of numeric data items encoded in a `FlutterStandardDataType`.
|
||||
|
||||
- FlutterStandardDataTypeUInt8: plain bytes
|
||||
- FlutterStandardDataTypeInt32: 32-bit signed integers
|
||||
- FlutterStandardDataTypeInt64: 64-bit signed integers
|
||||
- FlutterStandardDataTypeFloat64: 64-bit floats
|
||||
* Type of numeric data items encoded in a `FlutterStandardDataType`.
|
||||
*
|
||||
* - FlutterStandardDataTypeUInt8: plain bytes
|
||||
* - FlutterStandardDataTypeInt32: 32-bit signed integers
|
||||
* - FlutterStandardDataTypeInt64: 64-bit signed integers
|
||||
* - FlutterStandardDataTypeFloat64: 64-bit floats
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, FlutterStandardDataType) {
|
||||
FlutterStandardDataTypeUInt8,
|
||||
@@ -242,186 +233,173 @@ typedef NS_ENUM(NSInteger, FlutterStandardDataType) {
|
||||
};
|
||||
|
||||
/**
|
||||
A byte buffer holding `UInt8`, `SInt32`, `SInt64`, or `Float64` values, used
|
||||
with `FlutterStandardMessageCodec` and `FlutterStandardMethodCodec`.
|
||||
|
||||
Two's complement encoding is used for signed integers. IEEE754
|
||||
double-precision representation is used for floats. The platform's native
|
||||
endianness is assumed.
|
||||
* A byte buffer holding `UInt8`, `SInt32`, `SInt64`, or `Float64` values, used
|
||||
* with `FlutterStandardMessageCodec` and `FlutterStandardMethodCodec`.
|
||||
*
|
||||
* Two's complement encoding is used for signed integers. IEEE754
|
||||
* double-precision representation is used for floats. The platform's native
|
||||
* endianness is assumed.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterStandardTypedData : NSObject
|
||||
/**
|
||||
Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
as plain bytes.
|
||||
|
||||
- Parameter data: the byte data.
|
||||
* Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
* as plain bytes.
|
||||
*
|
||||
* @param data the byte data.
|
||||
*/
|
||||
+ (instancetype)typedDataWithBytes:(NSData*)data;
|
||||
|
||||
/**
|
||||
Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
as 32-bit signed integers.
|
||||
|
||||
- Parameter data: the byte data. The length must be divisible by 4.
|
||||
* Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
* as 32-bit signed integers.
|
||||
*
|
||||
* @param data the byte data. The length must be divisible by 4.
|
||||
*/
|
||||
+ (instancetype)typedDataWithInt32:(NSData*)data;
|
||||
|
||||
/**
|
||||
Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
as 64-bit signed integers.
|
||||
|
||||
- Parameter data: the byte data. The length must be divisible by 8.
|
||||
* Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
* as 64-bit signed integers.
|
||||
*
|
||||
* @param data the byte data. The length must be divisible by 8.
|
||||
*/
|
||||
+ (instancetype)typedDataWithInt64:(NSData*)data;
|
||||
|
||||
/**
|
||||
Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
as 64-bit floats.
|
||||
|
||||
- Parameter data: the byte data. The length must be divisible by 8.
|
||||
* Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
* as 64-bit floats.
|
||||
*
|
||||
* @param data the byte data. The length must be divisible by 8.
|
||||
*/
|
||||
+ (instancetype)typedDataWithFloat64:(NSData*)data;
|
||||
|
||||
/**
|
||||
The raw underlying data buffer.
|
||||
* The raw underlying data buffer.
|
||||
*/
|
||||
@property(readonly, nonatomic) NSData* data;
|
||||
|
||||
/**
|
||||
The type of the encoded values.
|
||||
* The type of the encoded values.
|
||||
*/
|
||||
@property(readonly, nonatomic) FlutterStandardDataType type;
|
||||
|
||||
/**
|
||||
The number of value items encoded.
|
||||
* The number of value items encoded.
|
||||
*/
|
||||
@property(readonly, nonatomic) UInt32 elementCount;
|
||||
|
||||
/**
|
||||
The number of bytes used by the encoding of a single value item.
|
||||
* The number of bytes used by the encoding of a single value item.
|
||||
*/
|
||||
@property(readonly, nonatomic) UInt8 elementSize;
|
||||
@end
|
||||
|
||||
/**
|
||||
An arbitrarily large integer value, used with `FlutterStandardMessageCodec`
|
||||
and `FlutterStandardMethodCodec`.
|
||||
* An arbitrarily large integer value, used with `FlutterStandardMessageCodec`
|
||||
* and `FlutterStandardMethodCodec`.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
FLUTTER_DEPRECATED(
|
||||
"Deprecated on 2018-01-09 to be made unavailable four weeks after the "
|
||||
"deprecation is available on the flutter/flutter alpha branch. "
|
||||
"FlutterStandardBigInteger was needed because the Dart 1.0 int type had no "
|
||||
"size limit. With Dart 2.0, the int type is a fixed-size, 64-bit signed "
|
||||
"integer. If you need to communicate larger integers, use NSString encoding "
|
||||
"instead.")
|
||||
FLUTTER_UNAVAILABLE("Unavailable on 2018-08-31. Deprecated on 2018-01-09. "
|
||||
"FlutterStandardBigInteger was needed because the Dart 1.0 int type had no "
|
||||
"size limit. With Dart 2.0, the int type is a fixed-size, 64-bit signed "
|
||||
"integer. If you need to communicate larger integers, use NSString encoding "
|
||||
"instead.")
|
||||
@interface FlutterStandardBigInteger : NSObject
|
||||
/**
|
||||
Creates a `FlutterStandardBigInteger` from a hexadecimal representation.
|
||||
|
||||
- Parameter hex: a hexadecimal string.
|
||||
*/
|
||||
+ (instancetype)bigIntegerWithHex:(NSString*)hex;
|
||||
|
||||
/**
|
||||
The hexadecimal string representation of this integer.
|
||||
*/
|
||||
@property(readonly, nonatomic) NSString* hex;
|
||||
@end
|
||||
|
||||
/**
|
||||
A codec for method calls and enveloped results.
|
||||
|
||||
Method calls are encoded as binary messages with enough structure that the
|
||||
codec can extract a method name `NSString` and an arguments `NSObject`,
|
||||
possibly `nil`. These data items are used to populate a `FlutterMethodCall`.
|
||||
|
||||
Result envelopes are encoded as binary messages with enough structure that
|
||||
the codec can determine whether the result was successful or an error. In
|
||||
the former case, the codec can extract the result `NSObject`, possibly `nil`.
|
||||
In the latter case, the codec can extract an error code `NSString`, a
|
||||
human-readable `NSString` error message (possibly `nil`), and a custom
|
||||
error details `NSObject`, possibly `nil`. These data items are used to
|
||||
populate a `FlutterError`.
|
||||
* A codec for method calls and enveloped results.
|
||||
*
|
||||
* Method calls are encoded as binary messages with enough structure that the
|
||||
* codec can extract a method name `NSString` and an arguments `NSObject`,
|
||||
* possibly `nil`. These data items are used to populate a `FlutterMethodCall`.
|
||||
*
|
||||
* Result envelopes are encoded as binary messages with enough structure that
|
||||
* the codec can determine whether the result was successful or an error. In
|
||||
* the former case, the codec can extract the result `NSObject`, possibly `nil`.
|
||||
* In the latter case, the codec can extract an error code `NSString`, a
|
||||
* human-readable `NSString` error message (possibly `nil`), and a custom
|
||||
* error details `NSObject`, possibly `nil`. These data items are used to
|
||||
* populate a `FlutterError`.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@protocol FlutterMethodCodec
|
||||
/**
|
||||
Provides access to a shared instance this codec.
|
||||
|
||||
- Returns: The shared instance.
|
||||
* Provides access to a shared instance this codec.
|
||||
*
|
||||
* @return The shared instance.
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
Encodes the specified method call into binary.
|
||||
|
||||
- Parameter methodCall: The method call. The arguments value
|
||||
must be supported by this codec.
|
||||
- Returns: The binary encoding.
|
||||
* Encodes the specified method call into binary.
|
||||
*
|
||||
* @param methodCall The method call. The arguments value
|
||||
* must be supported by this codec.
|
||||
* @return The binary encoding.
|
||||
*/
|
||||
- (NSData*)encodeMethodCall:(FlutterMethodCall*)methodCall;
|
||||
|
||||
/**
|
||||
Decodes the specified method call from binary.
|
||||
|
||||
- Parameter methodCall: The method call to decode.
|
||||
- Returns: The decoded method call.
|
||||
* Decodes the specified method call from binary.
|
||||
*
|
||||
* @param methodCall The method call to decode.
|
||||
* @return The decoded method call.
|
||||
*/
|
||||
- (FlutterMethodCall*)decodeMethodCall:(NSData*)methodCall;
|
||||
|
||||
/**
|
||||
Encodes the specified successful result into binary.
|
||||
|
||||
- Parameter result: The result. Must be a value supported by this codec.
|
||||
- Returns: The binary encoding.
|
||||
* Encodes the specified successful result into binary.
|
||||
*
|
||||
* @param result The result. Must be a value supported by this codec.
|
||||
* @return The binary encoding.
|
||||
*/
|
||||
- (NSData*)encodeSuccessEnvelope:(id _Nullable)result;
|
||||
|
||||
/**
|
||||
Encodes the specified error result into binary.
|
||||
|
||||
- Parameter error: The error object. The error details value must be supported
|
||||
by this codec.
|
||||
- Returns: The binary encoding.
|
||||
* Encodes the specified error result into binary.
|
||||
*
|
||||
* @param error The error object. The error details value must be supported
|
||||
* by this codec.
|
||||
* @return The binary encoding.
|
||||
*/
|
||||
- (NSData*)encodeErrorEnvelope:(FlutterError*)error;
|
||||
|
||||
/**
|
||||
Deccodes the specified result envelope from binary.
|
||||
|
||||
- Parameter error: The error object.
|
||||
- Returns: The result value, if the envelope represented a successful result,
|
||||
or a `FlutterError` instance, if not.
|
||||
* Deccodes the specified result envelope from binary.
|
||||
*
|
||||
* @param envelope The error object.
|
||||
* @return The result value, if the envelope represented a successful result,
|
||||
* or a `FlutterError` instance, if not.
|
||||
*/
|
||||
- (id _Nullable)decodeEnvelope:(NSData*)envelope;
|
||||
@end
|
||||
|
||||
/**
|
||||
A `FlutterMethodCodec` using UTF-8 encoded JSON method calls and result
|
||||
envelopes.
|
||||
|
||||
This codec is guaranteed to be compatible with the corresponding
|
||||
[JSONMethodCodec](https://docs.flutter.io/flutter/services/JSONMethodCodec-class.html)
|
||||
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
|
||||
Values supported as methods arguments and result payloads are
|
||||
those supported as top-level or leaf values by `FlutterJSONMessageCodec`.
|
||||
* A `FlutterMethodCodec` using UTF-8 encoded JSON method calls and result
|
||||
* envelopes.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [JSONMethodCodec](https://docs.flutter.io/flutter/services/JSONMethodCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* Values supported as methods arguments and result payloads are
|
||||
* those supported as top-level or leaf values by `FlutterJSONMessageCodec`.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterJSONMethodCodec : NSObject <FlutterMethodCodec>
|
||||
@end
|
||||
|
||||
/**
|
||||
A `FlutterMethodCodec` using the Flutter standard binary encoding.
|
||||
|
||||
This codec is guaranteed to be compatible with the corresponding
|
||||
[StandardMethodCodec](https://docs.flutter.io/flutter/services/StandardMethodCodec-class.html)
|
||||
on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
|
||||
Values supported as method arguments and result payloads are those supported by
|
||||
`FlutterStandardMessageCodec`.
|
||||
* A `FlutterMethodCodec` using the Flutter standard binary encoding.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [StandardMethodCodec](https://docs.flutter.io/flutter/services/StandardMethodCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* Values supported as method arguments and result payloads are those supported by
|
||||
* `FlutterStandardMessageCodec`.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterStandardMethodCodec : NSObject <FlutterMethodCodec>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -9,40 +9,61 @@
|
||||
|
||||
#include "FlutterMacros.h"
|
||||
|
||||
/**
|
||||
* A set of Flutter and Dart assets used by a `FlutterEngine` to initialize execution.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterDartProject : NSObject
|
||||
|
||||
/**
|
||||
* Initializes with a specific
|
||||
*/
|
||||
- (instancetype)initWithPrecompiledDartBundle:(NSBundle*)bundle NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/**
|
||||
* Initializes with a specific set of Flutter Assets, with a specified location of
|
||||
* main() and Dart packages.
|
||||
*/
|
||||
- (instancetype)initWithFlutterAssets:(NSURL*)flutterAssetsURL
|
||||
dartMain:(NSURL*)dartMainURL
|
||||
packages:(NSURL*)dartPackages NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/**
|
||||
* Initializes from a specific set of Flutter Assets.
|
||||
*/
|
||||
- (instancetype)initWithFlutterAssetsWithScriptSnapshot:(NSURL*)flutterAssetsURL
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (instancetype)initFromDefaultSourceForConfiguration;
|
||||
/**
|
||||
* Unavailable - use `init` instead.
|
||||
*/
|
||||
- (instancetype)initFromDefaultSourceForConfiguration FLUTTER_UNAVAILABLE("Use -init instead.");
|
||||
|
||||
/**
|
||||
Returns the file name for the given asset.
|
||||
The returned file name can be used to access the asset in the application's main bundle.
|
||||
|
||||
- Parameter asset: The name of the asset. The name can be hierarchical.
|
||||
- Returns: the file name to be used for lookup in the main bundle.
|
||||
* Returns the file name for the given asset.
|
||||
* The returned file name can be used to access the asset in the application's main bundle.
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @return the file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
+ (NSString*)lookupKeyForAsset:(NSString*)asset;
|
||||
|
||||
/**
|
||||
Returns the file name for the given asset which originates from the specified package.
|
||||
The returned file name can be used to access the asset in the application's main bundle.
|
||||
|
||||
- Parameters:
|
||||
- asset: The name of the asset. The name can be hierarchical.
|
||||
- package: The name of the package from which the asset originates.
|
||||
- Returns: the file name to be used for lookup in the main bundle.
|
||||
* Returns the file name for the given asset which originates from the specified package.
|
||||
* The returned file name can be used to access the asset in the application's main bundle.
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @param package The name of the package from which the asset originates.
|
||||
* @return the file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
+ (NSString*)lookupKeyForAsset:(NSString*)asset fromPackage:(NSString*)package;
|
||||
|
||||
/**
|
||||
* Returns the default identifier for the bundle where we expect to find the Flutter Dart
|
||||
* application.
|
||||
*/
|
||||
+ (NSString*)defaultBundleIdentifier;
|
||||
|
||||
@end
|
||||
|
||||
#endif // FLUTTER_FLUTTERDARTPROJECT_H_
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -7,27 +7,53 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include "FlutterBinaryMessenger.h"
|
||||
#include "FlutterDartProject.h"
|
||||
#include "FlutterEngine.h"
|
||||
#include "FlutterMacros.h"
|
||||
|
||||
/**
|
||||
The FlutterHeadlessDartRunner runs Flutter Dart code with a null rasterizer,
|
||||
and no native drawing surface. It is appropriate for use in running Dart
|
||||
code e.g. in the background from a plugin.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterHeadlessDartRunner : NSObject
|
||||
* A callback for when FlutterHeadlessDartRunner has attempted to start a Dart
|
||||
* Isolate in the background.
|
||||
*
|
||||
* @param success YES if the Isolate was started and run successfully, NO
|
||||
* otherwise.
|
||||
*/
|
||||
typedef void (^FlutterHeadlessDartRunnerCallback)(BOOL success);
|
||||
|
||||
/**
|
||||
Runs a Dart function on an Isolate that is not the main application's Isolate.
|
||||
The first call will create a new Isolate. Subsequent calls will reuse that
|
||||
Isolate. The Isolate is destroyed when the FlutterHeadlessDartRunner is
|
||||
destroyed.
|
||||
* The FlutterHeadlessDartRunner runs Flutter Dart code with a null rasterizer,
|
||||
* and no native drawing surface. It is appropriate for use in running Dart
|
||||
* code e.g. in the background from a plugin.
|
||||
*
|
||||
* Most callers should prefer using `FlutterEngine` directly; this interface exists
|
||||
* for legacy support.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
FLUTTER_DEPRECATED("FlutterEngine should be used rather than FlutterHeadlessDartRunner")
|
||||
@interface FlutterHeadlessDartRunner : FlutterEngine
|
||||
|
||||
- Parameter entrypoint: The name of a top-level function from the same Dart
|
||||
library that contains the app's main() function.
|
||||
*/
|
||||
- (void)runWithEntrypoint:(NSString*)entrypoint;
|
||||
/**
|
||||
* Iniitalize this FlutterHeadlessDartRunner with a `FlutterDartProject`.
|
||||
*
|
||||
* If the FlutterDartProject is not specified, the FlutterHeadlessDartRunner will attempt to locate
|
||||
* the project in a default location.
|
||||
*
|
||||
* A newly initialized engine will not run the `FlutterDartProject` until either
|
||||
* `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI` is called.
|
||||
*
|
||||
* @param labelPrefix The label prefix used to identify threads for this instance. Should
|
||||
* be unique across FlutterEngine instances
|
||||
* @param projectOrNil The `FlutterDartProject` to run.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)labelPrefix
|
||||
project:(FlutterDartProject*)projectOrNil NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/**
|
||||
* Not recommended for use - will initialize with a default label ("io.flutter.headless")
|
||||
* and the default FlutterDartProject.
|
||||
*/
|
||||
- (instancetype)init;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -21,19 +21,19 @@
|
||||
#endif // defined(NS_ASSUME_NONNULL_BEGIN)
|
||||
|
||||
/**
|
||||
Indicates that the API has been deprecated for the specifed reason. Code that
|
||||
uses the deprecated API will continue to work as before. However, the API will
|
||||
soon become unavailable and users are encouraged to immediately take the
|
||||
appropriate action mentioned in the deprecation message and the BREAKING
|
||||
CHANGES section present in the Flutter.h umbrella header.
|
||||
* Indicates that the API has been deprecated for the specified reason. Code
|
||||
* that uses the deprecated API will continue to work as before. However, the
|
||||
* API will soon become unavailable and users are encouraged to immediately take
|
||||
* the appropriate action mentioned in the deprecation message and the BREAKING
|
||||
* CHANGES section present in the Flutter.h umbrella header.
|
||||
*/
|
||||
#define FLUTTER_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
|
||||
|
||||
/**
|
||||
Indicates that the previously deprecated API is now unavailable. Code that
|
||||
uses the API will not work and the declaration of the API is only a stub meant
|
||||
to display the given message detailing the actions for the user to take
|
||||
immediately.
|
||||
* Indicates that the previously deprecated API is now unavailable. Code that
|
||||
* uses the API will not work and the declaration of the API is only a stub
|
||||
* meant to display the given message detailing the actions for the user to take
|
||||
* immediately.
|
||||
*/
|
||||
#define FLUTTER_UNAVAILABLE(msg) __attribute__((__unavailable__(msg)))
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -6,65 +6,85 @@
|
||||
#define FLUTTER_FLUTTERPLUGIN_H_
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <UserNotifications/UNUserNotificationCenter.h>
|
||||
|
||||
#include "FlutterBinaryMessenger.h"
|
||||
#include "FlutterChannels.h"
|
||||
#include "FlutterCodecs.h"
|
||||
#include "FlutterPlatformViews.h"
|
||||
#include "FlutterTexture.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol FlutterPluginRegistrar;
|
||||
|
||||
/**
|
||||
Implemented by the iOS part of a Flutter plugin.
|
||||
|
||||
Defines a set of optional callback methods and a method to set up the plugin
|
||||
and register it to be called by other application components.
|
||||
* Implemented by the iOS part of a Flutter plugin.
|
||||
*
|
||||
* Defines a set of optional callback methods and a method to set up the plugin
|
||||
* and register it to be called by other application components.
|
||||
*/
|
||||
@protocol FlutterPlugin <NSObject>
|
||||
@required
|
||||
/**
|
||||
Registers this plugin.
|
||||
|
||||
- Parameters:
|
||||
- registrar: A helper providing application context and methods for
|
||||
registering callbacks
|
||||
* Registers this plugin using the context information and callback registration
|
||||
* methods exposed by the given registrar.
|
||||
*
|
||||
* The registrar is obtained from a `FlutterPluginRegistry` which keeps track of
|
||||
* the identity of registered plugins and provides basic support for cross-plugin
|
||||
* coordination.
|
||||
*
|
||||
* The caller of this method, a plugin registrant, is usually autogenerated by
|
||||
* Flutter tooling based on declared plugin dependencies. The generated registrant
|
||||
* asks the registry for a registrar for each plugin, and calls this method to
|
||||
* allow the plugin to initialize itself and register callbacks with application
|
||||
* objects available through the registrar protocol.
|
||||
*
|
||||
* @param registrar A helper providing application context and methods for
|
||||
* registering callbacks.
|
||||
*/
|
||||
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar;
|
||||
@optional
|
||||
/**
|
||||
Called if this plugin has been registered to receive `FlutterMethodCall`s.
|
||||
|
||||
- Parameters:
|
||||
- call: The method call command object.
|
||||
- result: A callback for submitting the result of the call.
|
||||
* Called if this plugin has been registered to receive `FlutterMethodCall`s.
|
||||
*
|
||||
* @param call The method call command object.
|
||||
* @param result A callback for submitting the result of the call.
|
||||
*/
|
||||
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
|
||||
- Returns: `NO` if this plugin vetoes application launch.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `NO` if this plugin vetoes application launch.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `NO` if this plugin vetoes application launch.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
willFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
|
||||
|
||||
/**
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
- (void)applicationDidBecomeActive:(UIApplication*)application;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
- (void)applicationWillResignActive:(UIApplication*)application;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
- (void)applicationDidEnterBackground:(UIApplication*)application;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
- (void)applicationWillEnterForeground:(UIApplication*)application;
|
||||
|
||||
@@ -74,185 +94,250 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)applicationWillTerminate:(UIApplication*)application;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
- (void)application:(UIApplication*)application
|
||||
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings;
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
- (void)application:(UIApplication*)application
|
||||
didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
|
||||
- Returns: `YES` if this plugin handles the request.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `YES` if this plugin handles the request.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
didReceiveRemoteNotification:(NSDictionary*)userInfo
|
||||
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
|
||||
*/
|
||||
- (void)application:(UIApplication*)application
|
||||
didReceiveLocalNotification:(UILocalNotification*)notification;
|
||||
|
||||
- Returns: `YES` if this plugin handles the request.
|
||||
*/
|
||||
/**
|
||||
* Calls all plugins registered for `UNUserNotificationCenterDelegate` callbacks.
|
||||
*/
|
||||
- (void)userNotificationCenter:(UNUserNotificationCenter*)center
|
||||
willPresentNotification:(UNNotification*)notification
|
||||
withCompletionHandler:
|
||||
(void (^)(UNNotificationPresentationOptions options))completionHandler
|
||||
API_AVAILABLE(ios(10));
|
||||
|
||||
/**
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `YES` if this plugin handles the request.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
openURL:(NSURL*)url
|
||||
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id>*)options;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
|
||||
- Returns: `YES` if this plugin handles the request.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `YES` if this plugin handles the request.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
|
||||
- Returns: `YES` if this plugin handles the request.
|
||||
*/
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `YES` if this plugin handles the request.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
openURL:(NSURL*)url
|
||||
sourceApplication:(NSString*)sourceApplication
|
||||
annotation:(id)annotation;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
|
||||
- Returns: `YES` if this plugin handles the request.
|
||||
*/
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `YES` if this plugin handles the request.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem
|
||||
completionHandler:(void (^)(BOOL succeeded))completionHandler
|
||||
API_AVAILABLE(ios(9.0));
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
|
||||
- Returns: `YES` if this plugin handles the request.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `YES` if this plugin handles the request.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
handleEventsForBackgroundURLSession:(nonnull NSString*)identifier
|
||||
completionHandler:(nonnull void (^)())completionHandler;
|
||||
completionHandler:(nonnull void (^)(void))completionHandler;
|
||||
|
||||
/**
|
||||
Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
|
||||
- Returns: `YES` if this plugin handles the request.
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `YES` if this plugin handles the request.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
|
||||
|
||||
/**
|
||||
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
|
||||
*
|
||||
* @return `YES` if this plugin handles the request.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
continueUserActivity:(NSUserActivity*)userActivity
|
||||
restorationHandler:(void (^)(NSArray*))restorationHandler;
|
||||
@end
|
||||
|
||||
/**
|
||||
Registration context for a single `FlutterPlugin`.
|
||||
*Registration context for a single `FlutterPlugin`, providing a one stop shop
|
||||
*for the plugin to access contextual information and register callbacks for
|
||||
*various application events.
|
||||
*
|
||||
*Registrars are obtained from a `FlutterPluginRegistry` which keeps track of
|
||||
*the identity of registered plugins and provides basic support for cross-plugin
|
||||
*coordination.
|
||||
*/
|
||||
@protocol FlutterPluginRegistrar <NSObject>
|
||||
/**
|
||||
Returns a `FlutterBinaryMessenger` for creating Dart/iOS communication
|
||||
channels to be used by the plugin.
|
||||
|
||||
- Returns: The messenger.
|
||||
* Returns a `FlutterBinaryMessenger` for creating Dart/iOS communication
|
||||
* channels to be used by the plugin.
|
||||
*
|
||||
* @return The messenger.
|
||||
*/
|
||||
- (NSObject<FlutterBinaryMessenger>*)messenger;
|
||||
|
||||
/**
|
||||
Returns a `FlutterTextureRegistry` for registering textures
|
||||
provided by the plugin.
|
||||
|
||||
- Returns: The texture registry.
|
||||
* Returns a `FlutterTextureRegistry` for registering textures
|
||||
* provided by the plugin.
|
||||
*
|
||||
* @return The texture registry.
|
||||
*/
|
||||
- (NSObject<FlutterTextureRegistry>*)textures;
|
||||
|
||||
/**
|
||||
Publishes a value for external use of the plugin.
|
||||
* Registers a `FlutterPlatformViewFactory` for creation of platfrom views.
|
||||
*
|
||||
* Plugins expose `UIView` for embedding in Flutter apps by registering a view factory.
|
||||
*
|
||||
* @param factory The view factory that will be registered.
|
||||
* @param factoryId A unique identifier for the factory, the Dart code of the Flutter app can use
|
||||
* this identifier to request creation of a `UIView` by the registered factory.
|
||||
*/
|
||||
- (void)registerViewFactory:(NSObject<FlutterPlatformViewFactory>*)factory
|
||||
withId:(NSString*)factoryId;
|
||||
|
||||
Plugins may publish a single value, such as an instance of the
|
||||
plugin's main class, for situations where external control or
|
||||
interaction is needed.
|
||||
|
||||
The published value will be available from the `FlutterPluginRegistry`.
|
||||
Repeated calls overwrite any previous publication.
|
||||
|
||||
- Parameter value: The value to be published.
|
||||
/**
|
||||
* Publishes a value for external use of the plugin.
|
||||
*
|
||||
* Plugins may publish a single value, such as an instance of the
|
||||
* plugin's main class, for situations where external control or
|
||||
* interaction is needed.
|
||||
*
|
||||
* The published value will be available from the `FlutterPluginRegistry`.
|
||||
* Repeated calls overwrite any previous publication.
|
||||
*
|
||||
* @param value The value to be published.
|
||||
*/
|
||||
- (void)publish:(NSObject*)value;
|
||||
|
||||
/**
|
||||
Registers the plugin as a receiver of incoming method calls from the Dart side
|
||||
on the specified `FlutterMethodChannel`.
|
||||
|
||||
- Parameters:
|
||||
- delegate: The receiving object, such as the plugin's main class.
|
||||
- channel: The channel
|
||||
* Registers the plugin as a receiver of incoming method calls from the Dart side
|
||||
* on the specified `FlutterMethodChannel`.
|
||||
*
|
||||
* @param delegate The receiving object, such as the plugin's main class.
|
||||
* @param channel The channel
|
||||
*/
|
||||
- (void)addMethodCallDelegate:(NSObject<FlutterPlugin>*)delegate
|
||||
channel:(FlutterMethodChannel*)channel;
|
||||
|
||||
/**
|
||||
Registers the plugin as a receiver of `UIApplicationDelegate` calls.
|
||||
|
||||
- Parameters delegate: The receiving object, such as the plugin's main class.
|
||||
* Registers the plugin as a receiver of `UIApplicationDelegate` calls.
|
||||
*
|
||||
* @param delegate The receiving object, such as the plugin's main class.
|
||||
*/
|
||||
- (void)addApplicationDelegate:(NSObject<FlutterPlugin>*)delegate;
|
||||
|
||||
/**
|
||||
Returns the file name for the given asset.
|
||||
The returned file name can be used to access the asset in the application's main bundle.
|
||||
|
||||
- Parameter asset: The name of the asset. The name can be hierarchical.
|
||||
- Returns: the file name to be used for lookup in the main bundle.
|
||||
* Returns the file name for the given asset.
|
||||
* The returned file name can be used to access the asset in the application's main bundle.
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @return the file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
- (NSString*)lookupKeyForAsset:(NSString*)asset;
|
||||
|
||||
/**
|
||||
Returns the file name for the given asset which originates from the specified package.
|
||||
The returned file name can be used to access the asset in the application's main bundle.
|
||||
|
||||
- Parameters:
|
||||
- asset: The name of the asset. The name can be hierarchical.
|
||||
- package: The name of the package from which the asset originates.
|
||||
- Returns: the file name to be used for lookup in the main bundle.
|
||||
* Returns the file name for the given asset which originates from the specified package.
|
||||
* The returned file name can be used to access the asset in the application's main bundle.
|
||||
*
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @param package The name of the package from which the asset originates.
|
||||
* @return the file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
- (NSString*)lookupKeyForAsset:(NSString*)asset fromPackage:(NSString*)package;
|
||||
@end
|
||||
|
||||
/**
|
||||
A registry of Flutter iOS plugins.
|
||||
|
||||
Plugins are identified by unique string keys, typically the name of the
|
||||
plugin's main class.
|
||||
* A registry of Flutter iOS plugins.
|
||||
*
|
||||
* Plugins are identified by unique string keys, typically the name of the
|
||||
* plugin's main class. The registry tracks plugins by this key, mapping it to
|
||||
* a value published by the plugin during registration, if any. This provides a
|
||||
* very basic means of cross-plugin coordination with loose coupling between
|
||||
* unrelated plugins.
|
||||
*
|
||||
* Plugins typically need contextual information and the ability to register
|
||||
* callbacks for various application events. To keep the API of the registry
|
||||
* focused, these facilities are not provided directly by the registry, but by
|
||||
* a `FlutterPluginRegistrar`, created by the registry in exchange for the unique
|
||||
* key of the plugin.
|
||||
*
|
||||
* There is no implied connection between the registry and the registrar.
|
||||
* Specifically, callbacks registered by the plugin via the registrar may be
|
||||
* relayed directly to the underlying iOS application objects.
|
||||
*/
|
||||
@protocol FlutterPluginRegistry <NSObject>
|
||||
/**
|
||||
Returns a registrar for registering a plugin.
|
||||
|
||||
- Parameter pluginKey: The unique key identifying the plugin.
|
||||
* Returns a registrar for registering a plugin.
|
||||
*
|
||||
* @param pluginKey The unique key identifying the plugin.
|
||||
*/
|
||||
- (NSObject<FlutterPluginRegistrar>*)registrarForPlugin:(NSString*)pluginKey;
|
||||
/**
|
||||
Returns whether the specified plugin has been registered.
|
||||
|
||||
- Parameter pluginKey: The unique key identifying the plugin.
|
||||
- Returns: `YES` if `registrarForPlugin` has been called with `pluginKey`.
|
||||
* Returns whether the specified plugin has been registered.
|
||||
*
|
||||
* @param pluginKey The unique key identifying the plugin.
|
||||
* @return `YES` if `registrarForPlugin` has been called with `pluginKey`.
|
||||
*/
|
||||
- (BOOL)hasPlugin:(NSString*)pluginKey;
|
||||
|
||||
/**
|
||||
Returns a value published by the specified plugin.
|
||||
|
||||
- Parameter pluginKey: The unique key identifying the plugin.
|
||||
- Returns: An object published by the plugin, if any. Will be `NSNull` if
|
||||
nothing has been published. Will be `nil` if the plugin has not been
|
||||
registered.
|
||||
* Returns a value published by the specified plugin.
|
||||
*
|
||||
* @param pluginKey The unique key identifying the plugin.
|
||||
* @return An object published by the plugin, if any. Will be `NSNull` if
|
||||
* nothing has been published. Will be `nil` if the plugin has not been
|
||||
* registered.
|
||||
*/
|
||||
- (NSObject*)valuePublishedByPlugin:(NSString*)pluginKey;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Implement this in the `UIAppDelegate` of your app to enable Flutter plugins to register
|
||||
* themselves to the application life cycle events.
|
||||
*/
|
||||
@protocol FlutterAppLifeCycleProvider
|
||||
- (void)addApplicationLifeCycleDelegate:(NSObject<FlutterPlugin>*)delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END;
|
||||
|
||||
#endif // FLUTTER_FLUTTERPLUGIN_H_
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FLUTTER_EXPORT
|
||||
@protocol FlutterTexture<NSObject>
|
||||
@protocol FlutterTexture <NSObject>
|
||||
- (CVPixelBufferRef _Nullable)copyPixelBuffer;
|
||||
@end
|
||||
|
||||
FLUTTER_EXPORT
|
||||
@protocol FlutterTextureRegistry<NSObject>
|
||||
@protocol FlutterTextureRegistry <NSObject>
|
||||
- (int64_t)registerTexture:(NSObject<FlutterTexture>*)texture;
|
||||
- (void)textureFrameAvailable:(int64_t)textureId;
|
||||
- (void)unregisterTexture:(int64_t)textureId;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -10,45 +10,147 @@
|
||||
|
||||
#include "FlutterBinaryMessenger.h"
|
||||
#include "FlutterDartProject.h"
|
||||
#include "FlutterEngine.h"
|
||||
#include "FlutterMacros.h"
|
||||
#include "FlutterPlugin.h"
|
||||
#include "FlutterTexture.h"
|
||||
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterViewController : UIViewController<FlutterBinaryMessenger, FlutterTextureRegistry>
|
||||
@class FlutterEngine;
|
||||
|
||||
- (instancetype)initWithProject:(FlutterDartProject*)project
|
||||
/**
|
||||
* A `UIViewController` implementation for Flutter views.
|
||||
*
|
||||
* Dart execution, channel communication, texture registration, and plugin registration
|
||||
* are all handled by `FlutterEngine`. Calls on this class to those members all proxy
|
||||
* through to the `FlutterEngine` attached FlutterViewController.
|
||||
*
|
||||
* A FlutterViewController can be initialized either with an already-running `FlutterEngine`,
|
||||
* or it can be initialized with a `FlutterDartProject` that will be used to spin up
|
||||
* a new `FlutterEngine`. Developers looking to present and hide FlutterViewControllers
|
||||
* in native iOS applications will usually want to maintain the `FlutterEngine` instance
|
||||
* so as not to lose Dart-related state and asynchronous tasks when navigating back and
|
||||
* forth between a FlutterViewController and other `UIViewController`s.
|
||||
*/
|
||||
FLUTTER_EXPORT
|
||||
@interface FlutterViewController
|
||||
: UIViewController <FlutterBinaryMessenger, FlutterTextureRegistry, FlutterPluginRegistry>
|
||||
|
||||
/**
|
||||
* Initializes this FlutterViewController with the specified `FlutterEngine`.
|
||||
*
|
||||
* The initialized viewcontroller will attach itself to the engine as part of this process.
|
||||
*
|
||||
* @param engine The `FlutterEngine` instance to attach to.
|
||||
* @param nibNameOrNil The NIB name to initialize this UIViewController with.
|
||||
* @param nibBundleOrNil The NIB bundle.
|
||||
*/
|
||||
- (instancetype)initWithEngine:(FlutterEngine*)engine
|
||||
nibName:(NSString*)nibNameOrNil
|
||||
bundle:(NSBundle*)nibBundleOrNil NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/**
|
||||
* Initializes a new FlutterViewController and `FlutterEngine` with the specified
|
||||
* `FlutterDartProject`.
|
||||
*
|
||||
* @param projectOrNil The `FlutterDartProject` to initialize the `FlutterEngine` with.
|
||||
* @param nibNameOrNil The NIB name to initialize this UIViewController with.
|
||||
* @param nibBundleOrNil The NIB bundle.
|
||||
*/
|
||||
- (instancetype)initWithProject:(FlutterDartProject*)projectOrNil
|
||||
nibName:(NSString*)nibNameOrNil
|
||||
bundle:(NSBundle*)nibBundleOrNil NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (void)handleStatusBarTouches:(UIEvent*)event;
|
||||
|
||||
/**
|
||||
Returns the file name for the given asset.
|
||||
The returned file name can be used to access the asset in the application's main bundle.
|
||||
* Registers a callback that will be invoked when the Flutter view has been rendered.
|
||||
* The callback will be fired only once.
|
||||
*
|
||||
* Replaces an existing callback. Use a `nil` callback to unregister the existing one.
|
||||
*/
|
||||
- (void)setFlutterViewDidRenderCallback:(void (^)(void))callback;
|
||||
|
||||
- Parameter asset: The name of the asset. The name can be hierarchical.
|
||||
- Returns: the file name to be used for lookup in the main bundle.
|
||||
/**
|
||||
* Returns the file name for the given asset.
|
||||
* The returned file name can be used to access the asset in the application's
|
||||
* main bundle.
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @return The file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
- (NSString*)lookupKeyForAsset:(NSString*)asset;
|
||||
|
||||
/**
|
||||
Returns the file name for the given asset which originates from the specified package.
|
||||
The returned file name can be used to access the asset in the application's main bundle.
|
||||
|
||||
- Parameters:
|
||||
- asset: The name of the asset. The name can be hierarchical.
|
||||
- package: The name of the package from which the asset originates.
|
||||
- Returns: the file name to be used for lookup in the main bundle.
|
||||
* Returns the file name for the given asset which originates from the specified
|
||||
* package.
|
||||
* The returned file name can be used to access the asset in the application's
|
||||
* main bundle.
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @param package The name of the package from which the asset originates.
|
||||
* @return The file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
- (NSString*)lookupKeyForAsset:(NSString*)asset fromPackage:(NSString*)package;
|
||||
|
||||
/**
|
||||
Sets the first route that the Flutter app shows. The default is "/".
|
||||
|
||||
- Parameter route: The name of the first route to show.
|
||||
* Sets the first route that the Flutter app shows. The default is "/".
|
||||
* This method will guarnatee that the initial route is delivered, even if the
|
||||
* Flutter window hasn't been created yet when called. It cannot be used to update
|
||||
* the current route being shown in a visible FlutterViewController (see pushRoute
|
||||
* and popRoute).
|
||||
*
|
||||
* @param route The name of the first route to show.
|
||||
*/
|
||||
- (void)setInitialRoute:(NSString*)route;
|
||||
|
||||
/**
|
||||
* Instructs the Flutter Navigator (if any) to go back.
|
||||
*/
|
||||
- (void)popRoute;
|
||||
|
||||
/**
|
||||
* Instructs the Flutter Navigator (if any) to push a route on to the navigation
|
||||
* stack. The setInitialRoute method should be prefered if this is called before the
|
||||
* FlutterViewController has come into view.
|
||||
*
|
||||
* @param route The name of the route to push to the navigation stack.
|
||||
*/
|
||||
- (void)pushRoute:(NSString*)route;
|
||||
|
||||
/**
|
||||
* The `FlutterPluginRegistry` used by this FlutterViewController.
|
||||
*/
|
||||
- (id<FlutterPluginRegistry>)pluginRegistry;
|
||||
|
||||
/**
|
||||
* Specifies the view to use as a splash screen. Flutter's rendering is asynchronous, so the first
|
||||
* frame rendered by the Flutter application might not immediately appear when theFlutter view is
|
||||
* initially placed in the view hierarchy. The splash screen view will be used as
|
||||
* a replacement until the first frame is rendered.
|
||||
*
|
||||
* The view used should be appropriate for multiple sizes; an autoresizing mask to
|
||||
* have a flexible width and height will be applied automatically.
|
||||
*/
|
||||
@property(strong, nonatomic) UIView* splashScreenView;
|
||||
|
||||
/**
|
||||
* Attempts to set the `splashScreenView` property from the `UILaunchStoryboardName` from the
|
||||
* main bundle's `Info.plist` file. This method will not change the value of `splashScreenView`
|
||||
* if it cannot find a default one from a storyboard or nib.
|
||||
*
|
||||
* @return `YES` if successful, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)loadDefaultSplashScreenView;
|
||||
|
||||
/**
|
||||
* Controls whether the created view will be opaque or not.
|
||||
*
|
||||
* Default is `YES`. Note that setting this to `NO` may negatively impact performance
|
||||
* when using hardware acceleration, and toggling this will trigger a re-layout of the
|
||||
* view.
|
||||
*/
|
||||
@property(nonatomic, getter=isViewOpaque) BOOL viewOpaque;
|
||||
|
||||
@end
|
||||
|
||||
#endif // FLUTTER_FLUTTERVIEWCONTROLLER_H_
|
||||
|
||||
@@ -20,10 +20,6 @@
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>8.0</string>
|
||||
</dict>
|
||||
|
||||
Binary file not shown.
@@ -2,8 +2,6 @@
|
||||
FLUTTER_ROOT=/Users/dinect/projects/flutter
|
||||
FLUTTER_APPLICATION_PATH=/Users/dinect/projects/checker
|
||||
FLUTTER_TARGET=lib/main.dart
|
||||
FLUTTER_BUILD_MODE=release
|
||||
FLUTTER_BUILD_DIR=build
|
||||
SYMROOT=${SOURCE_ROOT}/../build/ios
|
||||
FLUTTER_FRAMEWORK_DIR=/Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release
|
||||
PREVIEW_DART_2=true
|
||||
|
||||
@@ -18,20 +18,20 @@ PODS:
|
||||
DEPENDENCIES:
|
||||
- DropDown
|
||||
- Flutter (from `/Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release`)
|
||||
- image_picker (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.2/ios`)
|
||||
- path_provider (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios`)
|
||||
- sqflite (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.8.9/ios`)
|
||||
- image_picker (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.10/ios`)
|
||||
- path_provider (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.4.1/ios`)
|
||||
- sqflite (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.12.2+1/ios`)
|
||||
- ZXingObjC (~> 3.2.2)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: /Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release
|
||||
image_picker:
|
||||
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.2/ios
|
||||
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.10/ios
|
||||
path_provider:
|
||||
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios
|
||||
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.4.1/ios
|
||||
sqflite:
|
||||
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.8.9/ios
|
||||
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.12.2+1/ios
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
DropDown: 7f87abecc28f9b4edad810fe1211c5c018c257e5
|
||||
@@ -39,7 +39,7 @@ SPEC CHECKSUMS:
|
||||
FMDB: 6198a90e7b6900cfc046e6bc0ef6ebb7be9236aa
|
||||
image_picker: ee00aab0487cedc80a304085219503cc6d0f2e22
|
||||
path_provider: 09407919825bfe3c2deae39453b7a5b44f467873
|
||||
sqflite: d1612813fa7db7c667bed9f1d1b508deffc56999
|
||||
sqflite: 801b6b0983f722fa29baf00d1476e4556ada6de4
|
||||
ZXingObjC: 2c95a0dc52daac69b23ec78fad8fa2fec05f8981
|
||||
|
||||
PODFILE CHECKSUM: baa4624c0ec28db303cae71ed9281db645edae37
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.23</string>
|
||||
<string>1.0.25</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>29</string>
|
||||
<string>31</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,16 +9,36 @@
|
||||
<key>orderHint</key>
|
||||
<integer>14</integer>
|
||||
</dict>
|
||||
<key>Crypto INT.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>16</integer>
|
||||
</dict>
|
||||
<key>Crypto copy.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>16</integer>
|
||||
</dict>
|
||||
<key>Dinect INT.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>Dinect copy.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>15</integer>
|
||||
</dict>
|
||||
<key>Dinect-Crypto.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Dinect-OTE.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>15</integer>
|
||||
</dict>
|
||||
<key>Dinect.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
|
||||
Binary file not shown.
@@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.23</string>
|
||||
<string>1.0.25</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>29</string>
|
||||
<string>31</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
|
||||
Reference in New Issue
Block a user