snapshot of https://github.com/flutter/samples.git (main, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Main Branch CI / Test Flutter beta on ubuntu-latest (push) Has been skipped
Main Branch CI / Test Flutter stable on ubuntu-latest (push) Has been skipped
Main Branch CI / Test Flutter beta on macos-latest (push) Has been cancelled
Main Branch CI / Test Flutter stable on macos-latest (push) Has been cancelled
Some checks failed
Main Branch CI / Test Flutter beta on ubuntu-latest (push) Has been skipped
Main Branch CI / Test Flutter stable on ubuntu-latest (push) Has been skipped
Main Branch CI / Test Flutter beta on macos-latest (push) Has been cancelled
Main Branch CI / Test Flutter stable on macos-latest (push) Has been cancelled
This commit is contained in:
2
add_to_app/books/ios_books/.gitignore
vendored
Normal file
2
add_to_app/books/ios_books/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
xcuserdata
|
||||
Pods
|
||||
438
add_to_app/books/ios_books/IosBooks.xcodeproj/project.pbxproj
Normal file
438
add_to_app/books/ios_books/IosBooks.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,438 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
00365BF7846F71A1052D8F66 /* Pods_IosBooks.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEE09DC86DF77B0A62A53D22 /* Pods_IosBooks.framework */; };
|
||||
0DDE4C3B25E0390700389930 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DDE4C3A25E0390700389930 /* AppDelegate.swift */; };
|
||||
0DDE4C3D25E0390700389930 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DDE4C3C25E0390700389930 /* SceneDelegate.swift */; };
|
||||
0DDE4C3F25E0390700389930 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DDE4C3E25E0390700389930 /* ViewController.swift */; };
|
||||
0DDE4C4225E0390700389930 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0DDE4C4025E0390700389930 /* Main.storyboard */; };
|
||||
0DDE4C4425E0390700389930 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0DDE4C4325E0390700389930 /* Assets.xcassets */; };
|
||||
0DDE4C4725E0390700389930 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0DDE4C4525E0390700389930 /* LaunchScreen.storyboard */; };
|
||||
0DDE4C5725E041B700389930 /* BookCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DDE4C5625E041B700389930 /* BookCell.swift */; };
|
||||
0DDE4C5C25E0752A00389930 /* api.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DDE4C5B25E0752A00389930 /* api.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0DDE4C3725E0390700389930 /* IosBooks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IosBooks.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0DDE4C3A25E0390700389930 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
0DDE4C3C25E0390700389930 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
|
||||
0DDE4C3E25E0390700389930 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
0DDE4C4125E0390700389930 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
0DDE4C4325E0390700389930 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
0DDE4C4625E0390700389930 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
0DDE4C4825E0390700389930 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
0DDE4C5625E041B700389930 /* BookCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookCell.swift; sourceTree = "<group>"; };
|
||||
0DDE4C5925E0752900389930 /* IosBooks-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "IosBooks-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
0DDE4C5A25E0752A00389930 /* api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = api.h; sourceTree = "<group>"; };
|
||||
0DDE4C5B25E0752A00389930 /* api.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = api.m; sourceTree = "<group>"; };
|
||||
18154B6C0196BC72EA210903 /* Pods-IosBooks.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IosBooks.release.xcconfig"; path = "Target Support Files/Pods-IosBooks/Pods-IosBooks.release.xcconfig"; sourceTree = "<group>"; };
|
||||
CC7F3EDAABB4C083AD5BFC47 /* Pods-IosBooks.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IosBooks.debug.xcconfig"; path = "Target Support Files/Pods-IosBooks/Pods-IosBooks.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
DEE09DC86DF77B0A62A53D22 /* Pods_IosBooks.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_IosBooks.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
0DDE4C3425E0390700389930 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
00365BF7846F71A1052D8F66 /* Pods_IosBooks.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
0DDE4C2E25E0390700389930 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0DDE4C3925E0390700389930 /* IosBooks */,
|
||||
0DDE4C3825E0390700389930 /* Products */,
|
||||
1CA615579663E7DAA193BE81 /* Pods */,
|
||||
4E1F60927412758AE8CBF737 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0DDE4C3825E0390700389930 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0DDE4C3725E0390700389930 /* IosBooks.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0DDE4C3925E0390700389930 /* IosBooks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0DDE4C5A25E0752A00389930 /* api.h */,
|
||||
0DDE4C5B25E0752A00389930 /* api.m */,
|
||||
0DDE4C3A25E0390700389930 /* AppDelegate.swift */,
|
||||
0DDE4C3C25E0390700389930 /* SceneDelegate.swift */,
|
||||
0DDE4C3E25E0390700389930 /* ViewController.swift */,
|
||||
0DDE4C4025E0390700389930 /* Main.storyboard */,
|
||||
0DDE4C4325E0390700389930 /* Assets.xcassets */,
|
||||
0DDE4C4525E0390700389930 /* LaunchScreen.storyboard */,
|
||||
0DDE4C4825E0390700389930 /* Info.plist */,
|
||||
0DDE4C5625E041B700389930 /* BookCell.swift */,
|
||||
0DDE4C5925E0752900389930 /* IosBooks-Bridging-Header.h */,
|
||||
);
|
||||
path = IosBooks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1CA615579663E7DAA193BE81 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CC7F3EDAABB4C083AD5BFC47 /* Pods-IosBooks.debug.xcconfig */,
|
||||
18154B6C0196BC72EA210903 /* Pods-IosBooks.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4E1F60927412758AE8CBF737 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DEE09DC86DF77B0A62A53D22 /* Pods_IosBooks.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
0DDE4C3625E0390700389930 /* IosBooks */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 0DDE4C4B25E0390700389930 /* Build configuration list for PBXNativeTarget "IosBooks" */;
|
||||
buildPhases = (
|
||||
10D6942EFE7900338BEA50F9 /* [CP] Check Pods Manifest.lock */,
|
||||
887B098B8DCF409FE0F1E164 /* [CP-User] Run Flutter Build flutter_module_books Script */,
|
||||
0DDE4C3325E0390700389930 /* Sources */,
|
||||
0DDE4C3425E0390700389930 /* Frameworks */,
|
||||
0DDE4C3525E0390700389930 /* Resources */,
|
||||
CA4628050A0CDB5CBFD737AD /* [CP-User] Embed Flutter Build flutter_module_books Script */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = IosBooks;
|
||||
productName = IosBooks;
|
||||
productReference = 0DDE4C3725E0390700389930 /* IosBooks.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
0DDE4C2F25E0390700389930 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1220;
|
||||
LastUpgradeCheck = 1220;
|
||||
TargetAttributes = {
|
||||
0DDE4C3625E0390700389930 = {
|
||||
CreatedOnToolsVersion = 12.2;
|
||||
LastSwiftMigration = 1220;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 0DDE4C3225E0390700389930 /* Build configuration list for PBXProject "IosBooks" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 0DDE4C2E25E0390700389930;
|
||||
productRefGroup = 0DDE4C3825E0390700389930 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
0DDE4C3625E0390700389930 /* IosBooks */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
0DDE4C3525E0390700389930 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0DDE4C4725E0390700389930 /* LaunchScreen.storyboard in Resources */,
|
||||
0DDE4C4425E0390700389930 /* Assets.xcassets in Resources */,
|
||||
0DDE4C4225E0390700389930 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
10D6942EFE7900338BEA50F9 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-IosBooks-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
887B098B8DCF409FE0F1E164 /* [CP-User] Run Flutter Build flutter_module_books Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
name = "[CP-User] Run Flutter Build flutter_module_books Script";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../flutter_module_books/.ios/Flutter/flutter_export_environment.sh\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build";
|
||||
};
|
||||
CA4628050A0CDB5CBFD737AD /* [CP-User] Embed Flutter Build flutter_module_books Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
name = "[CP-User] Embed Flutter Build flutter_module_books Script";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../flutter_module_books/.ios/Flutter/flutter_export_environment.sh\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh embed_and_thin";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
0DDE4C3325E0390700389930 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0DDE4C5725E041B700389930 /* BookCell.swift in Sources */,
|
||||
0DDE4C3F25E0390700389930 /* ViewController.swift in Sources */,
|
||||
0DDE4C5C25E0752A00389930 /* api.m in Sources */,
|
||||
0DDE4C3B25E0390700389930 /* AppDelegate.swift in Sources */,
|
||||
0DDE4C3D25E0390700389930 /* SceneDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
0DDE4C4025E0390700389930 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
0DDE4C4125E0390700389930 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0DDE4C4525E0390700389930 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
0DDE4C4625E0390700389930 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
0DDE4C4925E0390700389930 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
0DDE4C4A25E0390700389930 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
0DDE4C4C25E0390700389930 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = CC7F3EDAABB4C083AD5BFC47 /* Pods-IosBooks.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = IosBooks/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.samples.IosBooks;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "IosBooks/IosBooks-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
0DDE4C4D25E0390700389930 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 18154B6C0196BC72EA210903 /* Pods-IosBooks.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = IosBooks/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.samples.IosBooks;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "IosBooks/IosBooks-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
0DDE4C3225E0390700389930 /* Build configuration list for PBXProject "IosBooks" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
0DDE4C4925E0390700389930 /* Debug */,
|
||||
0DDE4C4A25E0390700389930 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
0DDE4C4B25E0390700389930 /* Build configuration list for PBXNativeTarget "IosBooks" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
0DDE4C4C25E0390700389930 /* Debug */,
|
||||
0DDE4C4D25E0390700389930 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 0DDE4C2F25E0390700389930 /* Project object */;
|
||||
}
|
||||
7
add_to_app/books/ios_books/IosBooks.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
add_to_app/books/ios_books/IosBooks.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?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>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1320"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0DDE4C3625E0390700389930"
|
||||
BuildableName = "IosBooks.app"
|
||||
BlueprintName = "IosBooks"
|
||||
ReferencedContainer = "container:IosBooks.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0DDE4C3625E0390700389930"
|
||||
BuildableName = "IosBooks.app"
|
||||
BlueprintName = "IosBooks"
|
||||
ReferencedContainer = "container:IosBooks.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0DDE4C3625E0390700389930"
|
||||
BuildableName = "IosBooks.app"
|
||||
BlueprintName = "IosBooks"
|
||||
ReferencedContainer = "container:IosBooks.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
10
add_to_app/books/ios_books/IosBooks.xcworkspace/contents.xcworkspacedata
generated
Normal file
10
add_to_app/books/ios_books/IosBooks.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:IosBooks.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?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>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
37
add_to_app/books/ios_books/IosBooks/AppDelegate.swift
Normal file
37
add_to_app/books/ios_books/IosBooks/AppDelegate.swift
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright 2020 The Flutter team. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import Flutter
|
||||
import UIKit
|
||||
|
||||
@main
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
lazy var engine: FlutterEngine = {
|
||||
let result = FlutterEngine.init(name: "Books")
|
||||
// This could be `run` earlier in the app to avoid the overhead of doing it the first time the
|
||||
// engine is needed.
|
||||
result.run()
|
||||
return result
|
||||
}()
|
||||
|
||||
func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func application(
|
||||
_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession,
|
||||
options: UIScene.ConnectionOptions
|
||||
) -> UISceneConfiguration {
|
||||
return UISceneConfiguration(
|
||||
name: "Default Configuration", sessionRole: connectingSceneSession.role)
|
||||
}
|
||||
|
||||
func application(
|
||||
_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "83.5x83.5"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
119
add_to_app/books/ios_books/IosBooks/Base.lproj/Main.storyboard
Normal file
119
add_to_app/books/ios_books/IosBooks/Base.lproj/Main.storyboard
Normal file
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="b8i-Fj-lA1">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="srE-pH-qZb">
|
||||
<objects>
|
||||
<navigationController id="b8i-Fj-lA1" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="wTo-xw-305">
|
||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="barTintColor" red="0.38431372549019605" green="0.0" blue="0.93333333333333335" alpha="0.84705882352941175" colorSpace="calibratedRGB"/>
|
||||
<textAttributes key="titleTextAttributes">
|
||||
<color key="textColor" systemColor="systemGray6Color"/>
|
||||
</textAttributes>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
<segue destination="Xp0-05-6gn" kind="relationship" relationship="rootViewController" id="yik-Yg-HdC"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="NW2-DP-JZL" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-1328" y="-17"/>
|
||||
</scene>
|
||||
<!--Books-->
|
||||
<scene sceneID="Ywb-fB-wBN">
|
||||
<objects>
|
||||
<tableViewController title="Books" id="Xp0-05-6gn" customClass="ViewController" customModule="IosBooks" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" allowsSelection="NO" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="uCy-ec-yGR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="BookCell" rowHeight="190" id="SBb-uI-gbV" customClass="BookCell" customModule="IosBooks" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="28" width="414" height="190"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="SBb-uI-gbV" id="C7V-w9-p66">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="190"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Book Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7KN-aJ-DT5">
|
||||
<rect key="frame" x="20" y="11" width="374" height="29"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uh5-nw-lRt">
|
||||
<rect key="frame" x="20" y="48" width="374" height="41"/>
|
||||
<string key="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc velit orci, varius tincidunt nisi ac, porta porta ipsum. Pellentesque feugiat consequat massa, facilisis euismod turpis aliquam at. Suspendisse mollis volutpat lacinia. Aenean tristique porttitor purus, eu porta sem tempor sit amet. </string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="By: Foobar F. Foobar" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="76v-Ju-4Wc">
|
||||
<rect key="frame" x="20" y="111" width="374" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b0u-fM-VM6">
|
||||
<rect key="frame" x="350" y="140" width="44" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="44" id="Vf7-pJ-LZ3"/>
|
||||
<constraint firstAttribute="height" constant="44" id="cfM-g4-ptv"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Edit"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="b0u-fM-VM6" secondAttribute="bottom" constant="6" id="BPN-jO-sVu"/>
|
||||
<constraint firstItem="7KN-aJ-DT5" firstAttribute="leading" secondItem="C7V-w9-p66" secondAttribute="leadingMargin" id="DsW-Gq-sjE"/>
|
||||
<constraint firstItem="7KN-aJ-DT5" firstAttribute="trailing" secondItem="C7V-w9-p66" secondAttribute="trailingMargin" id="IVX-uA-An6"/>
|
||||
<constraint firstItem="7KN-aJ-DT5" firstAttribute="top" secondItem="C7V-w9-p66" secondAttribute="topMargin" id="Iip-4a-2kS"/>
|
||||
<constraint firstItem="76v-Ju-4Wc" firstAttribute="leading" secondItem="C7V-w9-p66" secondAttribute="leadingMargin" id="ZbD-YJ-kaV"/>
|
||||
<constraint firstItem="76v-Ju-4Wc" firstAttribute="top" secondItem="Uh5-nw-lRt" secondAttribute="bottom" constant="22" id="cyp-xR-7If"/>
|
||||
<constraint firstItem="b0u-fM-VM6" firstAttribute="trailing" secondItem="C7V-w9-p66" secondAttribute="trailingMargin" id="gSP-0I-VmO"/>
|
||||
<constraint firstItem="b0u-fM-VM6" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="C7V-w9-p66" secondAttribute="leadingMargin" id="gzq-Ig-PZI"/>
|
||||
<constraint firstItem="b0u-fM-VM6" firstAttribute="top" secondItem="76v-Ju-4Wc" secondAttribute="bottom" constant="8" symbolic="YES" id="lCb-GM-BvA"/>
|
||||
<constraint firstItem="Uh5-nw-lRt" firstAttribute="trailing" secondItem="C7V-w9-p66" secondAttribute="trailingMargin" id="p6I-sS-CN3"/>
|
||||
<constraint firstItem="Uh5-nw-lRt" firstAttribute="leading" secondItem="C7V-w9-p66" secondAttribute="leadingMargin" id="qcT-uN-mqo"/>
|
||||
<constraint firstItem="Uh5-nw-lRt" firstAttribute="top" secondItem="7KN-aJ-DT5" secondAttribute="bottom" constant="8" symbolic="YES" id="r2u-eT-RhX"/>
|
||||
<constraint firstItem="76v-Ju-4Wc" firstAttribute="trailing" secondItem="C7V-w9-p66" secondAttribute="trailingMargin" id="zc4-dZ-JcM"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="byLine" destination="76v-Ju-4Wc" id="9Ky-Yc-aXU"/>
|
||||
<outlet property="editButton" destination="b0u-fM-VM6" id="q99-MH-ThV"/>
|
||||
<outlet property="subtitle" destination="Uh5-nw-lRt" id="UGS-IB-WV1"/>
|
||||
<outlet property="title" destination="7KN-aJ-DT5" id="a5N-rW-azA"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="Xp0-05-6gn" id="nso-Wx-y17"/>
|
||||
<outlet property="delegate" destination="Xp0-05-6gn" id="Gk5-ND-hmv"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" id="Mr1-af-Ogz"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="17x-S3-agc" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-371.01449275362324" y="-17.410714285714285"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemGray6Color">
|
||||
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
8
add_to_app/books/ios_books/IosBooks/BookCell.swift
Normal file
8
add_to_app/books/ios_books/IosBooks/BookCell.swift
Normal file
@@ -0,0 +1,8 @@
|
||||
import UIKit
|
||||
|
||||
class BookCell: UITableViewCell {
|
||||
@IBOutlet weak var title: UILabel!
|
||||
@IBOutlet weak var subtitle: UILabel!
|
||||
@IBOutlet weak var byLine: UILabel!
|
||||
@IBOutlet weak var editButton: UIButton!
|
||||
}
|
||||
66
add_to_app/books/ios_books/IosBooks/Info.plist
Normal file
66
add_to_app/books/ios_books/IosBooks/Info.plist
Normal file
@@ -0,0 +1,66 @@
|
||||
<?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>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
<key>UISceneConfigurations</key>
|
||||
<dict>
|
||||
<key>UIWindowSceneSessionRoleApplication</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UISceneConfigurationName</key>
|
||||
<string>Default Configuration</string>
|
||||
<key>UISceneDelegateClassName</key>
|
||||
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
||||
<key>UISceneStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,5 @@
|
||||
//
|
||||
// Use this file to import your target's public headers that you would like to expose to Swift.
|
||||
//
|
||||
|
||||
#import "api.h"
|
||||
69
add_to_app/books/ios_books/IosBooks/SceneDelegate.swift
Normal file
69
add_to_app/books/ios_books/IosBooks/SceneDelegate.swift
Normal file
@@ -0,0 +1,69 @@
|
||||
// Copyright 2020 The Flutter team. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import Flutter
|
||||
import UIKit
|
||||
|
||||
class SceneDelegate: UIResponder, UIWindowSceneDelegate, FlutterSceneLifeCycleProvider
|
||||
{
|
||||
var sceneLifeCycleDelegate: FlutterPluginSceneLifeCycleDelegate =
|
||||
FlutterPluginSceneLifeCycleDelegate()
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
func scene(
|
||||
_ scene: UIScene,
|
||||
willConnectTo session: UISceneSession,
|
||||
options connectionOptions: UIScene.ConnectionOptions
|
||||
) {
|
||||
sceneLifeCycleDelegate.scene(
|
||||
scene,
|
||||
willConnectTo: session,
|
||||
options: connectionOptions
|
||||
)
|
||||
}
|
||||
|
||||
func sceneDidDisconnect(_ scene: UIScene) {
|
||||
sceneLifeCycleDelegate.sceneDidDisconnect(scene)
|
||||
}
|
||||
|
||||
func sceneWillEnterForeground(_ scene: UIScene) {
|
||||
sceneLifeCycleDelegate.sceneWillEnterForeground(scene)
|
||||
}
|
||||
|
||||
func sceneDidBecomeActive(_ scene: UIScene) {
|
||||
sceneLifeCycleDelegate.sceneDidBecomeActive(scene)
|
||||
}
|
||||
|
||||
func sceneWillResignActive(_ scene: UIScene) {
|
||||
sceneLifeCycleDelegate.sceneWillResignActive(scene)
|
||||
}
|
||||
|
||||
func sceneDidEnterBackground(_ scene: UIScene) {
|
||||
sceneLifeCycleDelegate.sceneDidEnterBackground(scene)
|
||||
}
|
||||
|
||||
func scene(
|
||||
_ scene: UIScene,
|
||||
openURLContexts URLContexts: Set<UIOpenURLContext>
|
||||
) {
|
||||
sceneLifeCycleDelegate.scene(scene, openURLContexts: URLContexts)
|
||||
}
|
||||
|
||||
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
|
||||
sceneLifeCycleDelegate.scene(scene, continue: userActivity)
|
||||
}
|
||||
|
||||
func windowScene(
|
||||
_ windowScene: UIWindowScene,
|
||||
performActionFor shortcutItem: UIApplicationShortcutItem,
|
||||
completionHandler: @escaping (Bool) -> Void
|
||||
) {
|
||||
sceneLifeCycleDelegate.windowScene(
|
||||
windowScene,
|
||||
performActionFor: shortcutItem,
|
||||
completionHandler: completionHandler
|
||||
)
|
||||
}
|
||||
}
|
||||
135
add_to_app/books/ios_books/IosBooks/ViewController.swift
Normal file
135
add_to_app/books/ios_books/IosBooks/ViewController.swift
Normal file
@@ -0,0 +1,135 @@
|
||||
// Copyright 2020 The Flutter team. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import Flutter
|
||||
import UIKit
|
||||
|
||||
class ViewController: UITableViewController, BKHostBookApi {
|
||||
private var books: [BKBook] = []
|
||||
private var api: BKFlutterBookApi!
|
||||
private var editingIndex: Int = -1
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.navigationItem.title = "Books"
|
||||
let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
||||
BKHostBookApiSetup(appDelegate.engine.binaryMessenger, self)
|
||||
api = BKFlutterBookApi.init(binaryMessenger: appDelegate.engine.binaryMessenger)
|
||||
if let url = URL(
|
||||
string: "https://www.googleapis.com/books/v1/volumes?q=greenwood+tulsa&maxResults=15")
|
||||
{
|
||||
self.loadBooks(url: url) { (newBooks) in
|
||||
if let newBooks = newBooks {
|
||||
self.books = newBooks
|
||||
self.tableView.reloadData()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Loads a JSON file from the supplied URL, parses it and calls the callback with the array of
|
||||
parsed books on the main thread.
|
||||
*/
|
||||
func loadBooks(url: URL, completion: @escaping ([BKBook]?) -> Void) {
|
||||
URLSession.shared.dataTask(with: url) { data, response, error in
|
||||
if let data = data {
|
||||
do {
|
||||
if let json = try JSONSerialization.jsonObject(with: data, options: [])
|
||||
as? [String: Any]
|
||||
{
|
||||
var newBooks: [BKBook] = []
|
||||
for item in json["items"] as! [[String: Any]] {
|
||||
let volumeInfo = item["volumeInfo"] as! [String: Any]
|
||||
let title = volumeInfo["title"] as! String
|
||||
let subtitle = volumeInfo["subtitle"] as! String?
|
||||
let authors = (volumeInfo["authors"] as! [String]).joined(separator: " & ")
|
||||
let pageCount = volumeInfo["pageCount"] as! Int32
|
||||
let publishedDate = volumeInfo["publishedDate"] as! String
|
||||
let summary = volumeInfo["description"] as! String?
|
||||
let imageLinks = volumeInfo["imageLinks"] as! [String: Any]
|
||||
let thumbnail: BKThumbnail = BKThumbnail.init()
|
||||
thumbnail.url = imageLinks["thumbnail"] as! String?
|
||||
let book: BKBook = BKBook.init()
|
||||
book.author = authors
|
||||
book.title = title
|
||||
book.subtitle = subtitle
|
||||
book.title = title
|
||||
book.pageCount = NSNumber.init(value: pageCount)
|
||||
book.publishDate = publishedDate
|
||||
book.summary = summary
|
||||
book.thumbnail = thumbnail
|
||||
newBooks.append(book)
|
||||
}
|
||||
DispatchQueue.main.async {
|
||||
completion(newBooks)
|
||||
}
|
||||
}
|
||||
} catch let error {
|
||||
print("json decode error: \(error)")
|
||||
completion(nil)
|
||||
}
|
||||
}
|
||||
}.resume()
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return self.books.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath)
|
||||
-> UITableViewCell
|
||||
{
|
||||
let cell: BookCell = self.tableView.dequeueReusableCell(withIdentifier: "BookCell") as! BookCell
|
||||
let bookInfo = books[indexPath.row]
|
||||
cell.title.text = bookInfo.title
|
||||
cell.subtitle.text = bookInfo.subtitle
|
||||
if let author = bookInfo.author {
|
||||
cell.byLine.text = "by: \(author)"
|
||||
}
|
||||
weak var weakSelf = self
|
||||
let editAction = UIAction(title: "Edit") { (action) in
|
||||
if let weakSelf = weakSelf {
|
||||
weakSelf.editItem(index: indexPath.row)
|
||||
}
|
||||
}
|
||||
cell.editButton.removeTarget(nil, action: nil, for: .allEvents)
|
||||
cell.editButton.addAction(editAction, for: UIControl.Event.touchUpInside)
|
||||
return cell
|
||||
}
|
||||
|
||||
/**
|
||||
Presents the FlutterViewController that edits the book at the supplied index.
|
||||
*/
|
||||
func editItem(index: Int) {
|
||||
let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
||||
let flutterViewController = FlutterViewController.init(
|
||||
engine: appDelegate.engine, nibName: nil, bundle: nil)
|
||||
self.editingIndex = index
|
||||
api.displayBookDetailsBook(self.books[index]) { (error) in
|
||||
if let error = error {
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
self.present(flutterViewController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
/**
|
||||
Called by Pigeon when the FlutterViewController is dismissed without accepting any edits.
|
||||
*/
|
||||
func cancelWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) {
|
||||
self.editingIndex = -1
|
||||
self.dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
/**
|
||||
Called by Pigeon when edits to the book are accepted in the FlutterViewController.
|
||||
*/
|
||||
func finishEditingBook(_ input: BKBook, error: AutoreleasingUnsafeMutablePointer<FlutterError?>) {
|
||||
self.books[editingIndex] = input
|
||||
self.tableView.reloadData()
|
||||
self.editingIndex = -1
|
||||
self.dismiss(animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
49
add_to_app/books/ios_books/IosBooks/api.h
Normal file
49
add_to_app/books/ios_books/IosBooks/api.h
Normal file
@@ -0,0 +1,49 @@
|
||||
// Autogenerated from Pigeon (v1.0.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
#import <Foundation/Foundation.h>
|
||||
@protocol FlutterBinaryMessenger;
|
||||
@protocol FlutterMessageCodec;
|
||||
@class FlutterError;
|
||||
@class FlutterStandardTypedData;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class BKBook;
|
||||
@class BKThumbnail;
|
||||
|
||||
@interface BKBook : NSObject
|
||||
@property(nonatomic, copy, nullable) NSString *title;
|
||||
@property(nonatomic, copy, nullable) NSString *subtitle;
|
||||
@property(nonatomic, copy, nullable) NSString *author;
|
||||
@property(nonatomic, copy, nullable) NSString *summary;
|
||||
@property(nonatomic, copy, nullable) NSString *publishDate;
|
||||
@property(nonatomic, strong, nullable) NSNumber *pageCount;
|
||||
@property(nonatomic, strong, nullable) BKThumbnail *thumbnail;
|
||||
@end
|
||||
|
||||
@interface BKThumbnail : NSObject
|
||||
@property(nonatomic, copy, nullable) NSString *url;
|
||||
@end
|
||||
|
||||
/// The codec used by BKFlutterBookApi.
|
||||
NSObject<FlutterMessageCodec> *BKFlutterBookApiGetCodec(void);
|
||||
|
||||
@interface BKFlutterBookApi : NSObject
|
||||
- (instancetype)initWithBinaryMessenger:
|
||||
(id<FlutterBinaryMessenger>)binaryMessenger;
|
||||
- (void)displayBookDetailsBook:(BKBook *)book
|
||||
completion:(void (^)(NSError *_Nullable))completion;
|
||||
@end
|
||||
/// The codec used by BKHostBookApi.
|
||||
NSObject<FlutterMessageCodec> *BKHostBookApiGetCodec(void);
|
||||
|
||||
@protocol BKHostBookApi
|
||||
- (void)cancelWithError:(FlutterError *_Nullable *_Nonnull)error;
|
||||
- (void)finishEditingBookBook:(BKBook *)book
|
||||
error:(FlutterError *_Nullable *_Nonnull)error;
|
||||
@end
|
||||
|
||||
extern void BKHostBookApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
|
||||
NSObject<BKHostBookApi> *_Nullable api);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
269
add_to_app/books/ios_books/IosBooks/api.m
Normal file
269
add_to_app/books/ios_books/IosBooks/api.m
Normal file
@@ -0,0 +1,269 @@
|
||||
// Autogenerated from Pigeon (v1.0.1), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
#import "api.h"
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
#if !__has_feature(objc_arc)
|
||||
#error File requires ARC to be enabled.
|
||||
#endif
|
||||
|
||||
static NSDictionary<NSString *, id> *wrapResult(id result,
|
||||
FlutterError *error) {
|
||||
NSDictionary *errorDict = (NSDictionary *)[NSNull null];
|
||||
if (error) {
|
||||
errorDict = @{
|
||||
@"code" : (error.code ? error.code : [NSNull null]),
|
||||
@"message" : (error.message ? error.message : [NSNull null]),
|
||||
@"details" : (error.details ? error.details : [NSNull null]),
|
||||
};
|
||||
}
|
||||
return @{
|
||||
@"result" : (result ? result : [NSNull null]),
|
||||
@"error" : errorDict,
|
||||
};
|
||||
}
|
||||
|
||||
@interface BKBook ()
|
||||
+ (BKBook *)fromMap:(NSDictionary *)dict;
|
||||
- (NSDictionary *)toMap;
|
||||
@end
|
||||
@interface BKThumbnail ()
|
||||
+ (BKThumbnail *)fromMap:(NSDictionary *)dict;
|
||||
- (NSDictionary *)toMap;
|
||||
@end
|
||||
|
||||
@implementation BKBook
|
||||
+ (BKBook *)fromMap:(NSDictionary *)dict {
|
||||
BKBook *result = [[BKBook alloc] init];
|
||||
result.title = dict[@"title"];
|
||||
if ((NSNull *)result.title == [NSNull null]) {
|
||||
result.title = nil;
|
||||
}
|
||||
result.subtitle = dict[@"subtitle"];
|
||||
if ((NSNull *)result.subtitle == [NSNull null]) {
|
||||
result.subtitle = nil;
|
||||
}
|
||||
result.author = dict[@"author"];
|
||||
if ((NSNull *)result.author == [NSNull null]) {
|
||||
result.author = nil;
|
||||
}
|
||||
result.summary = dict[@"summary"];
|
||||
if ((NSNull *)result.summary == [NSNull null]) {
|
||||
result.summary = nil;
|
||||
}
|
||||
result.publishDate = dict[@"publishDate"];
|
||||
if ((NSNull *)result.publishDate == [NSNull null]) {
|
||||
result.publishDate = nil;
|
||||
}
|
||||
result.pageCount = dict[@"pageCount"];
|
||||
if ((NSNull *)result.pageCount == [NSNull null]) {
|
||||
result.pageCount = nil;
|
||||
}
|
||||
result.thumbnail = [BKThumbnail fromMap:dict[@"thumbnail"]];
|
||||
if ((NSNull *)result.thumbnail == [NSNull null]) {
|
||||
result.thumbnail = nil;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
- (NSDictionary *)toMap {
|
||||
return [NSDictionary
|
||||
dictionaryWithObjectsAndKeys:
|
||||
(self.title ? self.title : [NSNull null]), @"title",
|
||||
(self.subtitle ? self.subtitle : [NSNull null]), @"subtitle",
|
||||
(self.author ? self.author : [NSNull null]), @"author",
|
||||
(self.summary ? self.summary : [NSNull null]), @"summary",
|
||||
(self.publishDate ? self.publishDate : [NSNull null]), @"publishDate",
|
||||
(self.pageCount ? self.pageCount : [NSNull null]), @"pageCount",
|
||||
(self.thumbnail ? [self.thumbnail toMap] : [NSNull null]),
|
||||
@"thumbnail", nil];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation BKThumbnail
|
||||
+ (BKThumbnail *)fromMap:(NSDictionary *)dict {
|
||||
BKThumbnail *result = [[BKThumbnail alloc] init];
|
||||
result.url = dict[@"url"];
|
||||
if ((NSNull *)result.url == [NSNull null]) {
|
||||
result.url = nil;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
- (NSDictionary *)toMap {
|
||||
return [NSDictionary
|
||||
dictionaryWithObjectsAndKeys:(self.url ? self.url : [NSNull null]),
|
||||
@"url", nil];
|
||||
}
|
||||
@end
|
||||
|
||||
@interface BKFlutterBookApiCodecReader : FlutterStandardReader
|
||||
@end
|
||||
@implementation BKFlutterBookApiCodecReader
|
||||
- (nullable id)readValueOfType:(UInt8)type {
|
||||
switch (type) {
|
||||
case 128:
|
||||
return [BKBook fromMap:[self readValue]];
|
||||
|
||||
default:
|
||||
return [super readValueOfType:type];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@interface BKFlutterBookApiCodecWriter : FlutterStandardWriter
|
||||
@end
|
||||
@implementation BKFlutterBookApiCodecWriter
|
||||
- (void)writeValue:(id)value {
|
||||
if ([value isKindOfClass:[BKBook class]]) {
|
||||
[self writeByte:128];
|
||||
[self writeValue:[value toMap]];
|
||||
} else {
|
||||
[super writeValue:value];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@interface BKFlutterBookApiCodecReaderWriter : FlutterStandardReaderWriter
|
||||
@end
|
||||
@implementation BKFlutterBookApiCodecReaderWriter
|
||||
- (FlutterStandardWriter *)writerWithData:(NSMutableData *)data {
|
||||
return [[BKFlutterBookApiCodecWriter alloc] initWithData:data];
|
||||
}
|
||||
- (FlutterStandardReader *)readerWithData:(NSData *)data {
|
||||
return [[BKFlutterBookApiCodecReader alloc] initWithData:data];
|
||||
}
|
||||
@end
|
||||
|
||||
NSObject<FlutterMessageCodec> *BKFlutterBookApiGetCodec() {
|
||||
static dispatch_once_t s_pred = 0;
|
||||
static FlutterStandardMessageCodec *s_sharedObject = nil;
|
||||
dispatch_once(&s_pred, ^{
|
||||
BKFlutterBookApiCodecReaderWriter *readerWriter =
|
||||
[[BKFlutterBookApiCodecReaderWriter alloc] init];
|
||||
s_sharedObject =
|
||||
[FlutterStandardMessageCodec codecWithReaderWriter:readerWriter];
|
||||
});
|
||||
return s_sharedObject;
|
||||
}
|
||||
|
||||
@interface BKFlutterBookApi ()
|
||||
@property(nonatomic, strong) NSObject<FlutterBinaryMessenger> *binaryMessenger;
|
||||
@end
|
||||
|
||||
@implementation BKFlutterBookApi
|
||||
- (instancetype)initWithBinaryMessenger:
|
||||
(NSObject<FlutterBinaryMessenger> *)binaryMessenger {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_binaryMessenger = binaryMessenger;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)displayBookDetailsBook:(BKBook *)arg_book
|
||||
completion:(void (^)(NSError *_Nullable))completion {
|
||||
FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
|
||||
messageChannelWithName:
|
||||
@"dev.flutter.pigeon.FlutterBookApi.displayBookDetails"
|
||||
binaryMessenger:self.binaryMessenger
|
||||
codec:BKFlutterBookApiGetCodec()];
|
||||
[channel sendMessage:@[ arg_book ]
|
||||
reply:^(id reply) {
|
||||
completion(nil);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
@interface BKHostBookApiCodecReader : FlutterStandardReader
|
||||
@end
|
||||
@implementation BKHostBookApiCodecReader
|
||||
- (nullable id)readValueOfType:(UInt8)type {
|
||||
switch (type) {
|
||||
case 128:
|
||||
return [BKBook fromMap:[self readValue]];
|
||||
|
||||
default:
|
||||
return [super readValueOfType:type];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@interface BKHostBookApiCodecWriter : FlutterStandardWriter
|
||||
@end
|
||||
@implementation BKHostBookApiCodecWriter
|
||||
- (void)writeValue:(id)value {
|
||||
if ([value isKindOfClass:[BKBook class]]) {
|
||||
[self writeByte:128];
|
||||
[self writeValue:[value toMap]];
|
||||
} else {
|
||||
[super writeValue:value];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@interface BKHostBookApiCodecReaderWriter : FlutterStandardReaderWriter
|
||||
@end
|
||||
@implementation BKHostBookApiCodecReaderWriter
|
||||
- (FlutterStandardWriter *)writerWithData:(NSMutableData *)data {
|
||||
return [[BKHostBookApiCodecWriter alloc] initWithData:data];
|
||||
}
|
||||
- (FlutterStandardReader *)readerWithData:(NSData *)data {
|
||||
return [[BKHostBookApiCodecReader alloc] initWithData:data];
|
||||
}
|
||||
@end
|
||||
|
||||
NSObject<FlutterMessageCodec> *BKHostBookApiGetCodec() {
|
||||
static dispatch_once_t s_pred = 0;
|
||||
static FlutterStandardMessageCodec *s_sharedObject = nil;
|
||||
dispatch_once(&s_pred, ^{
|
||||
BKHostBookApiCodecReaderWriter *readerWriter =
|
||||
[[BKHostBookApiCodecReaderWriter alloc] init];
|
||||
s_sharedObject =
|
||||
[FlutterStandardMessageCodec codecWithReaderWriter:readerWriter];
|
||||
});
|
||||
return s_sharedObject;
|
||||
}
|
||||
|
||||
void BKHostBookApiSetup(id<FlutterBinaryMessenger> binaryMessenger,
|
||||
NSObject<BKHostBookApi> *api) {
|
||||
{
|
||||
FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
|
||||
messageChannelWithName:@"dev.flutter.pigeon.HostBookApi.cancel"
|
||||
binaryMessenger:binaryMessenger
|
||||
codec:BKHostBookApiGetCodec()];
|
||||
if (api) {
|
||||
NSCAssert(
|
||||
[api respondsToSelector:@selector(cancelWithError:)],
|
||||
@"BKHostBookApi api doesn't respond to @selector(cancelWithError:)");
|
||||
[channel
|
||||
setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
||||
FlutterError *error;
|
||||
[api cancelWithError:&error];
|
||||
callback(wrapResult(nil, error));
|
||||
}];
|
||||
} else {
|
||||
[channel setMessageHandler:nil];
|
||||
}
|
||||
}
|
||||
{
|
||||
FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
|
||||
messageChannelWithName:
|
||||
@"dev.flutter.pigeon.HostBookApi.finishEditingBook"
|
||||
binaryMessenger:binaryMessenger
|
||||
codec:BKHostBookApiGetCodec()];
|
||||
if (api) {
|
||||
NSCAssert([api respondsToSelector:@selector(finishEditingBookBook:
|
||||
error:)],
|
||||
@"BKHostBookApi api doesn't respond to "
|
||||
@"@selector(finishEditingBookBook:error:)");
|
||||
[channel
|
||||
setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
||||
NSArray *args = message;
|
||||
BKBook *arg_book = args[0];
|
||||
FlutterError *error;
|
||||
[api finishEditingBookBook:arg_book error:&error];
|
||||
callback(wrapResult(nil, error));
|
||||
}];
|
||||
} else {
|
||||
[channel setMessageHandler:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
16
add_to_app/books/ios_books/Podfile
Normal file
16
add_to_app/books/ios_books/Podfile
Normal file
@@ -0,0 +1,16 @@
|
||||
# Uncomment the next line to define a global platform for your project
|
||||
# platform :ios, '9.0'
|
||||
|
||||
flutter_application_path = '../flutter_module_books/'
|
||||
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
|
||||
|
||||
target 'IosBooks' do
|
||||
# Comment the next line if you don't want to use dynamic frameworks
|
||||
use_frameworks!
|
||||
# Pods for IosBooks
|
||||
install_all_flutter_pods(flutter_application_path)
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
flutter_post_install(installer) if defined?(flutter_post_install)
|
||||
end
|
||||
Reference in New Issue
Block a user