Skip to content

Commit

Permalink
Swift 5 migration and bump to 3.2 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
mats-claassen authored Apr 8, 2019
1 parent 08fa8a2 commit 6299a22
Show file tree
Hide file tree
Showing 35 changed files with 472 additions and 174 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log
All notable changes to GooglePlacesRow will be documented in this file.

### [3.2.0](https://github.com/EurekaCommunity/GooglePlacesRow/releases/tag/3.2.0)
<!-- Released on 2018-10-08. -->

* Swift 5 migration
* Upgrade to GooglePlaces 3.3

### [3.1.0](https://github.com/EurekaCommunity/GooglePlacesRow/releases/tag/3.1.0)
<!-- Released on 2018-10-08. -->

Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "xmartlabs/Eureka" ~> 4.3
github "xmartlabs/Eureka" ~> 5.0
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "xmartlabs/Eureka" "4.0.1"
github "xmartlabs/Eureka" "5.0.0"
2 changes: 1 addition & 1 deletion Eureka
Submodule Eureka updated 69 files
+1 −1 .swift-version
+6 −12 .travis.yml
+10 −0 CHANGELOG.md
+1 −1 Eureka.playground/contents.xcplayground
+14 −14 Eureka.playground/timeline.xctimeline
+3 −3 Eureka.podspec
+22 −12 Eureka.xcodeproj/project.pbxproj
+1 −1 Eureka.xcodeproj/xcshareddata/xcschemes/Eureka.xcscheme
+22 −19 Example.xcodeproj/project.pbxproj
+1 −1 Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme
+1 −1 Example/Example/Base.lproj/Main.storyboard
+6 −3 Example/Example/Controllers/CustomDesignController.swift
+0 −1 Example/Example/Controllers/ValidationsController.swift
+1 −1 Example/Example/CustomCells.swift
+1 −1 Example/Example/Info.plist
+1 −2 LICENSE
+5 −7 README.md
+3 −2 Source/Core/BaseRow.swift
+1 −0 Source/Core/Cell.swift
+1 −0 Source/Core/CellType.swift
+34 −22 Source/Core/Core.swift
+30 −16 Source/Core/Form.swift
+1 −0 Source/Core/HeaderFooterView.swift
+51 −8 Source/Core/NavigationAccessoryView.swift
+1 −0 Source/Core/PresenterRowType.swift
+11 −3 Source/Core/Row.swift
+1 −0 Source/Core/RowControllerType.swift
+1 −0 Source/Core/RowProtocols.swift
+1 −0 Source/Core/RowType.swift
+39 −14 Source/Core/Section.swift
+1 −0 Source/Core/SelectableSection.swift
+1 −0 Source/Core/SwipeActions.swift
+2 −2 Source/Core/Validation.swift
+1 −1 Source/Info.plist
+1 −0 Source/Rows/ActionSheetRow.swift
+1 −1 Source/Rows/AlertRow.swift
+1 −0 Source/Rows/ButtonRow.swift
+1 −0 Source/Rows/ButtonRowWithPresent.swift
+5 −4 Source/Rows/CheckRow.swift
+1 −0 Source/Rows/Common/DateFieldRow.swift
+1 −0 Source/Rows/Common/DateInlineFieldRow.swift
+1 −0 Source/Rows/Common/DecimalFormatter.swift
+21 −10 Source/Rows/Common/FieldRow.swift
+1 −0 Source/Rows/Common/GenericMultipleSelectorRow.swift
+1 −0 Source/Rows/Common/SelectorRow.swift
+1 −0 Source/Rows/Controllers/MultipleSelectorViewController.swift
+1 −0 Source/Rows/Controllers/SelectorAlertController.swift
+1 −1 Source/Rows/Controllers/SelectorViewController.swift
+1 −0 Source/Rows/DateInlineRow.swift
+3 −2 Source/Rows/DatePickerRow.swift
+3 −2 Source/Rows/DoublePickerInputRow.swift
+3 −2 Source/Rows/DoublePickerRow.swift
+13 −0 Source/Rows/FieldsRow.swift
+1 −0 Source/Rows/LabelRow.swift
+1 −0 Source/Rows/PickerInlineRow.swift
+2 −1 Source/Rows/PickerInputRow.swift
+2 −1 Source/Rows/PickerRow.swift
+1 −0 Source/Rows/PopoverSelectorRow.swift
+1 −0 Source/Rows/PushRow.swift
+5 −3 Source/Rows/SegmentedRow.swift
+1 −0 Source/Rows/SelectableRows/ListCheckRow.swift
+2 −2 Source/Rows/SliderRow.swift
+13 −4 Source/Rows/StepperRow.swift
+1 −0 Source/Rows/SwitchRow.swift
+20 −5 Source/Rows/TextAreaRow.swift
+4 −3 Source/Rows/TriplePickerInputRow.swift
+4 −3 Source/Rows/TriplePickerRow.swift
+1 −1 Tests/Info.plist
+51 −0 Tests/SetValuesTests.swift
20 changes: 11 additions & 9 deletions Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,17 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1020;
TargetAttributes = {
28F828CB1C4B714D00330CF4 = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0920;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = 28F828C71C4B714D00330CF4 /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -301,6 +301,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -343,7 +344,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand All @@ -355,6 +356,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -391,7 +393,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -404,6 +406,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Frameworks",
Expand All @@ -412,8 +415,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -422,6 +424,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Frameworks",
Expand All @@ -430,8 +433,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Binary file modified Frameworks/GoogleMapsBase.framework/GoogleMapsBase
Binary file not shown.
2 changes: 2 additions & 0 deletions Frameworks/GoogleMapsBase.framework/Modules/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ framework module GoogleMapsBase {
export *
module * { export *}
link "z"
link framework "CoreFoundation"
link framework "CoreLocation"
link framework "CoreTelephony"
link framework "CoreText"
link framework "Security"}
Binary file modified Frameworks/GooglePlaces.framework/GooglePlaces
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ NS_ASSUME_NONNULL_BEGIN;

/**
* Type of the address component. For a list of supported types, see
* https://developers.google.com/places/ios-api/supported_types#table2. This string will be one
* https://developers.google.com/places/ios-sdk/supported_types#table2. This string will be one
* of the constants defined in GMSPlaceTypes.h.
*/
@property(nonatomic, readonly, copy) NSString *type;

/** Name of the address component, e.g. "Sydney" */
@property(nonatomic, readonly, copy) NSString *name;

/** Short name of the address component, e.g. "AU" */
@property(nonatomic, readonly, copy) NSString *_Nullable shortName;

@end

NS_ASSUME_NONNULL_END;
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import "GMSAutocompleteFilter.h"

@class GMSAutocompletePrediction;
@class GMSAutocompleteSessionToken;

NS_ASSUME_NONNULL_BEGIN;

Expand Down Expand Up @@ -84,6 +85,11 @@ NS_ASSUME_NONNULL_BEGIN;
/** Filter to apply to autocomplete suggestions (can be nil). */
@property(nonatomic, strong, nullable) GMSAutocompleteFilter *autocompleteFilter;

/**
* Provide a |GMSAutocompleteSessionToken| for tracking the specific autocomplete query flow.
*/
- (void)provideSessionToken:(GMSAutocompleteSessionToken *)sessionToken;

/**
* Notify the fetcher that the source text to autocomplete has changed.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,25 @@
//


#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN;

#if defined(__IPHONE_11_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0)
/**
* Attribute name for match fragments in |GMSAutocompletePrediction| attributedFullText.
*
* @related GMSAutocompletePrediction
*/
extern NSAttributedStringKey const kGMSAutocompleteMatchAttribute;
#else
/**
* Attribute name for match fragments in |GMSAutocompletePrediction| attributedFullText.
*
* @related GMSAutocompletePrediction
*/
extern NSString *const kGMSAutocompleteMatchAttribute;
#endif

/**
* This class represents a prediction of a full query based on a partially typed string.
Expand Down Expand Up @@ -68,14 +79,14 @@ extern NSString *const kGMSAutocompleteMatchAttribute;
@property(nonatomic, copy, readonly, nullable) NSAttributedString *attributedSecondaryText;

/**
* An optional property representing the place ID of the prediction, suitable for use in a place
* details request.
* A property representing the place ID of the prediction, suitable for use in a place details
* request.
*/
@property(nonatomic, copy, readonly, nullable) NSString *placeID;
@property(nonatomic, copy, readonly) NSString *placeID;

/**
* The types of this autocomplete result. Types are NSStrings, valid values are any types
* documented at <https://developers.google.com/places/ios-api/supported_types>.
* documented at <https://developers.google.com/places/ios-sdk/supported_types>.
*/
@property(nonatomic, copy, readonly) NSArray<NSString *> *types;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
#import "GMSAutocompleteFilter.h"
#import "GMSAutocompletePrediction.h"
#import "GMSPlace.h"

NS_ASSUME_NONNULL_BEGIN;
#import "GMSPlaceFieldMask.h"

@class GMSAutocompleteResultsViewController;

NS_ASSUME_NONNULL_BEGIN;

/**
* Protocol used by |GMSAutocompleteResultsViewController|, to communicate the user's interaction
* with the controller to the application.
Expand Down Expand Up @@ -138,6 +139,12 @@ NS_ASSUME_NONNULL_BEGIN;
/** The tint color applied to controls in the Autocomplete view. */
@property(nonatomic, strong, nullable) IBInspectable UIColor *tintColor;

/**
* Specify individual place details to fetch for object |GMSPlace|.
* Defaults to returning all details if not overidden.
*/
@property(nonatomic, assign) GMSPlaceField placeFields;

@end

NS_ASSUME_NONNULL_END;
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// GMSAutocompleteSessionToken.h
// Google Places API for iOS
//
// Copyright 2018 Google Inc.
//
// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
// Service: https://developers.google.com/maps/terms
//


#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN;

/**
* This class represents an session token to uniquely identify an series of queries to the Google
* Places API Services for fetching place predictions for a partial search string.
*/
@interface GMSAutocompleteSessionToken : NSObject
@end

NS_ASSUME_NONNULL_END;
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
#import "GMSAutocompleteFilter.h"
#import "GMSAutocompletePrediction.h"
#import "GMSPlace.h"

NS_ASSUME_NONNULL_BEGIN;
#import "GMSPlaceFieldMask.h"

@class GMSAutocompleteTableDataSource;

NS_ASSUME_NONNULL_BEGIN;

/**
* Protocol used by |GMSAutocompleteTableDataSource|, to communicate the user's interaction with the
* data source to the application.
Expand Down Expand Up @@ -147,6 +148,12 @@ NS_ASSUME_NONNULL_BEGIN;
/** The tint color applied to controls in the Autocomplete view. */
@property(nonatomic, strong, nullable) UIColor *tintColor;

/**
* The |GMSPlaceField| for specifying explicit place details to be requested. Default returns
* all avilable fields.
*/
@property(nonatomic, assign) GMSPlaceField placeFields;

/** Designated initializer */
- (instancetype)init NS_DESIGNATED_INITIALIZER;

Expand All @@ -162,6 +169,18 @@ NS_ASSUME_NONNULL_BEGIN;
*/
- (void)sourceTextHasChanged:(nullable NSString *)text;

/**
* Clear all predictions.
*
* NOTE: This will call the two delegate methods below:
*
* - |didUpdateAutocompletePredictionsForResultsController:|
* - |didRequestAutocompletePredictionsForResultsController:|
*
* The implementation of this method is guaranteed to call these synchronously and in-order.
*/
- (void)clearResults;

@end

NS_ASSUME_NONNULL_END;
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
#import "GMSAutocompleteFilter.h"
#import "GMSAutocompletePrediction.h"
#import "GMSPlace.h"

NS_ASSUME_NONNULL_BEGIN;
#import "GMSPlaceFieldMask.h"

@class GMSAutocompleteViewController;

NS_ASSUME_NONNULL_BEGIN;

/**
* Protocol used by |GMSAutocompleteViewController|, to communicate the user's interaction
* with the controller to the application.
Expand Down Expand Up @@ -153,6 +154,12 @@ NS_ASSUME_NONNULL_BEGIN;
/** The tint color applied to controls in the Autocomplete view. */
@property(nonatomic, strong, nullable) IBInspectable UIColor *tintColor;

/**
* Specify individual place details to fetch for object |GMSPlace|.
* Defaults to returning all details if not overidden.
*/
@property(nonatomic, assign) GMSPlaceField placeFields;

@end

NS_ASSUME_NONNULL_END;
Loading

0 comments on commit 6299a22

Please sign in to comment.