Commit 878f2d4f authored by 林生雨's avatar 林生雨

commit

parent bd6fdfe4
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.packages
.pub-cache/
.pub/
/build/
# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 1aedbb1835bd6eb44550293d57d4d124f19901f0
channel: stable
project_type: app
/Users/apple/Downloads/flutter/bin/cache/artifacts/engine
\ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_boost-0.0.420
\ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/git/flutter_plugin-31f0e00d6a02ebbfa022be8770e397f36bcb10ce
\ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.3.0
\ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.1.6+5
\ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/xservice_kit-0.0.29
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>
{"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"images/arrow_right.png":["images/arrow_right.png"],"images/arrow_right.svg":["images/arrow_right.svg"],"images/arrow_right@2x.png":["images/arrow_right@2x.png"],"images/black_person.png":["images/black_person.png"],"images/dark_grey_person.png":["images/dark_grey_person.png"],"images/golden_person.png":["images/golden_person.png"],"images/left_arrow.png":["images/left_arrow.png"],"images/left_arrow.svg":["images/left_arrow.svg"],"images/light_grey_person.png":["images/light_grey_person.png"],"images/message_att.png":["images/message_att.png"],"images/message_att@2x.png":["images/message_att@2x.png"],"images/message_like.png":["images/message_like.png"],"images/message_like@2x.png":["images/message_like@2x.png"],"images/message_noti.png":["images/message_noti.png"],"images/message_noti@2x.png":["images/message_noti@2x.png"],"images/nav_back.png":["images/nav_back.png"],"images/replace_head.svg":["images/replace_head.svg"],"images/right_arrow.svg":["images/right_arrow.svg"],"images/right_icon.png":["images/right_icon.png"],"images/right_icon@2x.png":["images/right_icon@2x.png"],"images/small_camera.svg":["images/small_camera.svg"],"images/you_icon.png":["images/you_icon.png"]}
\ No newline at end of file
[{"fonts":[{"asset":"fonts/MaterialIcons-Regular.ttf"}],"family":"MaterialIcons"},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]},{"fonts":[{"asset":"fonts/MaterialIcons-Regular.ttf"}],"family":"MaterialIcons"},{"fonts":[{"asset":"fonts/MaterialIcons-Regular.ttf"}],"family":"MaterialIcons"}]
\ No newline at end of file
This diff is collapsed.
<svg width="9" height="15" viewBox="0 0 9 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 14L7 7.5L1 1" stroke="#323232" stroke-width="1.5"/>
</svg>
<svg width="13" height="22" viewBox="0 0 13 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 1L2 11L12 21" stroke="#323232" stroke-width="1.5"/>
</svg>
<svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="60" cy="60" r="60" fill="#C4C4C4"/>
<rect x="31.25" y="26.25" width="57.5" height="67.6408" rx="28.75" stroke="white" stroke-width="2.5"/>
<path d="M49.4365 78.2769C52.4132 80.381 56.0601 81.6195 59.9999 81.6195C63.9397 81.6195 67.5866 80.381 70.5633 78.2769" stroke="white" stroke-width="2.5"/>
<path d="M48.1689 54.155V63.0283" stroke="white" stroke-width="3.5"/>
<path d="M71.8311 54.155V63.0283" stroke="white" stroke-width="3.5"/>
<path d="M61.2677 55.4224V68.9435C61.2677 70.3436 60.1327 71.4787 58.7325 71.4787C58.4362 71.4787 58.1518 71.4279 57.8875 71.3344" stroke="white" stroke-width="2.5"/>
</svg>
<svg width="9" height="15" viewBox="0 0 9 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 14L7 7.5L1 1" stroke="#323232" stroke-width="1.5"/>
</svg>
<svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="17" cy="17" r="17" fill="white"/>
<circle cx="17" cy="18" r="3.25" stroke="#323232" stroke-width="1.5"/>
<path d="M20.3409 10.4167V11.1667H21.0909H26.25V25.25H7.75V11.1667H12.9091H13.6591V10.4167V9.75H20.3409V10.4167Z" stroke="#323232" stroke-width="1.5"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
// 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.
#ifndef FLUTTER_FLUTTER_H_
#define FLUTTER_FLUTTER_H_
/**
BREAKING CHANGES:
December 17, 2018:
- Changed designated initializer on FlutterEngine
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".
January 15, 2018: Marked "initWithFLXArchive" and
"initWithFLXArchiveWithScriptSnapshot" as unavailable following the
deprecation from December 11, 2017. Scheduled to be removed on February
19, 2018.
January 09, 2018: Deprecated "FlutterStandardBigInteger" and its use in
"FlutterStandardMessageCodec" and "FlutterStandardMethodCodec". Scheduled to
be marked as unavailable once the deprecation has been available on the
flutter/flutter alpha branch for four weeks. "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.
December 11, 2017: Deprecated "initWithFLXArchive" and
"initWithFLXArchiveWithScriptSnapshot" and scheculed the same to be marked as
unavailable on January 15, 2018. Instead, "initWithFlutterAssets" and
"initWithFlutterAssetsWithScriptSnapshot" should be used. The reason for this
change is that the FLX archive will be deprecated and replaced with a flutter
assets directory containing the same files as the FLX did.
November 29, 2017: Added a BREAKING CHANGES section.
*/
#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 "FlutterPlatformViews.h"
#include "FlutterPlugin.h"
#include "FlutterPluginAppLifeCycleDelegate.h"
#include "FlutterTexture.h"
#include "FlutterViewController.h"
#endif // FLUTTER_FLUTTER_H_
// 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.
#ifndef FLUTTER_FLUTTERAPPDELEGATE_H_
#define FLUTTER_FLUTTERAPPDELEGATE_H_
#import <UIKit/UIKit.h>
#include "FlutterMacros.h"
#include "FlutterPlugin.h"
/**
* `UIApplicationDelegate` subclass for simple apps that want default behavior.
*
* 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.
* * Keeps the Flutter connection open in debug mode when the phone screen
* locks.
*
* App delegates for Flutter applications are *not* required to inherit from
* this class. Developers of custom app delegate classes should copy and paste
* code as necessary from FlutterAppDelegate.mm.
*/
FLUTTER_EXPORT
@interface FlutterAppDelegate
: UIResponder <UIApplicationDelegate, FlutterPluginRegistry, FlutterAppLifeCycleProvider>
@property(strong, nonatomic) UIWindow* window;
@end
#endif // FLUTTER_FLUTTERDARTPROJECT_H_
// 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.
#ifndef FLUTTER_FLUTTERBINARYMESSENGER_H_
#define FLUTTER_FLUTTERBINARYMESSENGER_H_
#import <Foundation/Foundation.h>
#include "FlutterMacros.h"
NS_ASSUME_NONNULL_BEGIN
/**
* 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.
*
* @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.
*
* 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>
/**
* 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.
*
* @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.
*
* @param channel The channel name.
* @param handler The message handler.
*/
- (void)setMessageHandlerOnChannel:(NSString*)channel
binaryMessageHandler:(FlutterBinaryMessageHandler _Nullable)handler;
@end
NS_ASSUME_NONNULL_END
#endif // FLUTTER_FLUTTERBINARYMESSENGER_H_
// 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.
#ifndef FLUTTER_FLUTTERCALLBACKCACHE_H_
#define FLUTTER_FLUTTERCALLBACKCACHE_H_
#import <Foundation/Foundation.h>
#include "FlutterMacros.h"
/**
* An object containing the result of `FlutterCallbackCache`'s `lookupCallbackInformation`
* method.
*/
FLUTTER_EXPORT
@interface FlutterCallbackInformation : NSObject
/**
* The name of the callback.
*/
@property(retain) NSString* callbackName;
/**
* The class name of the callback.
*/
@property(retain) NSString* callbackClassName;
/**
* The library path of the callback.
*/
@property(retain) NSString* callbackLibraryPath;
@end
/**
* The cache containing callback information for spawning a
* `FlutterHeadlessDartRunner`.
*/
FLUTTER_EXPORT
@interface FlutterCallbackCache : NSObject
/**
* Returns the callback information for the given callback handle.
* This callback information can be used when spawning a
* `FlutterHeadlessDartRunner`.
*
* @param handle The handle for a callback, provided by the
* Dart method `PluginUtilities.getCallbackHandle`.
* @return A `FlutterCallbackInformation` object which contains the name of the
* callback, the name of the class in which the callback is defined, and the
* path of the library which contains the callback. If the provided handle is
* invalid, nil is returned.
*/
+ (FlutterCallbackInformation*)lookupCallbackInformation:(int64_t)handle;
@end
#endif // FLUTTER_FLUTTERCALLBACKCACHE_H_
This diff is collapsed.
This diff is collapsed.
// 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.
#ifndef FLUTTER_FLUTTERDARTPROJECT_H_
#define FLUTTER_FLUTTERDARTPROJECT_H_
#import <Foundation/Foundation.h>
#include "FlutterMacros.h"
/**
* A set of Flutter and Dart assets used by a `FlutterEngine` to initialize execution.
*/
FLUTTER_EXPORT
@interface FlutterDartProject : NSObject
/**
* Initializes a Flutter Dart project from a bundle.
*/
- (instancetype)initWithPrecompiledDartBundle:(NSBundle*)bundle NS_DESIGNATED_INITIALIZER;
/**
* Unavailable - use `init` instead.
*/
- (instancetype)initFromDefaultSourceForConfiguration FLUTTER_UNAVAILABLE("Use -init instead.");
/**
* Returns the file name for the given asset. If the bundle with the identifier
* "io.flutter.flutter.app" exists, it will try use that bundle; otherwise, it
* will use the main bundle. To specify a different bundle, use
* `-lookupKeyForAsset:asset:fromBundle`.
*
* @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.
* The returned file name can be used to access the asset in the supplied bundle.
*
* @param asset The name of the asset. The name can be hierarchical.
* @param bundle The `NSBundle` to use for looking up the asset.
* @return the file name to be used for lookup in the main bundle.
*/
+ (NSString*)lookupKeyForAsset:(NSString*)asset fromBundle:(NSBundle*)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 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 specified 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.
* @param bundle The bundle to use when doing the lookup.
* @return the file name to be used for lookup in the main bundle.
*/
+ (NSString*)lookupKeyForAsset:(NSString*)asset
fromPackage:(NSString*)package
fromBundle:(NSBundle*)bundle;
/**
* Returns the default identifier for the bundle where we expect to find the Flutter Dart
* application.
*/
+ (NSString*)defaultBundleIdentifier;
@end
#endif // FLUTTER_FLUTTERDARTPROJECT_H_
This diff is collapsed.
// 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.
#ifndef FLUTTER_FLUTTERHEADLESSDARTRUNNER_H_
#define FLUTTER_FLUTTERHEADLESSDARTRUNNER_H_
#import <Foundation/Foundation.h>
#include "FlutterBinaryMessenger.h"
#include "FlutterDartProject.h"
#include "FlutterEngine.h"
#include "FlutterMacros.h"
/**
* 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);
/**
* 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
/**
* 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;
/**
* 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.
* @param allowHeadlessExecution Must be set to `YES`.
*/
- (instancetype)initWithName:(NSString*)labelPrefix
project:(FlutterDartProject*)projectOrNil
allowHeadlessExecution:(BOOL)allowHeadlessExecution NS_DESIGNATED_INITIALIZER;
/**
* Not recommended for use - will initialize with a default label ("io.flutter.headless")
* and the default FlutterDartProject.
*/
- (instancetype)init;
@end
#endif // FLUTTER_FLUTTERHEADLESSDARTRUNNER_H_
// 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.
#ifndef FLUTTER_FLUTTERMACROS_H_
#define FLUTTER_FLUTTERMACROS_H_
#if defined(FLUTTER_FRAMEWORK)
#define FLUTTER_EXPORT __attribute__((visibility("default")))
#else // defined(FLUTTER_SDK)
#define FLUTTER_EXPORT
#endif // defined(FLUTTER_SDK)
#ifndef NS_ASSUME_NONNULL_BEGIN
#define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
#define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
#endif // defined(NS_ASSUME_NONNULL_BEGIN)
/**
* 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.
*/
#define FLUTTER_UNAVAILABLE(msg) __attribute__((__unavailable__(msg)))
#endif // FLUTTER_FLUTTERMACROS_H_
// 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.
#ifndef FLUTTER_FLUTTERPLATFORMVIEWS_H_
#define FLUTTER_FLUTTERPLATFORMVIEWS_H_
#import <UIKit/UIKit.h>
#import "FlutterCodecs.h"
#import "FlutterMacros.h"
NS_ASSUME_NONNULL_BEGIN
/**
* Wraps a `UIView` for embedding in the Flutter hierarchy
*/
@protocol FlutterPlatformView <NSObject>
/**
* Returns a reference to the `UIView` that is wrapped by this `FlutterPlatformView`.
*/
- (UIView*)view;
@end
FLUTTER_EXPORT
@protocol FlutterPlatformViewFactory <NSObject>
/**
* Create a `FlutterPlatformView`.
*
* Implemented by iOS code that expose a `UIView` for embedding in a Flutter app.
*
* The implementation of this method should create a new `UIView` and return it.
*
* @param frame The rectangle for the newly created `UIView` measued in points.
* @param viewId A unique identifier for this `UIView`.
* @param args Parameters for creating the `UIView` sent from the Dart side of the Flutter app.
* If `createArgsCodec` is not implemented, or if no creation arguments were sent from the Dart
* code, this will be null. Otherwise this will be the value sent from the Dart code as decoded by
* `createArgsCodec`.
*/
- (NSObject<FlutterPlatformView>*)createWithFrame:(CGRect)frame
viewIdentifier:(int64_t)viewId
arguments:(id _Nullable)args;
/**
* Returns the `FlutterMessageCodec` for decoding the args parameter of `createWithFrame`.
*
* Only needs to be implemented if `createWithFrame` needs an arguments parameter.
*/
@optional
- (NSObject<FlutterMessageCodec>*)createArgsCodec;
@end
NS_ASSUME_NONNULL_END
#endif // FLUTTER_FLUTTERPLATFORMVIEWS_H_
This diff is collapsed.
// 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.
#ifndef FLUTTER_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_
#define FLUTTER_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_
#include "FlutterPlugin.h"
NS_ASSUME_NONNULL_BEGIN
/**
* Propagates `UIAppDelegate` callbacks to registered plugins.
*/
FLUTTER_EXPORT
@interface FlutterPluginAppLifeCycleDelegate : NSObject
/**
* Registers `delegate` to receive life cycle callbacks via this FlutterPluginAppLifecycleDelegate
* as long as it is alive.
*
* `delegate` will only referenced weakly.
*/
- (void)addDelegate:(NSObject<FlutterApplicationLifeCycleDelegate>*)delegate;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*
* @return `NO` if any plugin vetoes application launch.
*/
- (BOOL)application:(UIApplication*)application
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*
* @return `NO` if any plugin vetoes application launch.
*/
- (BOOL)application:(UIApplication*)application
willFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
/**
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
*/
- (void)application:(UIApplication*)application
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings
API_DEPRECATED(
"See -[UIApplicationDelegate application:didRegisterUserNotificationSettings:] deprecation",
ios(8.0, 10.0));
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*/
- (void)application:(UIApplication*)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*/
- (void)application:(UIApplication*)application
didReceiveRemoteNotification:(NSDictionary*)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*/
- (void)application:(UIApplication*)application
didReceiveLocalNotification:(UILocalNotification*)notification
API_DEPRECATED(
"See -[UIApplicationDelegate application:didReceiveLocalNotification:] deprecation",
ios(4.0, 10.0));
/**
* Calls all plugins registered for `UNUserNotificationCenterDelegate` callbacks.
*/
- (void)userNotificationCenter:(UNUserNotificationCenter*)center
willPresentNotification:(UNNotification*)notification
withCompletionHandler:
(void (^)(UNNotificationPresentationOptions options))completionHandler
API_AVAILABLE(ios(10));
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
* some plugin handles the request.
*
* @return `YES` if any plugin handles the request.
*/
- (BOOL)application:(UIApplication*)application
openURL:(NSURL*)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id>*)options;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
* some plugin handles the request.
*
* @return `YES` if any plugin handles the request.
*/
- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
* some plugin handles the request.
*
* @return `YES` if any plugin handles the request.
*/
- (BOOL)application:(UIApplication*)application
openURL:(NSURL*)url
sourceApplication:(NSString*)sourceApplication
annotation:(id)annotation;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*/
- (void)application:(UIApplication*)application
performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem
completionHandler:(void (^)(BOOL succeeded))completionHandler
API_AVAILABLE(ios(9.0));
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
* some plugin handles the request.
*
* @return `YES` if any plugin handles the request.
*/
- (BOOL)application:(UIApplication*)application
handleEventsForBackgroundURLSession:(nonnull NSString*)identifier
completionHandler:(nonnull void (^)(void))completionHandler;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
* some plugin handles the request.
*
* @returns `YES` if any plugin handles the request.
*/
- (BOOL)application:(UIApplication*)application
performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
* some plugin handles the request.
*
* @return `YES` if any plugin handles the request.
*/
- (BOOL)application:(UIApplication*)application
continueUserActivity:(NSUserActivity*)userActivity
restorationHandler:(void (^)(NSArray*))restorationHandler;
@end
NS_ASSUME_NONNULL_END
#endif // FLUTTER_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_
// 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.
#ifndef FLUTTER_FLUTTERTEXTURE_H_
#define FLUTTER_FLUTTERTEXTURE_H_
#import <CoreMedia/CoreMedia.h>
#import <Foundation/Foundation.h>
#include "FlutterMacros.h"
NS_ASSUME_NONNULL_BEGIN
FLUTTER_EXPORT
@protocol FlutterTexture <NSObject>
- (CVPixelBufferRef _Nullable)copyPixelBuffer;
@end
FLUTTER_EXPORT
@protocol FlutterTextureRegistry <NSObject>
- (int64_t)registerTexture:(NSObject<FlutterTexture>*)texture;
- (void)textureFrameAvailable:(int64_t)textureId;
- (void)unregisterTexture:(int64_t)textureId;
@end
NS_ASSUME_NONNULL_END
#endif // FLUTTER_FLUTTERTEXTURE_H_
// 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.
#ifndef FLUTTER_FLUTTERVIEWCONTROLLER_H_
#define FLUTTER_FLUTTERVIEWCONTROLLER_H_
#import <UIKit/UIKit.h>
#include <sys/cdefs.h>
#include "FlutterBinaryMessenger.h"
#include "FlutterDartProject.h"
#include "FlutterEngine.h"
#include "FlutterMacros.h"
#include "FlutterPlugin.h"
#include "FlutterTexture.h"
@class FlutterEngine;
/**
* The name used for semantic update notifications via `NSNotificationCenter`.
*
* The object passed as the sender is the `FlutterViewController` associated
* with the update.
*/
FLUTTER_EXPORT
extern NSNotificationName const FlutterSemanticsUpdateNotification;
/**
* 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` via
* the `initWithEngine:` initializer, or it can be initialized with a `FlutterDartProject` that
* will be used to implicitly spin up a new `FlutterEngine`. Creating a `FlutterEngine before
* showing a `FlutterViewController` can be used to pre-initialize the Dart VM and to prepare the
* isolate in order to reduce the latency to the first rendered frame. Holding a `FlutterEngine`
* independently of FlutterViewControllers can also be used to 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 <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;
/**
* 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;
/**
* 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.
*
* @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 "/".
* 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 preferred 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;
/**
* True if at least one frame has rendered and the ViewController has appeared.
*
* This property is reset to false when the ViewController disappears. It is
* guaranteed to only alternate between true and false for observers.
*/
@property(nonatomic, readonly, getter=isDisplayingFlutterUI) BOOL displayingFlutterUI;
/**
* 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;
/**
* The `FlutterEngine` instance for this view controller.
*/
@property(weak, nonatomic, readonly) FlutterEngine* engine;
/**
* The `FlutterBinaryMessenger` associated with this FlutterViewController (used for communicating
* with channels).
*
* This is just a convenient way to get the |FlutterEngine|'s binary messenger.
*/
@property(nonatomic, readonly) NSObject<FlutterBinaryMessenger>* binaryMessenger;
@end
#endif // FLUTTER_FLUTTERVIEWCONTROLLER_H_
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Flutter</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Flutter</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>FlutterEngine</key>
<string>b863200c37df4ed378042de11c4e9ff34e4e58c9</string>
<key>ClangVersion</key>
<string>Fuchsia clang version 8.0.0 (based on LLVM 8.0.0svn)</string>
</dict>
</plist>
framework module Flutter {
umbrella header "Flutter.h"
export *
module * { export * }
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/Flutter.h</key>
<data>
LQBk1GD+u1YEANQovLVv2R/uUag=
</data>
<key>Headers/FlutterAppDelegate.h</key>
<data>
VQRY5CUL6CLzdXzfScbDvTdpElA=
</data>
<key>Headers/FlutterBinaryMessenger.h</key>
<data>
3TKVS3KoBmkupZxin9YbnrPtMCk=
</data>
<key>Headers/FlutterCallbackCache.h</key>
<data>
v6UEJmd8GTKddiiNFrVRsY9DAZo=
</data>
<key>Headers/FlutterChannels.h</key>
<data>
VA9uQqBQMxHCYJHnGCv1UPch4S0=
</data>
<key>Headers/FlutterCodecs.h</key>
<data>
/PGN0simzUo4u/YhIKuBq/r8rww=
</data>
<key>Headers/FlutterDartProject.h</key>
<data>
buhHk6WXrZ6JBOHQgjXCYITi+xU=
</data>
<key>Headers/FlutterEngine.h</key>
<data>
AdZsTJVwLyqWvLg0GGXL63DxLwA=
</data>
<key>Headers/FlutterHeadlessDartRunner.h</key>
<data>
M8/dhQH3VcQVHupUxQ1dGsbG3Ek=
</data>
<key>Headers/FlutterMacros.h</key>
<data>
Ez4684e7XzQ8vidzmRvJh3qCNxk=
</data>
<key>Headers/FlutterPlatformViews.h</key>
<data>
14j1xmP4V+DT37g/he3ZhpoeOig=
</data>
<key>Headers/FlutterPlugin.h</key>
<data>
maoHSos7SW7cnlOzz+gFyKQiG/s=
</data>
<key>Headers/FlutterPluginAppLifeCycleDelegate.h</key>
<data>
gctJ/r455gE8/rQYDs4lB3RUOkI=
</data>
<key>Headers/FlutterTexture.h</key>
<data>
1LdQETkD4xmsSZETVBywMxxLPwM=
</data>
<key>Headers/FlutterViewController.h</key>
<data>
1iNZtmSzviLXO3AyP98IfgOStLs=
</data>
<key>Info.plist</key>
<data>
mmIimfQR8J/7o8WT4YOSt84JO2I=
</data>
<key>Modules/module.modulemap</key>
<data>
wJV5dCKEGl+FAtDc8wJJh/fvKXs=
</data>
<key>icudtl.dat</key>
<data>
cjDelfr3ugTDn3+r5icq6Ge1n4Q=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/Flutter.h</key>
<dict>
<key>hash</key>
<data>
LQBk1GD+u1YEANQovLVv2R/uUag=
</data>
<key>hash2</key>
<data>
8ZWbAXinM+GRkpUfLzcvsat4nccJ7ZNgGrAhy0iglXs=
</data>
</dict>
<key>Headers/FlutterAppDelegate.h</key>
<dict>
<key>hash</key>
<data>
VQRY5CUL6CLzdXzfScbDvTdpElA=
</data>
<key>hash2</key>
<data>
TYSAedf2/9SM/60199M+eUXHFYq5f85akCVmksptiNg=
</data>
</dict>
<key>Headers/FlutterBinaryMessenger.h</key>
<dict>
<key>hash</key>
<data>
3TKVS3KoBmkupZxin9YbnrPtMCk=
</data>
<key>hash2</key>
<data>
USlivwosbaNJJAtX2mpOdBVwZE9osgj/I3NnC9DCS04=
</data>
</dict>
<key>Headers/FlutterCallbackCache.h</key>
<dict>
<key>hash</key>
<data>
v6UEJmd8GTKddiiNFrVRsY9DAZo=
</data>
<key>hash2</key>
<data>
5i4mQAU2+ZEryb3POeTu9hkEM1IZkS/uLLxqLrcXRv0=
</data>
</dict>
<key>Headers/FlutterChannels.h</key>
<dict>
<key>hash</key>
<data>
VA9uQqBQMxHCYJHnGCv1UPch4S0=
</data>
<key>hash2</key>
<data>
Vjqn7PZHV00y0Cwe+UNlt+OGrzooaDBa5tZfqKvrAIY=
</data>
</dict>
<key>Headers/FlutterCodecs.h</key>
<dict>
<key>hash</key>
<data>
/PGN0simzUo4u/YhIKuBq/r8rww=
</data>
<key>hash2</key>
<data>
GbPPDQfdsjagMceW1kC1jPNF+b4DsZJtbTzbB4ohtR8=
</data>
</dict>
<key>Headers/FlutterDartProject.h</key>
<dict>
<key>hash</key>
<data>
buhHk6WXrZ6JBOHQgjXCYITi+xU=
</data>
<key>hash2</key>
<data>
CH/IbvOeuO5i1POUHyFrDUlrdIiZzHMN54RPuzGXxPE=
</data>
</dict>
<key>Headers/FlutterEngine.h</key>
<dict>
<key>hash</key>
<data>
AdZsTJVwLyqWvLg0GGXL63DxLwA=
</data>
<key>hash2</key>
<data>
JhX0RJjHUfm6ThgTGwDCcmK1+Z9dMlnv9Jiq0jCSIUw=
</data>
</dict>
<key>Headers/FlutterHeadlessDartRunner.h</key>
<dict>
<key>hash</key>
<data>
M8/dhQH3VcQVHupUxQ1dGsbG3Ek=
</data>
<key>hash2</key>
<data>
2LUPyCMVHwKeIFZP9I5vV64Kl7unE39yisrUZVrUiVo=
</data>
</dict>
<key>Headers/FlutterMacros.h</key>
<dict>
<key>hash</key>
<data>
Ez4684e7XzQ8vidzmRvJh3qCNxk=
</data>
<key>hash2</key>
<data>
Lkv4JVLTujcNJRJvmOh5VX+fZHuEvj7MAwT8cSOlJnc=
</data>
</dict>
<key>Headers/FlutterPlatformViews.h</key>
<dict>
<key>hash</key>
<data>
14j1xmP4V+DT37g/he3ZhpoeOig=
</data>
<key>hash2</key>
<data>
WtX5LuTXzU9cYk6a/IwuJNP7tIvt2/I+sFiRK1SryNg=
</data>
</dict>
<key>Headers/FlutterPlugin.h</key>
<dict>
<key>hash</key>
<data>
maoHSos7SW7cnlOzz+gFyKQiG/s=
</data>
<key>hash2</key>
<data>
zVbxlG7MdrPSwtAajDCXzGiZsYEfvRpPlva7i1yMjUk=
</data>
</dict>
<key>Headers/FlutterPluginAppLifeCycleDelegate.h</key>
<dict>
<key>hash</key>
<data>
gctJ/r455gE8/rQYDs4lB3RUOkI=
</data>
<key>hash2</key>
<data>
0NeMhrK4y2kLHg0c8MGwANiCI5BUXUcz6iisREtmIuQ=
</data>
</dict>
<key>Headers/FlutterTexture.h</key>
<dict>
<key>hash</key>
<data>
1LdQETkD4xmsSZETVBywMxxLPwM=
</data>
<key>hash2</key>
<data>
7BCnkj4wcr2olEbhMVyuYZSgMXDx0XpJQ6/WdwMLdmE=
</data>
</dict>
<key>Headers/FlutterViewController.h</key>
<dict>
<key>hash</key>
<data>
1iNZtmSzviLXO3AyP98IfgOStLs=
</data>
<key>hash2</key>
<data>
LWq4OdgIuM3854RYisDOh7XYZtEB4HOm46p6QJ7WOdg=
</data>
</dict>
<key>Modules/module.modulemap</key>
<dict>
<key>hash</key>
<data>
wJV5dCKEGl+FAtDc8wJJh/fvKXs=
</data>
<key>hash2</key>
<data>
0VjriRpZ7AZZaP/0mMAPMJPhi6LoMB4MhXzL5j24tGs=
</data>
</dict>
<key>icudtl.dat</key>
<dict>
<key>hash</key>
<data>
cjDelfr3ugTDn3+r5icq6Ge1n4Q=
</data>
<key>hash2</key>
<data>
INkC1JLiLe7AB9SqeZRmj6oaRlkPwCvM96J3pilvsnc=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
// This is a generated file; do not edit or check into version control. // This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/apple/Applications/flutter FLUTTER_ROOT=/Users/apple/Downloads/flutter
FLUTTER_APPLICATION_PATH=/Users/user/work/gmalpha_flutter FLUTTER_APPLICATION_PATH=/Users/apple/lsy/gmalpha_flutter
FLUTTER_TARGET=lib/main.dart FLUTTER_TARGET=/Users/apple/lsy/gmalpha_flutter/lib/main.dart
FLUTTER_BUILD_DIR=build FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build/ios SYMROOT=${SOURCE_ROOT}/../build/ios
FLUTTER_FRAMEWORK_DIR=/Users/apple/Applications/flutter/bin/cache/artifacts/engine/ios FLUTTER_FRAMEWORK_DIR=/Users/apple/Downloads/flutter/bin/cache/artifacts/engine/ios
FLUTTER_BUILD_NAME=1.0.0 FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1 FLUTTER_BUILD_NUMBER=1
TRACK_WIDGET_CREATION=true
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
#!/bin/sh #!/bin/sh
# This is a generated file; do not edit or check into version control. # This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/apple/Applications/flutter" export "FLUTTER_ROOT=/Users/apple/Downloads/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/user/work/gmalpha_flutter" export "FLUTTER_APPLICATION_PATH=/Users/apple/lsy/gmalpha_flutter"
export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_TARGET=/Users/apple/lsy/gmalpha_flutter/lib/main.dart"
export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios" export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_FRAMEWORK_DIR=/Users/apple/Applications/flutter/bin/cache/artifacts/engine/ios" export "FLUTTER_FRAMEWORK_DIR=/Users/apple/Downloads/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1" export "FLUTTER_BUILD_NUMBER=1"
export "TRACK_WIDGET_CREATION=true"
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
PODS:
- Flutter (1.0.0)
- flutter_boost (0.0.1):
- Flutter
- xservice_kit
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- gengmei_flutter_plugin (0.0.1):
- Flutter
- path_provider (0.0.1):
- Flutter
- sqflite (0.0.1):
- Flutter
- FMDB (~> 2.7.2)
- xservice_kit (0.0.1):
- Flutter
DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`)
- flutter_boost (from `.symlinks/plugins/flutter_boost/ios`)
- gengmei_flutter_plugin (from `.symlinks/plugins/gengmei_flutter_plugin/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- xservice_kit (from `.symlinks/plugins/xservice_kit/ios`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- FMDB
EXTERNAL SOURCES:
Flutter:
:path: ".symlinks/flutter/ios"
flutter_boost:
:path: ".symlinks/plugins/flutter_boost/ios"
gengmei_flutter_plugin:
:path: ".symlinks/plugins/gengmei_flutter_plugin/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
xservice_kit:
:path: ".symlinks/plugins/xservice_kit/ios"
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_boost: 0e85ea37c74ed39ee7b91a35612afa1605557484
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
gengmei_flutter_plugin: 9461e8644c06c4a0e38292ddcca1cc55e6ac6156
path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259
sqflite: ff1d9da63c06588cc8d1faf7256d741f16989d5a
xservice_kit: a2f1b35addc126fce8687aeb183ab0c1ada5b7f3
PODFILE CHECKSUM: 7fb83752f59ead6285236625b82473f90b1cb932
COCOAPODS: 1.7.4
If you are using FMDB in your project, I'd love to hear about it. Let Gus know
by sending an email to gus@flyingmeat.com.
And if you happen to come across either Gus Mueller or Rob Ryan in a bar, you
might consider purchasing a drink of their choosing if FMDB has been useful to
you.
Finally, and shortly, this is the MIT License.
Copyright (c) 2008-2014 Flying Meat Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
\ No newline at end of file
This diff is collapsed.
#import <Foundation/Foundation.h>
FOUNDATION_EXPORT double FMDBVersionNumber;
FOUNDATION_EXPORT const unsigned char FMDBVersionString[];
#import "FMDatabase.h"
#import "FMResultSet.h"
#import "FMDatabaseAdditions.h"
#import "FMDatabaseQueue.h"
#import "FMDatabasePool.h"
This diff is collapsed.
This diff is collapsed.
//
// FMDatabaseAdditions.h
// fmdb
//
// Created by August Mueller on 10/30/05.
// Copyright 2005 Flying Meat Inc.. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "FMDatabase.h"
NS_ASSUME_NONNULL_BEGIN
/** Category of additions for `<FMDatabase>` class.
### See also
- `<FMDatabase>`
*/
@interface FMDatabase (FMDatabaseAdditions)
///----------------------------------------
/// @name Return results of SQL to variable
///----------------------------------------
/** Return `int` value for query
@param query The SQL query to be performed.
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
@return `int` value.
@note This is not available from Swift.
*/
- (int)intForQuery:(NSString*)query, ...;
/** Return `long` value for query
@param query The SQL query to be performed.
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
@return `long` value.
@note This is not available from Swift.
*/
- (long)longForQuery:(NSString*)query, ...;
/** Return `BOOL` value for query
@param query The SQL query to be performed.
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
@return `BOOL` value.
@note This is not available from Swift.
*/
- (BOOL)boolForQuery:(NSString*)query, ...;
/** Return `double` value for query
@param query The SQL query to be performed.
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
@return `double` value.
@note This is not available from Swift.
*/
- (double)doubleForQuery:(NSString*)query, ...;
/** Return `NSString` value for query
@param query The SQL query to be performed.
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
@return `NSString` value.
@note This is not available from Swift.
*/
- (NSString * _Nullable)stringForQuery:(NSString*)query, ...;
/** Return `NSData` value for query
@param query The SQL query to be performed.
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
@return `NSData` value.
@note This is not available from Swift.
*/
- (NSData * _Nullable)dataForQuery:(NSString*)query, ...;
/** Return `NSDate` value for query
@param query The SQL query to be performed.
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
@return `NSDate` value.
@note This is not available from Swift.
*/
- (NSDate * _Nullable)dateForQuery:(NSString*)query, ...;
// Notice that there's no dataNoCopyForQuery:.
// That would be a bad idea, because we close out the result set, and then what
// happens to the data that we just didn't copy? Who knows, not I.
///--------------------------------
/// @name Schema related operations
///--------------------------------
/** Does table exist in database?
@param tableName The name of the table being looked for.
@return `YES` if table found; `NO` if not found.
*/
- (BOOL)tableExists:(NSString*)tableName;
/** The schema of the database.
This will be the schema for the entire database. For each entity, each row of the result set will include the following fields:
- `type` - The type of entity (e.g. table, index, view, or trigger)
- `name` - The name of the object
- `tbl_name` - The name of the table to which the object references
- `rootpage` - The page number of the root b-tree page for tables and indices
- `sql` - The SQL that created the entity
@return `FMResultSet` of schema; `nil` on error.
@see [SQLite File Format](http://www.sqlite.org/fileformat.html)
*/
- (FMResultSet * _Nullable)getSchema;
/** The schema of the database.
This will be the schema for a particular table as report by SQLite `PRAGMA`, for example:
PRAGMA table_info('employees')
This will report:
- `cid` - The column ID number
- `name` - The name of the column
- `type` - The data type specified for the column
- `notnull` - whether the field is defined as NOT NULL (i.e. values required)
- `dflt_value` - The default value for the column
- `pk` - Whether the field is part of the primary key of the table
@param tableName The name of the table for whom the schema will be returned.
@return `FMResultSet` of schema; `nil` on error.
@see [table_info](http://www.sqlite.org/pragma.html#pragma_table_info)
*/
- (FMResultSet * _Nullable)getTableSchema:(NSString*)tableName;
/** Test to see if particular column exists for particular table in database
@param columnName The name of the column.
@param tableName The name of the table.
@return `YES` if column exists in table in question; `NO` otherwise.
*/
- (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName;
/** Test to see if particular column exists for particular table in database
@param columnName The name of the column.
@param tableName The name of the table.
@return `YES` if column exists in table in question; `NO` otherwise.
@see columnExists:inTableWithName:
@warning Deprecated - use `<columnExists:inTableWithName:>` instead.
*/
- (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __deprecated_msg("Use columnExists:inTableWithName: instead");
/** Validate SQL statement
This validates SQL statement by performing `sqlite3_prepare_v2`, but not returning the results, but instead immediately calling `sqlite3_finalize`.
@param sql The SQL statement being validated.
@param error This is a pointer to a `NSError` object that will receive the autoreleased `NSError` object if there was any error. If this is `nil`, no `NSError` result will be returned.
@return `YES` if validation succeeded without incident; `NO` otherwise.
*/
- (BOOL)validateSQL:(NSString*)sql error:(NSError * _Nullable *)error;
///-----------------------------------
/// @name Application identifier tasks
///-----------------------------------
/** Retrieve application ID
@return The `uint32_t` numeric value of the application ID.
@see setApplicationID:
*/
@property (nonatomic) uint32_t applicationID;
#if TARGET_OS_MAC && !TARGET_OS_IPHONE
/** Retrieve application ID string
@see setApplicationIDString:
*/
@property (nonatomic, retain) NSString *applicationIDString;
#endif
///-----------------------------------
/// @name user version identifier tasks
///-----------------------------------
/** Retrieve user version
@see setUserVersion:
*/
@property (nonatomic) uint32_t userVersion;
@end
NS_ASSUME_NONNULL_END
//
// FMDatabaseAdditions.m
// fmdb
//
// Created by August Mueller on 10/30/05.
// Copyright 2005 Flying Meat Inc.. All rights reserved.
//
#import "FMDatabase.h"
#import "FMDatabaseAdditions.h"
#import "TargetConditionals.h"
#if FMDB_SQLITE_STANDALONE
#import <sqlite3/sqlite3.h>
#else
#import <sqlite3.h>
#endif
@interface FMDatabase (PrivateStuff)
- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray * _Nullable)arrayArgs orDictionary:(NSDictionary * _Nullable)dictionaryArgs orVAList:(va_list)args;
@end
@implementation FMDatabase (FMDatabaseAdditions)
#define RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(type, sel) \
va_list args; \
va_start(args, query); \
FMResultSet *resultSet = [self executeQuery:query withArgumentsInArray:0x00 orDictionary:0x00 orVAList:args]; \
va_end(args); \
if (![resultSet next]) { return (type)0; } \
type ret = [resultSet sel:0]; \
[resultSet close]; \
[resultSet setParentDB:nil]; \
return ret;
- (NSString *)stringForQuery:(NSString*)query, ... {
RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(NSString *, stringForColumnIndex);
}
- (int)intForQuery:(NSString*)query, ... {
RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(int, intForColumnIndex);
}
- (long)longForQuery:(NSString*)query, ... {
RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(long, longForColumnIndex);
}
- (BOOL)boolForQuery:(NSString*)query, ... {
RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(BOOL, boolForColumnIndex);
}
- (double)doubleForQuery:(NSString*)query, ... {
RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(double, doubleForColumnIndex);
}
- (NSData*)dataForQuery:(NSString*)query, ... {
RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(NSData *, dataForColumnIndex);
}
- (NSDate*)dateForQuery:(NSString*)query, ... {
RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(NSDate *, dateForColumnIndex);
}
- (BOOL)tableExists:(NSString*)tableName {
tableName = [tableName lowercaseString];
FMResultSet *rs = [self executeQuery:@"select [sql] from sqlite_master where [type] = 'table' and lower(name) = ?", tableName];
//if at least one next exists, table exists
BOOL returnBool = [rs next];
//close and free object
[rs close];
return returnBool;
}
/*
get table with list of tables: result colums: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING]
check if table exist in database (patch from OZLB)
*/
- (FMResultSet * _Nullable)getSchema {
//result colums: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING]
FMResultSet *rs = [self executeQuery:@"SELECT type, name, tbl_name, rootpage, sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type != 'meta' AND name NOT LIKE 'sqlite_%' ORDER BY tbl_name, type DESC, name"];
return rs;
}
/*
get table schema: result colums: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER]
*/
- (FMResultSet * _Nullable)getTableSchema:(NSString*)tableName {
//result colums: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER]
FMResultSet *rs = [self executeQuery:[NSString stringWithFormat: @"pragma table_info('%@')", tableName]];
return rs;
}
- (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName {
BOOL returnBool = NO;
tableName = [tableName lowercaseString];
columnName = [columnName lowercaseString];
FMResultSet *rs = [self getTableSchema:tableName];
//check if column is present in table schema
while ([rs next]) {
if ([[[rs stringForColumn:@"name"] lowercaseString] isEqualToString:columnName]) {
returnBool = YES;
break;
}
}
//If this is not done FMDatabase instance stays out of pool
[rs close];
return returnBool;
}
- (uint32_t)applicationID {
#if SQLITE_VERSION_NUMBER >= 3007017
uint32_t r = 0;
FMResultSet *rs = [self executeQuery:@"pragma application_id"];
if ([rs next]) {
r = (uint32_t)[rs longLongIntForColumnIndex:0];
}
[rs close];
return r;
#else
NSString *errorMessage = NSLocalizedStringFromTable(@"Application ID functions require SQLite 3.7.17", @"FMDB", nil);
if (self.logsErrors) NSLog(@"%@", errorMessage);
return 0;
#endif
}
- (void)setApplicationID:(uint32_t)appID {
#if SQLITE_VERSION_NUMBER >= 3007017
NSString *query = [NSString stringWithFormat:@"pragma application_id=%d", appID];
FMResultSet *rs = [self executeQuery:query];
[rs next];
[rs close];
#else
NSString *errorMessage = NSLocalizedStringFromTable(@"Application ID functions require SQLite 3.7.17", @"FMDB", nil);
if (self.logsErrors) NSLog(@"%@", errorMessage);
#endif
}
#if TARGET_OS_MAC && !TARGET_OS_IPHONE
- (NSString*)applicationIDString {
#if SQLITE_VERSION_NUMBER >= 3007017
NSString *s = NSFileTypeForHFSTypeCode([self applicationID]);
assert([s length] == 6);
s = [s substringWithRange:NSMakeRange(1, 4)];
return s;
#else
NSString *errorMessage = NSLocalizedStringFromTable(@"Application ID functions require SQLite 3.7.17", @"FMDB", nil);
if (self.logsErrors) NSLog(@"%@", errorMessage);
return nil;
#endif
}
- (void)setApplicationIDString:(NSString*)s {
#if SQLITE_VERSION_NUMBER >= 3007017
if ([s length] != 4) {
NSLog(@"setApplicationIDString: string passed is not exactly 4 chars long. (was %ld)", [s length]);
}
[self setApplicationID:NSHFSTypeCodeFromFileType([NSString stringWithFormat:@"'%@'", s])];
#else
NSString *errorMessage = NSLocalizedStringFromTable(@"Application ID functions require SQLite 3.7.17", @"FMDB", nil);
if (self.logsErrors) NSLog(@"%@", errorMessage);
#endif
}
#endif
- (uint32_t)userVersion {
uint32_t r = 0;
FMResultSet *rs = [self executeQuery:@"pragma user_version"];
if ([rs next]) {
r = (uint32_t)[rs longLongIntForColumnIndex:0];
}
[rs close];
return r;
}
- (void)setUserVersion:(uint32_t)version {
NSString *query = [NSString stringWithFormat:@"pragma user_version = %d", version];
FMResultSet *rs = [self executeQuery:query];
[rs next];
[rs close];
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __attribute__ ((deprecated)) {
return [self columnExists:columnName inTableWithName:tableName];
}
#pragma clang diagnostic pop
- (BOOL)validateSQL:(NSString*)sql error:(NSError**)error {
sqlite3_stmt *pStmt = NULL;
BOOL validationSucceeded = YES;
int rc = sqlite3_prepare_v2([self sqliteHandle], [sql UTF8String], -1, &pStmt, 0);
if (rc != SQLITE_OK) {
validationSucceeded = NO;
if (error) {
*error = [NSError errorWithDomain:NSCocoaErrorDomain
code:[self lastErrorCode]
userInfo:[NSDictionary dictionaryWithObject:[self lastErrorMessage]
forKey:NSLocalizedDescriptionKey]];
}
}
sqlite3_finalize(pStmt);
return validationSucceeded;
}
@end
//
// FMDatabasePool.h
// fmdb
//
// Created by August Mueller on 6/22/11.
// Copyright 2011 Flying Meat Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class FMDatabase;
/** Pool of `<FMDatabase>` objects.
### See also
- `<FMDatabaseQueue>`
- `<FMDatabase>`
@warning Before using `FMDatabasePool`, please consider using `<FMDatabaseQueue>` instead.
If you really really really know what you're doing and `FMDatabasePool` is what
you really really need (ie, you're using a read only database), OK you can use
it. But just be careful not to deadlock!
For an example on deadlocking, search for:
`ONLY_USE_THE_POOL_IF_YOU_ARE_DOING_READS_OTHERWISE_YOULL_DEADLOCK_USE_FMDATABASEQUEUE_INSTEAD`
in the main.m file.
*/
@interface FMDatabasePool : NSObject
/** Database path */
@property (atomic, copy, nullable) NSString *path;
/** Delegate object */
@property (atomic, assign, nullable) id delegate;
/** Maximum number of databases to create */
@property (atomic, assign) NSUInteger maximumNumberOfDatabasesToCreate;
/** Open flags */
@property (atomic, readonly) int openFlags;
/** Custom virtual file system name */
@property (atomic, copy, nullable) NSString *vfsName;
///---------------------
/// @name Initialization
///---------------------
/** Create pool using path.
@param aPath The file path of the database.
@return The `FMDatabasePool` object. `nil` on error.
*/
+ (instancetype)databasePoolWithPath:(NSString * _Nullable)aPath;
/** Create pool using file URL.
@param url The file `NSURL` of the database.
@return The `FMDatabasePool` object. `nil` on error.
*/
+ (instancetype)databasePoolWithURL:(NSURL * _Nullable)url;
/** Create pool using path and specified flags
@param aPath The file path of the database.
@param openFlags Flags passed to the openWithFlags method of the database.
@return The `FMDatabasePool` object. `nil` on error.
*/
+ (instancetype)databasePoolWithPath:(NSString * _Nullable)aPath flags:(int)openFlags;
/** Create pool using file URL and specified flags
@param url The file `NSURL` of the database.
@param openFlags Flags passed to the openWithFlags method of the database.
@return The `FMDatabasePool` object. `nil` on error.
*/
+ (instancetype)databasePoolWithURL:(NSURL * _Nullable)url flags:(int)openFlags;
/** Create pool using path.
@param aPath The file path of the database.
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithPath:(NSString * _Nullable)aPath;
/** Create pool using file URL.
@param url The file `NSURL of the database.
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url;
/** Create pool using path and specified flags.
@param aPath The file path of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithPath:(NSString * _Nullable)aPath flags:(int)openFlags;
/** Create pool using file URL and specified flags.
@param url The file `NSURL` of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url flags:(int)openFlags;
/** Create pool using path and specified flags.
@param aPath The file path of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@param vfsName The name of a custom virtual file system
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithPath:(NSString * _Nullable)aPath flags:(int)openFlags vfs:(NSString * _Nullable)vfsName;
/** Create pool using file URL and specified flags.
@param url The file `NSURL` of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@param vfsName The name of a custom virtual file system
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url flags:(int)openFlags vfs:(NSString * _Nullable)vfsName;
/** Returns the Class of 'FMDatabase' subclass, that will be used to instantiate database object.
Subclasses can override this method to return specified Class of 'FMDatabase' subclass.
@return The Class of 'FMDatabase' subclass, that will be used to instantiate database object.
*/
+ (Class)databaseClass;
///------------------------------------------------
/// @name Keeping track of checked in/out databases
///------------------------------------------------
/** Number of checked-in databases in pool
*/
@property (nonatomic, readonly) NSUInteger countOfCheckedInDatabases;
/** Number of checked-out databases in pool
*/
@property (nonatomic, readonly) NSUInteger countOfCheckedOutDatabases;
/** Total number of databases in pool
*/
@property (nonatomic, readonly) NSUInteger countOfOpenDatabases;
/** Release all databases in pool */
- (void)releaseAllDatabases;
///------------------------------------------
/// @name Perform database operations in pool
///------------------------------------------
/** Synchronously perform database operations in pool.
@param block The code to be run on the `FMDatabasePool` pool.
*/
- (void)inDatabase:(__attribute__((noescape)) void (^)(FMDatabase *db))block;
/** Synchronously perform database operations in pool using transaction.
@param block The code to be run on the `FMDatabasePool` pool.
@warning Unlike SQLite's `BEGIN TRANSACTION`, this method currently performs
an exclusive transaction, not a deferred transaction. This behavior
is likely to change in future versions of FMDB, whereby this method
will likely eventually adopt standard SQLite behavior and perform
deferred transactions. If you really need exclusive tranaction, it is
recommended that you use `inExclusiveTransaction`, instead, not only
to make your intent explicit, but also to future-proof your code.
*/
- (void)inTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
/** Synchronously perform database operations in pool using exclusive transaction.
@param block The code to be run on the `FMDatabasePool` pool.
*/
- (void)inExclusiveTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
/** Synchronously perform database operations in pool using deferred transaction.
@param block The code to be run on the `FMDatabasePool` pool.
*/
- (void)inDeferredTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
/** Synchronously perform database operations on queue, using immediate transactions.
@param block The code to be run on the queue of `FMDatabaseQueue`
*/
- (void)inImmediateTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
/** Synchronously perform database operations in pool using save point.
@param block The code to be run on the `FMDatabasePool` pool.
@return `NSError` object if error; `nil` if successful.
@warning You can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock. If you need to nest, use `<[FMDatabase startSavePointWithName:error:]>` instead.
*/
- (NSError * _Nullable)inSavePoint:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
@end
/** FMDatabasePool delegate category
This is a category that defines the protocol for the FMDatabasePool delegate
*/
@interface NSObject (FMDatabasePoolDelegate)
/** Asks the delegate whether database should be added to the pool.
@param pool The `FMDatabasePool` object.
@param database The `FMDatabase` object.
@return `YES` if it should add database to pool; `NO` if not.
*/
- (BOOL)databasePool:(FMDatabasePool*)pool shouldAddDatabaseToPool:(FMDatabase*)database;
/** Tells the delegate that database was added to the pool.
@param pool The `FMDatabasePool` object.
@param database The `FMDatabase` object.
*/
- (void)databasePool:(FMDatabasePool*)pool didAddDatabase:(FMDatabase*)database;
@end
NS_ASSUME_NONNULL_END
//
// FMDatabasePool.m
// fmdb
//
// Created by August Mueller on 6/22/11.
// Copyright 2011 Flying Meat Inc. All rights reserved.
//
#if FMDB_SQLITE_STANDALONE
#import <sqlite3/sqlite3.h>
#else
#import <sqlite3.h>
#endif
#import "FMDatabasePool.h"
#import "FMDatabase.h"
typedef NS_ENUM(NSInteger, FMDBTransaction) {
FMDBTransactionExclusive,
FMDBTransactionDeferred,
FMDBTransactionImmediate,
};
@interface FMDatabasePool () {
dispatch_queue_t _lockQueue;
NSMutableArray *_databaseInPool;
NSMutableArray *_databaseOutPool;
}
- (void)pushDatabaseBackInPool:(FMDatabase*)db;
- (FMDatabase*)db;
@end
@implementation FMDatabasePool
@synthesize path=_path;
@synthesize delegate=_delegate;
@synthesize maximumNumberOfDatabasesToCreate=_maximumNumberOfDatabasesToCreate;
@synthesize openFlags=_openFlags;
+ (instancetype)databasePoolWithPath:(NSString *)aPath {
return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]);
}
+ (instancetype)databasePoolWithURL:(NSURL *)url {
return FMDBReturnAutoreleased([[self alloc] initWithPath:url.path]);
}
+ (instancetype)databasePoolWithPath:(NSString *)aPath flags:(int)openFlags {
return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath flags:openFlags]);
}
+ (instancetype)databasePoolWithURL:(NSURL *)url flags:(int)openFlags {
return FMDBReturnAutoreleased([[self alloc] initWithPath:url.path flags:openFlags]);
}
- (instancetype)initWithURL:(NSURL *)url flags:(int)openFlags vfs:(NSString *)vfsName {
return [self initWithPath:url.path flags:openFlags vfs:vfsName];
}
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName {
self = [super init];
if (self != nil) {
_path = [aPath copy];
_lockQueue = dispatch_queue_create([[NSString stringWithFormat:@"fmdb.%@", self] UTF8String], NULL);
_databaseInPool = FMDBReturnRetained([NSMutableArray array]);
_databaseOutPool = FMDBReturnRetained([NSMutableArray array]);
_openFlags = openFlags;
_vfsName = [vfsName copy];
}
return self;
}
- (instancetype)initWithPath:(NSString *)aPath flags:(int)openFlags {
return [self initWithPath:aPath flags:openFlags vfs:nil];
}
- (instancetype)initWithURL:(NSURL *)url flags:(int)openFlags {
return [self initWithPath:url.path flags:openFlags vfs:nil];
}
- (instancetype)initWithPath:(NSString*)aPath {
// default flags for sqlite3_open
return [self initWithPath:aPath flags:SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE];
}
- (instancetype)initWithURL:(NSURL *)url {
return [self initWithPath:url.path];
}
- (instancetype)init {
return [self initWithPath:nil];
}
+ (Class)databaseClass {
return [FMDatabase class];
}
- (void)dealloc {
_delegate = 0x00;
FMDBRelease(_path);
FMDBRelease(_databaseInPool);
FMDBRelease(_databaseOutPool);
FMDBRelease(_vfsName);
if (_lockQueue) {
FMDBDispatchQueueRelease(_lockQueue);
_lockQueue = 0x00;
}
#if ! __has_feature(objc_arc)
[super dealloc];
#endif
}
- (void)executeLocked:(void (^)(void))aBlock {
dispatch_sync(_lockQueue, aBlock);
}
- (void)pushDatabaseBackInPool:(FMDatabase*)db {
if (!db) { // db can be null if we set an upper bound on the # of databases to create.
return;
}
[self executeLocked:^() {
if ([self->_databaseInPool containsObject:db]) {
[[NSException exceptionWithName:@"Database already in pool" reason:@"The FMDatabase being put back into the pool is already present in the pool" userInfo:nil] raise];
}
[self->_databaseInPool addObject:db];
[self->_databaseOutPool removeObject:db];
}];
}
- (FMDatabase*)db {
__block FMDatabase *db;
[self executeLocked:^() {
db = [self->_databaseInPool lastObject];
BOOL shouldNotifyDelegate = NO;
if (db) {
[self->_databaseOutPool addObject:db];
[self->_databaseInPool removeLastObject];
}
else {
if (self->_maximumNumberOfDatabasesToCreate) {
NSUInteger currentCount = [self->_databaseOutPool count] + [self->_databaseInPool count];
if (currentCount >= self->_maximumNumberOfDatabasesToCreate) {
NSLog(@"Maximum number of databases (%ld) has already been reached!", (long)currentCount);
return;
}
}
db = [[[self class] databaseClass] databaseWithPath:self->_path];
shouldNotifyDelegate = YES;
}
//This ensures that the db is opened before returning
#if SQLITE_VERSION_NUMBER >= 3005000
BOOL success = [db openWithFlags:self->_openFlags vfs:self->_vfsName];
#else
BOOL success = [db open];
#endif
if (success) {
if ([self->_delegate respondsToSelector:@selector(databasePool:shouldAddDatabaseToPool:)] && ![self->_delegate databasePool:self shouldAddDatabaseToPool:db]) {
[db close];
db = 0x00;
}
else {
//It should not get added in the pool twice if lastObject was found
if (![self->_databaseOutPool containsObject:db]) {
[self->_databaseOutPool addObject:db];
if (shouldNotifyDelegate && [self->_delegate respondsToSelector:@selector(databasePool:didAddDatabase:)]) {
[self->_delegate databasePool:self didAddDatabase:db];
}
}
}
}
else {
NSLog(@"Could not open up the database at path %@", self->_path);
db = 0x00;
}
}];
return db;
}
- (NSUInteger)countOfCheckedInDatabases {
__block NSUInteger count;
[self executeLocked:^() {
count = [self->_databaseInPool count];
}];
return count;
}
- (NSUInteger)countOfCheckedOutDatabases {
__block NSUInteger count;
[self executeLocked:^() {
count = [self->_databaseOutPool count];
}];
return count;
}
- (NSUInteger)countOfOpenDatabases {
__block NSUInteger count;
[self executeLocked:^() {
count = [self->_databaseOutPool count] + [self->_databaseInPool count];
}];
return count;
}
- (void)releaseAllDatabases {
[self executeLocked:^() {
[self->_databaseOutPool removeAllObjects];
[self->_databaseInPool removeAllObjects];
}];
}
- (void)inDatabase:(__attribute__((noescape)) void (^)(FMDatabase *db))block {
FMDatabase *db = [self db];
block(db);
[self pushDatabaseBackInPool:db];
}
- (void)beginTransaction:(FMDBTransaction)transaction withBlock:(void (^)(FMDatabase *db, BOOL *rollback))block {
BOOL shouldRollback = NO;
FMDatabase *db = [self db];
switch (transaction) {
case FMDBTransactionExclusive:
[db beginTransaction];
break;
case FMDBTransactionDeferred:
[db beginDeferredTransaction];
break;
case FMDBTransactionImmediate:
[db beginImmediateTransaction];
break;
}
block(db, &shouldRollback);
if (shouldRollback) {
[db rollback];
}
else {
[db commit];
}
[self pushDatabaseBackInPool:db];
}
- (void)inTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block {
[self beginTransaction:FMDBTransactionExclusive withBlock:block];
}
- (void)inDeferredTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block {
[self beginTransaction:FMDBTransactionDeferred withBlock:block];
}
- (void)inExclusiveTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block {
[self beginTransaction:FMDBTransactionExclusive withBlock:block];
}
- (void)inImmediateTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block {
[self beginTransaction:FMDBTransactionImmediate withBlock:block];
}
- (NSError*)inSavePoint:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block {
#if SQLITE_VERSION_NUMBER >= 3007000
static unsigned long savePointIdx = 0;
NSString *name = [NSString stringWithFormat:@"savePoint%ld", savePointIdx++];
BOOL shouldRollback = NO;
FMDatabase *db = [self db];
NSError *err = 0x00;
if (![db startSavePointWithName:name error:&err]) {
[self pushDatabaseBackInPool:db];
return err;
}
block(db, &shouldRollback);
if (shouldRollback) {
// We need to rollback and release this savepoint to remove it
[db rollbackToSavePointWithName:name error:&err];
}
[db releaseSavePointWithName:name error:&err];
[self pushDatabaseBackInPool:db];
return err;
#else
NSString *errorMessage = NSLocalizedStringFromTable(@"Save point functions require SQLite 3.7", @"FMDB", nil);
if (self.logsErrors) NSLog(@"%@", errorMessage);
return [NSError errorWithDomain:@"FMDatabase" code:0 userInfo:@{NSLocalizedDescriptionKey : errorMessage}];
#endif
}
@end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
../../../FMDB/src/fmdb/FMDB.h
\ No newline at end of file
../../../FMDB/src/fmdb/FMDatabase.h
\ No newline at end of file
../../../FMDB/src/fmdb/FMDatabaseAdditions.h
\ No newline at end of file
../../../FMDB/src/fmdb/FMDatabasePool.h
\ No newline at end of file
../../../FMDB/src/fmdb/FMDatabaseQueue.h
\ No newline at end of file
../../../FMDB/src/fmdb/FMResultSet.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Boost/FLBFlutterAppDelegate.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Boost/FLBFlutterApplication.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Adaptor/FLBFlutterEngine.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Adaptor/FLBFlutterEngineOld.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Container/FLBFlutterViewContainer.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Container/FLBFlutterViewContainerManager.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Adaptor/FLBFlutterViewControllerAdaptor.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Adaptor/FLBFlutterViewProvider.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Support/Memory/FLBMemoryInspector.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Boost/FLBPlatform.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Boost/FLBResultMediator.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Support/Cache/FLBStackCache.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Support/Cache/FLBStackCacheObjectImg.h
\ No newline at end of file
../../../../.symlinks/plugins/flutter_boost/ios/Classes/Container/FLBViewControllerResultHandler.h
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment