From f8f1003387807cf86e4f3fb12a02b18c6a6fc555 Mon Sep 17 00:00:00 2001 From: Robert Virkus Date: Sun, 4 Feb 2024 17:26:41 +0100 Subject: [PATCH] chore: test on iOS --- ios/Flutter/AppFrameworkInfo.plist | 2 +- macos/Flutter/Flutter-Debug.xcconfig | 1 + macos/Flutter/Flutter-Release.xcconfig | 1 + macos/Podfile | 43 ++++++++++++++++++++++++++ pubspec.lock | 40 ++++++++++++++---------- 5 files changed, 70 insertions(+), 17 deletions(-) create mode 100644 macos/Podfile diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig index c2efd0b..4b81f9b 100644 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig index c2efd0b..5caa9d1 100644 --- a/macos/Flutter/Flutter-Release.xcconfig +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Podfile b/macos/Podfile new file mode 100644 index 0000000..c795730 --- /dev/null +++ b/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '10.14' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/pubspec.lock b/pubspec.lock index 07cf46a..675892a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -497,30 +497,38 @@ packages: enough_mail: dependency: "direct main" description: - path: "../enough_mail" - relative: true - source: path + path: "." + ref: HEAD + resolved-ref: "4acff84ef3e1ab074748b84ea8a374901fc872c7" + url: "https://github.com/Enough-Software/enough_mail.git" + source: git version: "2.1.6" enough_mail_app: dependency: "direct main" description: - path: "../enough_mail_app" - relative: true - source: path + path: "." + ref: HEAD + resolved-ref: "3fa482b6bbc4630b2de896aa2653a64055efa695" + url: "https://github.com/Enough-Software/enough_mail_app.git" + source: git version: "1.0.0+96" enough_mail_flutter: dependency: "direct main" description: - path: "../enough_mail_flutter" - relative: true - source: path + path: "." + ref: HEAD + resolved-ref: "38eb65ca7a34c2a7695618ed1301d7159c4d9deb" + url: "https://github.com/Enough-Software/enough_mail_flutter.git" + source: git version: "2.1.0" enough_mail_html: dependency: "direct main" description: - path: "../enough_mail_html" - relative: true - source: path + path: "." + ref: HEAD + resolved-ref: c7702322848a3fcc12e18225edccc5a2bdf318d5 + url: "https://github.com/Enough-Software/enough_mail_html.git" + source: git version: "2.0.1" enough_mail_icalendar: dependency: "direct main" @@ -1932,10 +1940,10 @@ packages: dependency: transitive description: name: webview_flutter_wkwebview - sha256: b99ca8d8bae9c6b43d568218691aa537fb0aeae1d7d34eadf112a6aa36d26506 + sha256: "4d062ad505390ecef1c4bfb6001cd857a51e00912cc9dfb66edb1886a9ebd80c" url: "https://pub.dev" source: hosted - version: "3.11.0" + version: "3.10.2" win32: dependency: transitive description: @@ -1977,5 +1985,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.3 <4.0.0" - flutter: ">=3.16.6" + dart: ">=3.2.0 <4.0.0" + flutter: ">=3.16.0"