Skip to content

Commit 73ef77b

Browse files
committed
refactor: replaced all occurences of geocoding_ios to geocoding_darwin
1 parent 6ea0e33 commit 73ef77b

File tree

8 files changed

+25
-48
lines changed

8 files changed

+25
-48
lines changed

geocoding_ios/CHANGELOG.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
## 3.0.1
1+
## 3.1.0
22

3-
* Adds privacy manifest.
4-
5-
## 3.0.0
6-
7-
* **BREAKING CHANGES**:
8-
* Removes the `localeIdentifier` argument from all methods. Use method `setLocaleIdentifier` to configure the locale.
9-
* Removes old iOS version checks and expects iOS 12 and above. (minimal iOS version is 12 per 2.2.0)
10-
* Fixes to configure the locale.
11-
* Updated example app with locale example.
12-
13-
## 2.3.0
14-
15-
* Implements `isPresent` that always returns true.
16-
17-
## 2.2.0
18-
19-
* Updates `geocoding_platform_interface` to version 3.1.0.
20-
* Updates minimal iOS version of the example application to 12.
21-
22-
## 2.1.1
23-
24-
* Removes obsolete version check in `toPlacemarkDictionary`. This removes kABPersonAddressStreetKey deprecation warning from occurring.
25-
26-
## 2.1.0
27-
28-
* Splits from `geocoding` as a federated implementation.
3+
- Renames the package previously published as [`geocoding_ios`](https://pub.dev/packages/geocoding_ios)

geocoding_ios/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# geocoding\_ios
1+
# geocoding_darwin
22

33
The iOS implementation of [`geocoding`][1].
44

55
## Usage
66

77
This package is [endorsed][2], which means you can simply use `geocoding`
8-
normally. This package will be automatically included in your app when you do.
8+
normally. This package will be automatically included in your app when you do,
9+
so you do not need to add it to your `pubspec.yaml`.
910

1011
[1]: https://pub.dev/packages/geocoding
11-
[2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin
12+
[2]: https://flutter.dev/to/endorsed-federated-plugin

geocoding_ios/example/lib/plugin_example/geocode_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import 'package:flutter/material.dart';
2-
import 'package:geocoding_ios/geocoding_ios.dart';
2+
import 'package:geocoding_darwin/geocoding_darwin.dart';
33

44
import '../template/globals.dart';
55

66
/// Example [Widget] showing the use of the Geocode plugin
77
class GeocodeWidget extends StatefulWidget {
88
/// Constructs the [GeocodeWidget] class
9-
const GeocodeWidget({Key? key}) : super(key: key);
9+
const GeocodeWidget({super.key});
1010

1111
@override
1212
State<GeocodeWidget> createState() => _GeocodeWidgetState();
@@ -17,7 +17,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
1717
final TextEditingController _latitudeController = TextEditingController();
1818
final TextEditingController _longitudeController = TextEditingController();
1919
String _output = '';
20-
final GeocodingIOS _geocodingIOS = GeocodingIOS();
20+
final GeocodingDarwin _geocodingIOS = GeocodingDarwin();
2121

2222
@override
2323
void initState() {

geocoding_ios/example/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: geocoding_ios_example
1+
name: geocoding_darwin_example
22
description: Demonstrates how to use the geocoding plugin.
33

44
# The following line prevents the package from being accidentally published to
@@ -13,9 +13,9 @@ dependencies:
1313
flutter:
1414
sdk: flutter
1515

16-
geocoding_ios:
16+
geocoding_darwin:
1717
# When depending on this package from a real application you should use:
18-
# geocoding_ios: ^x.y.z
18+
# geocoding_darwin: ^x.y.z
1919
# See https://dart.dev/tools/pub/dependencies#version-constraints
2020
# The example app is bundled with the plugin so we use a path dependency on
2121
# the parent directory to use the current plugin's version.

geocoding_ios/ios/geocoding_ios.podspec renamed to geocoding_ios/ios/geocoding_darwin.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Run `pod lib lint geocoding.podspec' to validate before publishing.
44
#
55
Pod::Spec.new do |s|
6-
s.name = 'geocoding_ios'
6+
s.name = 'geocoding_darwin'
77
s.version = '1.0.5'
88
s.summary = 'A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.'
99
s.description = <<-DESC
@@ -20,5 +20,5 @@ A new flutter plugin project.
2020

2121
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
2222
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
23-
s.resource_bundles = {'geocoding_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
23+
s.resource_bundles = {'geocoding_darwin_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
2424
end

geocoding_ios/lib/geocoding_ios.dart renamed to geocoding_ios/lib/geocoding_darwin.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import 'package:geocoding_platform_interface/geocoding_platform_interface.dart';
66
const MethodChannel _channel = MethodChannel('flutter.baseflow.com/geocoding');
77

88
/// An implementation of [GeocodingPlatform] for iOS.
9-
class GeocodingIOS extends GeocodingPlatform {
9+
class GeocodingDarwin extends GeocodingPlatform {
1010
/// Registers this class as the default instance of [GeocodingPlatform].
1111
static void registerWith() {
12-
GeocodingPlatform.instance = GeocodingIOS();
12+
GeocodingPlatform.instance = GeocodingDarwin();
1313
}
1414

1515
String? _localeIdentifier;

geocoding_ios/pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: geocoding_ios
1+
name: geocoding_darwin
22
description: A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.
33
version: 3.0.1
4-
repository: https://github.com/baseflow/flutter-geocoding/tree/main/geocoding_ios
4+
repository: https://github.com/baseflow/flutter-geocoding/tree/main/geocoding_darwin
55
issue_tracker: https://github.com/Baseflow/flutter-geocoding/issues
66

77
environment:
@@ -36,4 +36,5 @@ flutter:
3636
platforms:
3737
ios:
3838
pluginClass: GeocodingPlugin
39-
dartPluginClass: GeocodingIOS
39+
dartPluginClass: GeocodingDarwin
40+
sharedDarwinSource: true

geocoding_ios/test/geocoding_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'package:flutter/services.dart';
22
import 'package:flutter_test/flutter_test.dart';
3-
import 'package:geocoding_ios/geocoding_ios.dart';
3+
import 'package:geocoding_darwin/geocoding_darwin.dart';
44
import 'package:geocoding_platform_interface/geocoding_platform_interface.dart';
55

66
final mockLocation = Location(
@@ -40,8 +40,8 @@ void main() {
4040
});
4141

4242
test('registers instance', () {
43-
GeocodingIOS.registerWith();
44-
expect(GeocodingPlatform.instance, isA<GeocodingIOS>());
43+
GeocodingDarwin.registerWith();
44+
expect(GeocodingPlatform.instance, isA<GeocodingDarwin>());
4545
});
4646

4747
group('GeocodingAndroid', () {
@@ -55,7 +55,7 @@ void main() {
5555
]);
5656
});
5757

58-
final geocoding = GeocodingIOS();
58+
final geocoding = GeocodingDarwin();
5959
final locations = await (geocoding.locationFromAddress(''));
6060

6161
expect(
@@ -80,7 +80,7 @@ void main() {
8080
]);
8181
});
8282

83-
final geocoding = GeocodingIOS();
83+
final geocoding = GeocodingDarwin();
8484
final locations = await (geocoding.placemarkFromCoordinates(0, 0));
8585

8686
expect(

0 commit comments

Comments
 (0)