Skip to content

Commit a2ebbf5

Browse files
authored
Merge pull request #21 from BrowserStackCE/18-xcode-16-support
add: Xcode 16 support and fix warnings
2 parents 022ef2c + 17399b7 commit a2ebbf5

File tree

16 files changed

+141
-105
lines changed

16 files changed

+141
-105
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "interactive"
3+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Wed Sep 25 17:08:44 IST 2024
12
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
24
distributionPath=wrapper/dists
3-
zipStoreBase=GRADLE_USER_HOME
45
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
6+
zipStoreBase=GRADLE_USER_HOME
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
1+
#Wed Sep 25 17:08:39 IST 2024
22
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
34
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
6+
zipStoreBase=GRADLE_USER_HOME

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
platform :ios, '11.0'
2+
platform :ios, '12.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ EXTERNAL SOURCES:
1414
:path: ".symlinks/plugins/flutter_system_proxy/ios"
1515

1616
SPEC CHECKSUMS:
17-
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
17+
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
1818
flutter_system_proxy: 96eb97e3857a1d1bc533a6f7387a1f0dcb63d782
1919

20-
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
20+
PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048
2121

22-
COCOAPODS: 1.11.3
22+
COCOAPODS: 1.15.2

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
97C146E61CF9000F007C117D /* Project object */ = {
156156
isa = PBXProject;
157157
attributes = {
158-
LastUpgradeCheck = 1430;
158+
LastUpgradeCheck = 1510;
159159
ORGANIZATIONNAME = "";
160160
TargetAttributes = {
161161
97C146ED1CF9000F007C117D = {
@@ -342,7 +342,7 @@
342342
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
343343
GCC_WARN_UNUSED_FUNCTION = YES;
344344
GCC_WARN_UNUSED_VARIABLE = YES;
345-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
345+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
346346
MTL_ENABLE_DEBUG_INFO = NO;
347347
SDKROOT = iphoneos;
348348
SUPPORTED_PLATFORMS = iphoneos;
@@ -420,7 +420,7 @@
420420
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
421421
GCC_WARN_UNUSED_FUNCTION = YES;
422422
GCC_WARN_UNUSED_VARIABLE = YES;
423-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
423+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
424424
MTL_ENABLE_DEBUG_INFO = YES;
425425
ONLY_ACTIVE_ARCH = YES;
426426
SDKROOT = iphoneos;
@@ -469,7 +469,7 @@
469469
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
470470
GCC_WARN_UNUSED_FUNCTION = YES;
471471
GCC_WARN_UNUSED_VARIABLE = YES;
472-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
472+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
473473
MTL_ENABLE_DEBUG_INFO = NO;
474474
SDKROOT = iphoneos;
475475
SUPPORTED_PLATFORMS = iphoneos;

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

Lines changed: 1 addition & 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 = "1430"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

example/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

example/lib/main.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'dart:io';
2-
import 'dart:async';
32
import 'package:dio/adapter.dart';
43
import 'package:flutter/material.dart';
54
import 'package:dio/dio.dart';
@@ -35,13 +34,10 @@ class _MyHomePageState extends State<MyHomePage> {
3534
int _counter = 0;
3635
String _res = "Response";
3736
void _incrementCounter() {
38-
setState(() {
39-
_counter++;
40-
});
4137
fetchLocalHost().then((value) {
42-
print(value);
4338
setState(() {
44-
_res = value.toString();
39+
_counter++;
40+
_res = value;
4541
});
4642
});
4743
}
@@ -61,11 +57,11 @@ class _MyHomePageState extends State<MyHomePage> {
6157
),
6258
Text(
6359
'$_counter',
64-
style: Theme.of(context).textTheme.headline4,
60+
style: Theme.of(context).textTheme.headlineMedium,
6561
),
6662
Text(
6763
'$_counter:$_res',
68-
style: Theme.of(context).textTheme.bodyText1,
64+
style: Theme.of(context).textTheme.bodyLarge,
6965
)
7066
],
7167
),
@@ -80,17 +76,21 @@ class _MyHomePageState extends State<MyHomePage> {
8076
}
8177

8278
Future<String> fetchLocalHost() async {
79+
try {
8380
var dio = new Dio();
8481
var url = 'http://ip-api.com/json';
8582
var proxy = await FlutterSystemProxy.findProxyFromEnvironment(url);
86-
print(proxy);
8783
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate =
8884
(HttpClient client) {
8985
client.findProxy = (uri) {
9086
return proxy;
9187
};
88+
return null;
9289
};
9390
var response = await dio.get(url);
94-
print(response.toString());
9591
return response.toString();
92+
} catch (e) {
93+
print(e);
94+
return "Error";
95+
}
9696
}

0 commit comments

Comments
 (0)