Skip to content

Commit cf4c1b1

Browse files
committed
Fixed iOS deprecation warnings
1 parent 102be74 commit cf4c1b1

File tree

6 files changed

+38
-16
lines changed

6 files changed

+38
-16
lines changed

geocoding_ios/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -149,6 +149,7 @@
149149
97C146EC1CF9000F007C117D /* Resources */,
150150
9705A1C41CF9048500538489 /* Embed Frameworks */,
151151
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
152+
AD45FF7066E03502A9EA61B3 /* [CP] Copy Pods Resources */,
152153
);
153154
buildRules = (
154155
);
@@ -165,7 +166,7 @@
165166
97C146E61CF9000F007C117D /* Project object */ = {
166167
isa = PBXProject;
167168
attributes = {
168-
LastUpgradeCheck = 1020;
169+
LastUpgradeCheck = 1510;
169170
ORGANIZATIONNAME = "";
170171
TargetAttributes = {
171172
97C146ED1CF9000F007C117D = {
@@ -208,10 +209,12 @@
208209
/* Begin PBXShellScriptBuildPhase section */
209210
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
210211
isa = PBXShellScriptBuildPhase;
212+
alwaysOutOfDate = 1;
211213
buildActionMask = 2147483647;
212214
files = (
213215
);
214216
inputPaths = (
217+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
215218
);
216219
name = "Thin Binary";
217220
outputPaths = (
@@ -244,6 +247,7 @@
244247
};
245248
9740EEB61CF901F6004384FC /* Run Script */ = {
246249
isa = PBXShellScriptBuildPhase;
250+
alwaysOutOfDate = 1;
247251
buildActionMask = 2147483647;
248252
files = (
249253
);
@@ -256,6 +260,23 @@
256260
shellPath = /bin/sh;
257261
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
258262
};
263+
AD45FF7066E03502A9EA61B3 /* [CP] Copy Pods Resources */ = {
264+
isa = PBXShellScriptBuildPhase;
265+
buildActionMask = 2147483647;
266+
files = (
267+
);
268+
inputFileListPaths = (
269+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
270+
);
271+
name = "[CP] Copy Pods Resources";
272+
outputFileListPaths = (
273+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
274+
);
275+
runOnlyForDeploymentPostprocessing = 0;
276+
shellPath = /bin/sh;
277+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
278+
showEnvVarsInLog = 0;
279+
};
259280
/* End PBXShellScriptBuildPhase section */
260281

261282
/* Begin PBXSourcesBuildPhase section */
@@ -332,7 +353,7 @@
332353
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
333354
GCC_WARN_UNUSED_FUNCTION = YES;
334355
GCC_WARN_UNUSED_VARIABLE = YES;
335-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
356+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
336357
MTL_ENABLE_DEBUG_INFO = NO;
337358
SDKROOT = iphoneos;
338359
SUPPORTED_PLATFORMS = iphoneos;
@@ -414,7 +435,7 @@
414435
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
415436
GCC_WARN_UNUSED_FUNCTION = YES;
416437
GCC_WARN_UNUSED_VARIABLE = YES;
417-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
438+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
418439
MTL_ENABLE_DEBUG_INFO = YES;
419440
ONLY_ACTIVE_ARCH = YES;
420441
SDKROOT = iphoneos;
@@ -463,7 +484,7 @@
463484
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
464485
GCC_WARN_UNUSED_FUNCTION = YES;
465486
GCC_WARN_UNUSED_VARIABLE = YES;
466-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
487+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
467488
MTL_ENABLE_DEBUG_INFO = NO;
468489
SDKROOT = iphoneos;
469490
SUPPORTED_PLATFORMS = iphoneos;

geocoding_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -50,6 +50,7 @@
5050
ignoresPersistentStateOnLaunch = "NO"
5151
debugDocumentVersioning = "YES"
5252
debugServiceExtension = "internal"
53+
enableGPUValidationMode = "1"
5354
allowLocationSimulation = "YES">
5455
<BuildableProductRunnable
5556
runnableDebuggingMode = "0">

geocoding_ios/example/lib/main.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class BaseflowPluginExample extends StatelessWidget {
1313
createMaterialColor(const Color.fromRGBO(48, 49, 60, 1));
1414

1515
/// Constructs the [BaseflowPluginExample] class
16-
BaseflowPluginExample({Key? key}) : super(key: key);
16+
BaseflowPluginExample({super.key});
1717

1818
@override
1919
Widget build(BuildContext context) {
@@ -68,28 +68,28 @@ class BaseflowPluginExample extends StatelessWidget {
6868
static MaterialColor createMaterialColor(Color color) {
6969
final strengths = <double>[.05];
7070
final swatch = <int, Color>{};
71-
final r = color.red, g = color.green, b = color.blue;
71+
final r = color.r, g = color.g, b = color.b;
7272

7373
for (var i = 1; i < 10; i++) {
7474
strengths.add(0.1 * i);
7575
}
7676
for (var strength in strengths) {
7777
final ds = 0.5 - strength;
7878
swatch[(strength * 1000).round()] = Color.fromRGBO(
79-
r + ((ds < 0 ? r : (255 - r)) * ds).round(),
80-
g + ((ds < 0 ? g : (255 - g)) * ds).round(),
81-
b + ((ds < 0 ? b : (255 - b)) * ds).round(),
79+
(r + ((ds < 0 ? r : (1.0 - r)) * ds) * 255).round(),
80+
(g + ((ds < 0 ? g : (1.0 - g)) * ds) * 255).round(),
81+
(b + ((ds < 0 ? b : (1.0 - b)) * ds) * 255).round(),
8282
1,
8383
);
8484
}
85-
return MaterialColor(color.value, swatch);
85+
return MaterialColor(color.toARGB32(), swatch);
8686
}
8787
}
8888

8989
/// A Flutter example demonstrating how the [pluginName] plugin could be used
9090
class AppHome extends StatefulWidget {
9191
/// Constructs the [AppHome] class
92-
const AppHome({Key? key, required this.title}) : super(key: key);
92+
const AppHome({super.key, required this.title});
9393

9494
/// The [title] of the application, which is shown in the application's
9595
/// title bar.

geocoding_ios/example/lib/plugin_example/geocode_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import '../template/globals.dart';
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();

geocoding_ios/example/lib/template/info_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'globals.dart';
66
/// [StatelessWidget] displaying information about Baseflow
77
class InfoPage extends StatelessWidget {
88
/// Constructs the [InfoPage] class
9-
const InfoPage({Key? key}) : super(key: key);
9+
const InfoPage({super.key});
1010

1111
@override
1212
Widget build(BuildContext context) {

geocoding_ios/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: geocoding_ios
22
description: A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.
3-
version: 3.0.1
3+
version: 3.0.2
44
repository: https://github.com/baseflow/flutter-geocoding/tree/main/geocoding_ios
55
issue_tracker: https://github.com/Baseflow/flutter-geocoding/issues
66

0 commit comments

Comments
 (0)