Skip to content

Commit

Permalink
ios 0.1.3 :
Browse files Browse the repository at this point in the history
* Upgrading `flutter_google_places_sdk_platform_interface` to `0.2.7`
* Updating GooglePlaces version restrictions to minimum 7.1.0
* Updating minimum iOS platform to 13.0
* Updating sdk minimum to 2.17.0
  • Loading branch information
matanshukry committed Sep 29, 2023
1 parent 07cd5a6 commit a70d570
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 31 deletions.
7 changes: 7 additions & 0 deletions flutter_google_places_sdk_ios/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.1.3

* Upgrading `flutter_google_places_sdk_platform_interface` to `0.2.7`
* Updating GooglePlaces version restrictions to minimum 7.1.0
* Updating minimum iOS platform to 13.0
* Updating sdk minimum to 2.17.0

## 0.1.2+4

* Implements latLngBoundsToMap
Expand Down
2 changes: 1 addition & 1 deletion flutter_google_places_sdk_ios/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class _MyHomePageState extends State<MyHomePage> {
final result = await _places.findAutocompletePredictions(
_predictLastText!,
countries: _countries,
placeTypeFilter: _placeTypeFilter,
placeTypesFilter: [_placeTypeFilter.apiExpectedValue],
newSessionToken: false,
origin: LatLng(lat: 43.12, lng: 95.20),
locationBias: _locationBias,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class SwiftFlutterGooglePlacesSdkIosPlugin: NSObject, FlutterPlugin {
let args = call.arguments as! Dictionary<String,Any>
let query = args["query"] as! String
let countries = args["countries"] as? [String]? ?? [String]()
let placeTypeFilter = args["typeFilter"] as? String
let placeTypeFilters = args["typesFilter"] as? [String]
let origin = latLngFromMap(argument: args["origin"] as? Dictionary<String, Any?>)
let newSessionToken = args["newSessionToken"] as? Bool
let locationBias = rectangularBoundsFromMap(argument: args["locationBias"] as? Dictionary<String, Any?>)
Expand All @@ -49,7 +49,7 @@ public class SwiftFlutterGooglePlacesSdkIosPlugin: NSObject, FlutterPlugin {

// Create a type filter.
let filter = GMSAutocompleteFilter()
filter.type = makeTypeFilter(typeFilter: placeTypeFilter);
filter.types = placeTypeFilters;
filter.countries = countries
filter.origin = origin
filter.locationBias = locationBias
Expand Down Expand Up @@ -128,28 +128,6 @@ public class SwiftFlutterGooglePlacesSdkIosPlugin: NSObject, FlutterPlugin {
}
}

private func makeTypeFilter(typeFilter: String?) -> GMSPlacesAutocompleteTypeFilter {
guard let typeFilter = typeFilter else {
return GMSPlacesAutocompleteTypeFilter.noFilter
}
switch (typeFilter.uppercased()) {
case "ADDRESS":
return GMSPlacesAutocompleteTypeFilter.address
case "CITIES":
return GMSPlacesAutocompleteTypeFilter.city
case "ESTABLISHMENT":
return GMSPlacesAutocompleteTypeFilter.establishment
case "GEOCODE":
return GMSPlacesAutocompleteTypeFilter.geocode
case "REGIONS":
return GMSPlacesAutocompleteTypeFilter.region
case "ALL":
fallthrough
default:
return GMSPlacesAutocompleteTypeFilter.noFilter
}
}

private func placeToMap(place: GMSPlace?) -> Dictionary<String, Any?> {
guard let place = place else {
return Dictionary<String, Any?>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ A new flutter plugin project.
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '11.0'
s.platform = :ios, '13.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64',
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'

# Dependencies
s.dependency 'GooglePlaces'
s.dependency 'GooglePlaces', '~> 7.1.0'
s.static_framework = true
end
7 changes: 3 additions & 4 deletions flutter_google_places_sdk_ios/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: flutter_google_places_sdk_ios
description: The iOS implementation of Flutter plugin for google places sdk
version: 0.1.2+4
version: 0.1.3
homepage: https://github.com/matanshukry/flutter_google_places_sdk/tree/master/flutter_google_places_sdk_ios

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.17.0 <4.0.0"
flutter: ">=1.12.0"

dependencies:
flutter:
sdk: flutter
flutter_google_places_sdk_platform_interface: # ^0.2.4+3
path: ../flutter_google_places_sdk_platform_interface
flutter_google_places_sdk_platform_interface: ^0.2.7

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit a70d570

Please sign in to comment.