This commit is contained in:
Ruoyu Fu
2019-05-06 15:01:51 +08:00
commit c28e02d1bb
20 changed files with 1327 additions and 0 deletions

74
.gitignore vendored Normal file
View File

@@ -0,0 +1,74 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/
Pods/
*.xcworkspace
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# Accio dependency management
Dependencies/
.accio/
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
iOSInjectionProject/

View File

@@ -0,0 +1,611 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
17403F47227AC5440086AF7E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17403F46227AC5440086AF7E /* AppDelegate.swift */; };
17403F49227AC5440086AF7E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17403F48227AC5440086AF7E /* ViewController.swift */; };
17403F4C227AC5440086AF7E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 17403F4A227AC5440086AF7E /* Main.storyboard */; };
17403F4E227AC5460086AF7E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 17403F4D227AC5460086AF7E /* Assets.xcassets */; };
17403F51227AC5460086AF7E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 17403F4F227AC5460086AF7E /* LaunchScreen.storyboard */; };
17403F5C227AC5460086AF7E /* LocationInputTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17403F5B227AC5460086AF7E /* LocationInputTests.swift */; };
17403F6B227BDB320086AF7E /* GMSRXExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17403F6A227BDB320086AF7E /* GMSRXExtensions.swift */; };
8FCBB421DF868555E26034AA /* Pods_LocationInput.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C6FC32474259195B0C055B28 /* Pods_LocationInput.framework */; };
B2238DBCBEB9586A171FC0E0 /* Pods_LocationInputTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D63BA308C3EBDCDF1B13B7FE /* Pods_LocationInputTests.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
17403F58227AC5460086AF7E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 17403F3B227AC5440086AF7E /* Project object */;
proxyType = 1;
remoteGlobalIDString = 17403F42227AC5440086AF7E;
remoteInfo = LocationInput;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
1558C6EE9C47FC9FA6BA5CB8 /* Pods-LocationInputTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocationInputTests.debug.xcconfig"; path = "Target Support Files/Pods-LocationInputTests/Pods-LocationInputTests.debug.xcconfig"; sourceTree = "<group>"; };
17403F43227AC5440086AF7E /* LocationInput.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LocationInput.app; sourceTree = BUILT_PRODUCTS_DIR; };
17403F46227AC5440086AF7E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
17403F48227AC5440086AF7E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
17403F4B227AC5440086AF7E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
17403F4D227AC5460086AF7E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
17403F50227AC5460086AF7E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
17403F52227AC5460086AF7E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
17403F57227AC5460086AF7E /* LocationInputTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LocationInputTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
17403F5B227AC5460086AF7E /* LocationInputTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationInputTests.swift; sourceTree = "<group>"; };
17403F5D227AC5460086AF7E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
17403F6A227BDB320086AF7E /* GMSRXExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GMSRXExtensions.swift; sourceTree = "<group>"; };
85DB9E816C57265FBD3B6142 /* Pods-LocationInput.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocationInput.debug.xcconfig"; path = "Target Support Files/Pods-LocationInput/Pods-LocationInput.debug.xcconfig"; sourceTree = "<group>"; };
8692B3A57ECEFE6BF8891CEB /* Pods-LocationInput.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocationInput.release.xcconfig"; path = "Target Support Files/Pods-LocationInput/Pods-LocationInput.release.xcconfig"; sourceTree = "<group>"; };
B270D4661BE9E319D254B909 /* Pods-LocationInputTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocationInputTests.release.xcconfig"; path = "Target Support Files/Pods-LocationInputTests/Pods-LocationInputTests.release.xcconfig"; sourceTree = "<group>"; };
C6FC32474259195B0C055B28 /* Pods_LocationInput.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LocationInput.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D63BA308C3EBDCDF1B13B7FE /* Pods_LocationInputTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LocationInputTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
17403F40227AC5440086AF7E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8FCBB421DF868555E26034AA /* Pods_LocationInput.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
17403F54227AC5460086AF7E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B2238DBCBEB9586A171FC0E0 /* Pods_LocationInputTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
17403F3A227AC5440086AF7E = {
isa = PBXGroup;
children = (
17403F45227AC5440086AF7E /* LocationInput */,
17403F5A227AC5460086AF7E /* LocationInputTests */,
17403F44227AC5440086AF7E /* Products */,
E30E1A4E7E57DC26986C1F66 /* Pods */,
464E870BB5733B82AF50C0E6 /* Frameworks */,
);
sourceTree = "<group>";
};
17403F44227AC5440086AF7E /* Products */ = {
isa = PBXGroup;
children = (
17403F43227AC5440086AF7E /* LocationInput.app */,
17403F57227AC5460086AF7E /* LocationInputTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
17403F45227AC5440086AF7E /* LocationInput */ = {
isa = PBXGroup;
children = (
17403F46227AC5440086AF7E /* AppDelegate.swift */,
17403F48227AC5440086AF7E /* ViewController.swift */,
17403F4A227AC5440086AF7E /* Main.storyboard */,
17403F4D227AC5460086AF7E /* Assets.xcassets */,
17403F4F227AC5460086AF7E /* LaunchScreen.storyboard */,
17403F52227AC5460086AF7E /* Info.plist */,
17403F6A227BDB320086AF7E /* GMSRXExtensions.swift */,
);
path = LocationInput;
sourceTree = "<group>";
};
17403F5A227AC5460086AF7E /* LocationInputTests */ = {
isa = PBXGroup;
children = (
17403F5B227AC5460086AF7E /* LocationInputTests.swift */,
17403F5D227AC5460086AF7E /* Info.plist */,
);
path = LocationInputTests;
sourceTree = "<group>";
};
464E870BB5733B82AF50C0E6 /* Frameworks */ = {
isa = PBXGroup;
children = (
C6FC32474259195B0C055B28 /* Pods_LocationInput.framework */,
D63BA308C3EBDCDF1B13B7FE /* Pods_LocationInputTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
E30E1A4E7E57DC26986C1F66 /* Pods */ = {
isa = PBXGroup;
children = (
85DB9E816C57265FBD3B6142 /* Pods-LocationInput.debug.xcconfig */,
8692B3A57ECEFE6BF8891CEB /* Pods-LocationInput.release.xcconfig */,
1558C6EE9C47FC9FA6BA5CB8 /* Pods-LocationInputTests.debug.xcconfig */,
B270D4661BE9E319D254B909 /* Pods-LocationInputTests.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
17403F42227AC5440086AF7E /* LocationInput */ = {
isa = PBXNativeTarget;
buildConfigurationList = 17403F60227AC5460086AF7E /* Build configuration list for PBXNativeTarget "LocationInput" */;
buildPhases = (
803A45C2329C9698535A5CB8 /* [CP] Check Pods Manifest.lock */,
17403F3F227AC5440086AF7E /* Sources */,
17403F40227AC5440086AF7E /* Frameworks */,
17403F41227AC5440086AF7E /* Resources */,
1AEFFB21E6D3336F1B266D3B /* [CP] Embed Pods Frameworks */,
C3BCEA04A3738448D93955B7 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = LocationInput;
productName = LocationInput;
productReference = 17403F43227AC5440086AF7E /* LocationInput.app */;
productType = "com.apple.product-type.application";
};
17403F56227AC5460086AF7E /* LocationInputTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 17403F63227AC5460086AF7E /* Build configuration list for PBXNativeTarget "LocationInputTests" */;
buildPhases = (
633249FF5F3D8A3488CD65D3 /* [CP] Check Pods Manifest.lock */,
17403F53227AC5460086AF7E /* Sources */,
17403F54227AC5460086AF7E /* Frameworks */,
17403F55227AC5460086AF7E /* Resources */,
);
buildRules = (
);
dependencies = (
17403F59227AC5460086AF7E /* PBXTargetDependency */,
);
name = LocationInputTests;
productName = LocationInputTests;
productReference = 17403F57227AC5460086AF7E /* LocationInputTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
17403F3B227AC5440086AF7E /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1020;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Tappollo;
TargetAttributes = {
17403F42227AC5440086AF7E = {
CreatedOnToolsVersion = 10.2.1;
};
17403F56227AC5460086AF7E = {
CreatedOnToolsVersion = 10.2.1;
TestTargetID = 17403F42227AC5440086AF7E;
};
};
};
buildConfigurationList = 17403F3E227AC5440086AF7E /* Build configuration list for PBXProject "LocationInput" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 17403F3A227AC5440086AF7E;
productRefGroup = 17403F44227AC5440086AF7E /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
17403F42227AC5440086AF7E /* LocationInput */,
17403F56227AC5460086AF7E /* LocationInputTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
17403F41227AC5440086AF7E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
17403F51227AC5460086AF7E /* LaunchScreen.storyboard in Resources */,
17403F4E227AC5460086AF7E /* Assets.xcassets in Resources */,
17403F4C227AC5440086AF7E /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
17403F55227AC5460086AF7E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
1AEFFB21E6D3336F1B266D3B /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-LocationInput/Pods-LocationInput-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/RxAtomic/RxAtomic.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAtomic.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LocationInput/Pods-LocationInput-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
633249FF5F3D8A3488CD65D3 /* [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-LocationInputTests-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;
};
803A45C2329C9698535A5CB8 /* [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-LocationInput-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;
};
C3BCEA04A3738448D93955B7 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-LocationInput/Pods-LocationInput-resources.sh",
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/Resources/GoogleMaps.bundle",
"${PODS_ROOT}/GooglePlaces/Frameworks/GooglePlaces.framework/Resources/GooglePlaces.bundle",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMaps.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GooglePlaces.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LocationInput/Pods-LocationInput-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
17403F3F227AC5440086AF7E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
17403F49227AC5440086AF7E /* ViewController.swift in Sources */,
17403F6B227BDB320086AF7E /* GMSRXExtensions.swift in Sources */,
17403F47227AC5440086AF7E /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
17403F53227AC5460086AF7E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
17403F5C227AC5460086AF7E /* LocationInputTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
17403F59227AC5460086AF7E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 17403F42227AC5440086AF7E /* LocationInput */;
targetProxy = 17403F58227AC5460086AF7E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
17403F4A227AC5440086AF7E /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
17403F4B227AC5440086AF7E /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
17403F4F227AC5460086AF7E /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
17403F50227AC5460086AF7E /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
17403F5E227AC5460086AF7E /* 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_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;
CODE_SIGN_IDENTITY = "iPhone Developer";
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 = 12.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;
};
17403F5F227AC5460086AF7E /* 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_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;
CODE_SIGN_IDENTITY = "iPhone Developer";
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 = 12.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;
};
17403F61227AC5460086AF7E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 85DB9E816C57265FBD3B6142 /* Pods-LocationInput.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 835BXF96BF;
INFOPLIST_FILE = LocationInput/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.tappollo.LocationInput;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
17403F62227AC5460086AF7E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8692B3A57ECEFE6BF8891CEB /* Pods-LocationInput.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 835BXF96BF;
INFOPLIST_FILE = LocationInput/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.tappollo.LocationInput;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
17403F64227AC5460086AF7E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1558C6EE9C47FC9FA6BA5CB8 /* Pods-LocationInputTests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 835BXF96BF;
INFOPLIST_FILE = LocationInputTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.tappollo.LocationInputTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LocationInput.app/LocationInput";
};
name = Debug;
};
17403F65227AC5460086AF7E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B270D4661BE9E319D254B909 /* Pods-LocationInputTests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 835BXF96BF;
INFOPLIST_FILE = LocationInputTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.tappollo.LocationInputTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LocationInput.app/LocationInput";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
17403F3E227AC5440086AF7E /* Build configuration list for PBXProject "LocationInput" */ = {
isa = XCConfigurationList;
buildConfigurations = (
17403F5E227AC5460086AF7E /* Debug */,
17403F5F227AC5460086AF7E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
17403F60227AC5460086AF7E /* Build configuration list for PBXNativeTarget "LocationInput" */ = {
isa = XCConfigurationList;
buildConfigurations = (
17403F61227AC5460086AF7E /* Debug */,
17403F62227AC5460086AF7E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
17403F63227AC5460086AF7E /* Build configuration list for PBXNativeTarget "LocationInputTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
17403F64227AC5460086AF7E /* Debug */,
17403F65227AC5460086AF7E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 17403F3B227AC5440086AF7E /* Project object */;
}

View File

@@ -0,0 +1,47 @@
//
// AppDelegate.swift
// LocationInput
//
// Created by Ruoyu Fu on 2019/5/2.
// Copyright © 2019 Tappollo. All rights reserved.
//
import UIKit
import GooglePlaces
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
GMSPlacesClient.provideAPIKey("AIzaSyAGYMvwsth1NowF8OKMezks4GmJYgaLdr8")
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}

View File

@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "End@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "End@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Start@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Start@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

View File

@@ -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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<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>

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="vF3-ZQ-Z6U">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="w66-Cv-Bop">
<objects>
<navigationController navigationBarHidden="YES" id="vF3-ZQ-Z6U" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="19D-ma-dWT">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="c8S-VZ-xsB"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="pry-ml-dgG" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-694" y="119"/>
</scene>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="LocationInput" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="9l2-pV-6cC">
<rect key="frame" x="0.0" y="148" width="414" height="748"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="sectionIndexTrackingBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableView>
<tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="QXx-5W-UBI">
<rect key="frame" x="0.0" y="148" width="414" height="748"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="sectionIndexTrackingBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5J6-9e-skU">
<rect key="frame" x="0.0" y="0.0" width="414" height="148"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Pickup Location" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="lJ0-rK-vyn">
<rect key="frame" x="68" y="65.5" width="322" height="17"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Dropoff Location" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="wXr-Pf-MtG">
<rect key="frame" x="68" y="109.5" width="322" height="17"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Start" translatesAutoresizingMaskIntoConstraints="NO" id="Miy-tH-dAe">
<rect key="frame" x="36" y="70" width="8" height="8"/>
<constraints>
<constraint firstAttribute="width" constant="8" id="ms0-b5-JPY"/>
<constraint firstAttribute="height" constant="8" id="pdm-YT-Ywl"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="End" translatesAutoresizingMaskIntoConstraints="NO" id="x3S-7q-4SY">
<rect key="frame" x="36" y="114" width="8" height="8"/>
<constraints>
<constraint firstAttribute="width" constant="8" id="7VW-uM-cMV"/>
<constraint firstAttribute="height" constant="8" id="lfz-wP-fGL"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="wXr-Pf-MtG" secondAttribute="trailing" constant="24" id="2Oh-ta-I8c"/>
<constraint firstItem="Miy-tH-dAe" firstAttribute="leading" secondItem="5J6-9e-skU" secondAttribute="leading" constant="36" id="49T-yg-ZfE"/>
<constraint firstItem="wXr-Pf-MtG" firstAttribute="centerY" secondItem="x3S-7q-4SY" secondAttribute="centerY" id="6Bf-sF-dKL"/>
<constraint firstItem="lJ0-rK-vyn" firstAttribute="leading" secondItem="Miy-tH-dAe" secondAttribute="trailing" constant="24" id="9gq-Qh-abf"/>
<constraint firstAttribute="height" constant="148" id="GdS-rE-yQI"/>
<constraint firstAttribute="trailing" secondItem="lJ0-rK-vyn" secondAttribute="trailing" constant="24" id="Va0-Qi-3A9"/>
<constraint firstItem="wXr-Pf-MtG" firstAttribute="leading" secondItem="x3S-7q-4SY" secondAttribute="trailing" constant="24" id="ZqJ-75-TXg"/>
<constraint firstItem="lJ0-rK-vyn" firstAttribute="centerY" secondItem="Miy-tH-dAe" secondAttribute="centerY" id="juQ-LK-mdR"/>
<constraint firstItem="x3S-7q-4SY" firstAttribute="top" secondItem="Miy-tH-dAe" secondAttribute="bottom" constant="36" id="mUu-HO-K39"/>
<constraint firstItem="x3S-7q-4SY" firstAttribute="centerX" secondItem="Miy-tH-dAe" secondAttribute="centerX" id="pQj-88-X5H"/>
<constraint firstItem="Miy-tH-dAe" firstAttribute="top" secondItem="5J6-9e-skU" secondAttribute="top" constant="70" id="yp9-xK-kmf"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="5J6-9e-skU" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="3AY-SW-vAX"/>
<constraint firstItem="QXx-5W-UBI" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="B9F-Oj-wwE"/>
<constraint firstItem="QXx-5W-UBI" firstAttribute="top" secondItem="5J6-9e-skU" secondAttribute="bottom" id="HoG-ba-TUG"/>
<constraint firstItem="5J6-9e-skU" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="Ors-p4-cOC"/>
<constraint firstItem="9l2-pV-6cC" firstAttribute="bottom" secondItem="8bC-Xf-vdC" secondAttribute="bottom" id="PvI-jm-Xnt"/>
<constraint firstItem="9l2-pV-6cC" firstAttribute="top" secondItem="5J6-9e-skU" secondAttribute="bottom" id="UaL-8E-3Dh"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="5J6-9e-skU" secondAttribute="trailing" id="bpc-r7-pHv"/>
<constraint firstAttribute="bottom" secondItem="QXx-5W-UBI" secondAttribute="bottom" id="l4W-9f-kTB"/>
<constraint firstAttribute="trailing" secondItem="QXx-5W-UBI" secondAttribute="trailing" id="nNr-il-1aG"/>
<constraint firstItem="9l2-pV-6cC" firstAttribute="trailing" secondItem="6Tk-OE-BBY" secondAttribute="trailing" id="tm2-ZM-1Ra"/>
<constraint firstItem="9l2-pV-6cC" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="uRA-b1-jY9"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<navigationItem key="navigationItem" id="XI1-sF-cAA"/>
<connections>
<outlet property="dropoffField" destination="wXr-Pf-MtG" id="xb0-Zb-HJY"/>
<outlet property="dropoffResults" destination="QXx-5W-UBI" id="xUi-Fx-7YB"/>
<outlet property="header" destination="5J6-9e-skU" id="nLw-Ru-hBv"/>
<outlet property="pickupField" destination="lJ0-rK-vyn" id="xhz-Qe-tj1"/>
<outlet property="pickupResults" destination="9l2-pV-6cC" id="gPA-l9-RW9"/>
<outlet property="searchDisplayController" destination="OrK-As-XOw" id="sdZ-zj-Puu"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
<searchDisplayController id="OrK-As-XOw">
<connections>
<outlet property="delegate" destination="BYZ-38-t0r" id="ozK-my-OaA"/>
<outlet property="searchContentsController" destination="BYZ-38-t0r" id="dV1-cP-j1P"/>
<outlet property="searchResultsDataSource" destination="BYZ-38-t0r" id="JnT-XU-KYo"/>
<outlet property="searchResultsDelegate" destination="BYZ-38-t0r" id="6Kr-xN-Xvq"/>
</connections>
</searchDisplayController>
</objects>
<point key="canvasLocation" x="276.81159420289856" y="118.52678571428571"/>
</scene>
</scenes>
<resources>
<image name="End" width="4" height="4"/>
<image name="Start" width="4" height="4"/>
</resources>
</document>

View File

@@ -0,0 +1,68 @@
//
// GMSRXExtensions.swift
// LocationInput
//
// Created by Ruoyu Fu on 2019/5/3.
// Copyright © 2019 Tappollo. All rights reserved.
//
import RxSwift
import RxCocoa
import GooglePlaces
extension GMSAutocompleteTableDataSource: HasDelegate {
public typealias Delegate = GMSAutocompleteTableDataSourceDelegate
}
open class RxGMSDataSourceDelegateProxy
: DelegateProxy<GMSAutocompleteTableDataSource, GMSAutocompleteTableDataSourceDelegate>
, DelegateProxyType
, GMSAutocompleteTableDataSourceDelegate {
public weak private(set) var dataSource: GMSAutocompleteTableDataSource?
public init(dataSource: ParentObject) {
self.dataSource = dataSource
super.init(parentObject: dataSource, delegateProxy: RxGMSDataSourceDelegateProxy.self)
}
public static func registerKnownImplementations() {
register { RxGMSDataSourceDelegateProxy(dataSource: $0) }
}
var placeBehaviorSubject = BehaviorSubject<GMSPlace?>(value: nil)
public func tableDataSource(_ tableDataSource: GMSAutocompleteTableDataSource, didAutocompleteWith place: GMSPlace) {
placeBehaviorSubject.on(.next(place))
}
public func tableDataSource(_ tableDataSource: GMSAutocompleteTableDataSource, didFailAutocompleteWithError error: Error) {
}
deinit {
placeBehaviorSubject.on(.completed)
}
}
extension Reactive where Base == GMSAutocompleteTableDataSource{
public var delegate: DelegateProxy<GMSAutocompleteTableDataSource, GMSAutocompleteTableDataSourceDelegate> {
return RxGMSDataSourceDelegateProxy.proxy(for: base)
}
var sourceText:Binder<String?> {
return Binder(self.base) { (dataSource, text: String?) in
dataSource.sourceTextHasChanged(text)
}
}
public var didUpdateAutocompletePredictions: ControlEvent<Void> {
let source = delegate.methodInvoked(
#selector(GMSAutocompleteTableDataSourceDelegate.didUpdateAutocompletePredictions(for:))).map{_ in}
return ControlEvent(events: source)
}
public var didAutocompletePlace: ControlEvent<GMSPlace?> {
return ControlEvent(events: (delegate as! RxGMSDataSourceDelegateProxy).placeBehaviorSubject)
}
}

45
LocationInput/Info.plist Normal file
View File

@@ -0,0 +1,45 @@
<?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>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</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>

View File

@@ -0,0 +1,59 @@
//
// ViewController.swift
// LocationInput
//
// Created by Ruoyu Fu on 2019/5/2.
// Copyright © 2019 Tappollo. All rights reserved.
//
import UIKit
import GooglePlaces
import RxCocoa
import RxSwift
class ViewController: UIViewController {
let disposeBag = DisposeBag()
@IBOutlet weak var header: UIView!
@IBOutlet weak var pickupResults: UITableView!
@IBOutlet weak var dropoffResults: UITableView!
@IBOutlet weak var pickupField: UITextField!
@IBOutlet weak var dropoffField: UITextField!
let pickupSource = GMSAutocompleteTableDataSource()
let dropoffSource = GMSAutocompleteTableDataSource()
override func viewDidLoad() {
super.viewDidLoad()
setupView()
bindModels(textField: pickupField, table: pickupResults, source: pickupSource)
bindModels(textField: dropoffField, table: dropoffResults, source: dropoffSource)
}
func setupView() {
header.layer.masksToBounds = false
header.layer.shadowOffset = CGSize(width: 1, height: 1)
header.layer.shadowRadius = 3
header.layer.shadowOpacity = 0.3
}
func bindModels(textField: UITextField, table: UITableView, source: GMSAutocompleteTableDataSource) {
table.delegate = source
table.dataSource = source
Observable.merge([
textField.rx.controlEvent([.editingDidBegin]).map({false}),
textField.rx.controlEvent([.editingDidEnd]).map({true})
])
.bind(to: table.rx.isHidden)
.disposed(by: disposeBag)
textField.rx.text
.bind(to: source.rx.sourceText)
.disposed(by: disposeBag)
source.rx.didUpdateAutocompletePredictions
.bind {table.reloadData()}.disposed(by: disposeBag)
source.rx.didAutocompletePlace
.filter({$0 != nil})
.map({$0!.name})
.do(onNext: {_ in textField.resignFirstResponder()})
.bind(to: textField.rx.text)
.disposed(by: disposeBag)
}
}

View File

@@ -0,0 +1,22 @@
<?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>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@@ -0,0 +1,34 @@
//
// LocationInputTests.swift
// LocationInputTests
//
// Created by Ruoyu Fu on 2019/5/2.
// Copyright © 2019 Tappollo. All rights reserved.
//
import XCTest
@testable import LocationInput
class LocationInputTests: XCTestCase {
override func setUp() {
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}

19
Podfile Normal file
View File

@@ -0,0 +1,19 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'LocationInput' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for LocationInput
pod 'RxSwift'
pod 'RxCocoa'
pod 'GooglePlaces'
pod 'GoogleMaps'
target 'LocationInputTests' do
inherit! :search_paths
# Pods for testing
end
end

38
Podfile.lock Normal file
View File

@@ -0,0 +1,38 @@
PODS:
- GoogleMaps (3.0.3):
- GoogleMaps/Maps (= 3.0.3)
- GoogleMaps/Base (3.0.3)
- GoogleMaps/Maps (3.0.3):
- GoogleMaps/Base
- GooglePlaces (3.0.3):
- GoogleMaps/Base (= 3.0.3)
- RxAtomic (4.4.2)
- RxCocoa (4.4.2):
- RxSwift (>= 4.4.2, ~> 4.4)
- RxSwift (4.4.2):
- RxAtomic (>= 4.4.2, ~> 4.4)
DEPENDENCIES:
- GoogleMaps
- GooglePlaces
- RxCocoa
- RxSwift
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- GoogleMaps
- GooglePlaces
- RxAtomic
- RxCocoa
- RxSwift
SPEC CHECKSUMS:
GoogleMaps: fd5c9fa58871781b9fb94d4936f19c69fe60ce32
GooglePlaces: f09e76993c9c3ee4af8f4f7f535bb94d6aa3b649
RxAtomic: d00e97c10db88c6f08540e0bf2752fc5a2404167
RxCocoa: 477990dc3b4c3ff55fb0ac77e1cc06244e0aaec8
RxSwift: 74c29b693c8e42b0f64400e8b06564575742d649
PODFILE CHECKSUM: dda2c3e127c1387645cb61712b865b92b80b0077
COCOAPODS: 1.6.0