Skip to content

Commit

Permalink
fix: Build iOS 17
Browse files Browse the repository at this point in the history
  • Loading branch information
drminh2807 committed Sep 22, 2023
1 parent 02749b6 commit 5780538
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 28 deletions.
4 changes: 4 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
config.build_settings['ENABLE_BITCODE'] = 'NO'

# see https://github.com/flutter-webrtc/flutter-webrtc/issues/1054
Expand Down
2 changes: 1 addition & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
8C9CCA7C5C45651F90C7BFDD /* [CP] Check Pods Manifest.lock */,
C1005C4D261071B5002F4F32 /* Embed App Extensions */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
F9C8EE392B9AB471149C306E /* [CP] Embed Pods Frameworks */,
C1005C4D261071B5002F4F32 /* Embed App Extensions */,
);
buildRules = (
);
Expand Down
10 changes: 4 additions & 6 deletions lib/utils/url_launcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,10 @@ class UrlLauncher {
if (url != null) {
if (PlatformInfos.isMobile) {
await browser.open(
url: Uri.parse(url!),
options: ChromeSafariBrowserClassOptions(
android: AndroidChromeCustomTabsOptions(
shareState: CustomTabsShareState.SHARE_STATE_ON,
),
ios: IOSSafariOptions(barCollapsingEnabled: true),
url: WebUri(url!),
settings: ChromeSafariBrowserSettings(
shareState: CustomTabsShareState.SHARE_STATE_ON,
barCollapsingEnabled: true,
),
);
} else {
Expand Down
1 change: 1 addition & 0 deletions macos/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

# Xcode-related
**/xcuserdata/
**/DerivedData/
2 changes: 2 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import file_saver
import file_selector_macos
import firebase_core
import flutter_app_badger
import flutter_inappwebview
import flutter_local_notifications
import flutter_secure_storage_macos
import flutter_web_auth
Expand Down Expand Up @@ -51,6 +52,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FlutterAppBadgerPlugin.register(with: registry.registrar(forPlugin: "FlutterAppBadgerPlugin"))
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
FlutterWebAuthPlugin.register(with: registry.registrar(forPlugin: "FlutterWebAuthPlugin"))
Expand Down
47 changes: 28 additions & 19 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -815,11 +815,20 @@ packages:
flutter_inappwebview:
dependency: "direct main"
description:
name: flutter_inappwebview
sha256: f73505c792cf083d5566e1a94002311be497d984b5607f25be36d685cf6361cf
path: "."
ref: fix-xcode-17
resolved-ref: c7b1eb785c9b19ca6154c288e44e2d7b70c998fe
url: "https://github.com/Estrelio/flutter_inappwebview.git"
source: git
version: "6.0.0-beta.25"
flutter_inappwebview_internal_annotations:
dependency: transitive
description:
name: flutter_inappwebview_internal_annotations
sha256: "064a8ccbc76217dcd3b0fd6c6ea6f549e69b2849a0233b5bb46af9632c3ce2ff"
url: "https://pub.dev"
source: hosted
version: "5.7.2+3"
version: "1.1.0"
flutter_keyboard_visibility:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1270,66 +1279,66 @@ packages:
dependency: "direct main"
description:
name: image_picker
sha256: b6951e25b795d053a6ba03af5f710069c99349de9341af95155d52665cb4607c
sha256: "7d7f2768df2a8b0a3cefa5ef4f84636121987d403130e70b17ef7e2cf650ba84"
url: "https://pub.dev"
source: hosted
version: "0.8.9"
version: "1.0.4"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: "8179b54039b50eee561676232304f487602e2950ffb3e8995ed9034d6505ca34"
sha256: "47da2161c2e9f8f8a9cbbd89d466d174333fbdd769aeed848912e0b16d9cb369"
url: "https://pub.dev"
source: hosted
version: "0.8.7+4"
version: "0.8.8"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0"
sha256: "50bc9ae6a77eea3a8b11af5eb6c661eeb858fdd2f734c2a4fd17086922347ef7"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "3.0.1"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
sha256: b3e2f21feb28b24dd73a35d7ad6e83f568337c70afab5eabac876e23803f264b
sha256: c5538cacefacac733c724be7484377923b476216ad1ead35a0d2eadcdc0fc497
url: "https://pub.dev"
source: hosted
version: "0.8.8"
version: "0.8.8+2"
image_picker_linux:
dependency: transitive
description:
name: image_picker_linux
sha256: "02cbc21fe1706b97942b575966e5fbbeaac535e76deef70d3a242e4afb857831"
sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
version: "0.2.1+1"
image_picker_macos:
dependency: transitive
description:
name: image_picker_macos
sha256: cee2aa86c56780c13af2c77b5f2f72973464db204569e1ba2dd744459a065af4
sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
version: "0.2.1+1"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
sha256: c1134543ae2187e85299996d21c526b2f403854994026d575ae4cf30d7bb2a32
sha256: ed9b00e63977c93b0d2d2b343685bed9c324534ba5abafbb3dfbd6a780b1b514
url: "https://pub.dev"
source: hosted
version: "2.9.0"
version: "2.9.1"
image_picker_windows:
dependency: transitive
description:
name: image_picker_windows
sha256: c3066601ea42113922232c7b7b3330a2d86f029f685bba99d82c30e799914952
sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
version: "0.2.1+1"
import_sorter:
dependency: "direct dev"
description:
Expand Down
7 changes: 5 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies:
hive_flutter: ^1.1.0
http: ^0.13.4
image: ^4.0.15
image_picker: ^0.8.4+8
image_picker: ^1.0.4
intl: any
just_audio: ^0.9.30
just_audio_mpv: ^0.1.6
Expand Down Expand Up @@ -125,7 +125,10 @@ dependencies:
fluttertoast: ^8.2.2
rxdart: ^0.27.7
photo_manager: ^2.7.1
flutter_inappwebview: ^5.7.2+3
flutter_inappwebview:
git:
url: https://github.com/Estrelio/flutter_inappwebview.git
ref: fix-xcode-17
tuple: ^2.0.2
lottie: ^2.3.2
wechat_camera_picker: ^3.8.0
Expand Down

0 comments on commit 5780538

Please sign in to comment.