Version 1.22:

FlutterSDK: 1.22.1 dart: 2.10.1

LHHdeMacBook-Pro:next zcy$ dart --version
Dart SDK version: 2.101. (stable) (Tue Oct 6 10:54:20 2020 +0200) on "macos_x64"
LHHdeMacBook-Pro:next zcy$ flutter --version
Flutter 1.221. • channel stable • https://github.com/flutter/flutter.git
Framework • revision f30b7f4db9 (2Weekes, line)2020-10-08 10:06:30 -0700
Engine • revision 75bef9f6c8
Tools • Dart 2.101.
Copy the code

Xode: 12.1 (android students can upgrade) Pod: iOS upgrade to 1.10.0 (Q)

Possible problems: 1. Warnings

LHHdeMacBook-Pro:dev_122.1.Zcy $flutter build ios ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ Warning ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ Your Flutter application is created using  an older versionof the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project.
Copy the code

I checked it and said it was an Android compatibility problem, which does not affect the use of iOS. I am not sure about Android, so let’s see if we can solve it.

2. Upgrade the FLUTTER version. Dart version number has been given.

3. Error message, if any, there are two, do not handle

LinearGradient(
    begin: Alignment.centerRight,
    end: Alignment.centerLeft,
    colors: [/// List does not exist, but does not exist.
      Color(0xFFFF822C),
      Color(0xFFFF4416),
      Color(0xFFFF4416),
    ]),


AnimationController(
  duration: kThemeAnimationDuration,
  vsync: vsync,   TickerProvider does not exist, same problem as colors

);
Copy the code

This problem is caused by the dependency of the system library. The List and TickerProvider were all changed before, and then it was prompted to be changed back.

4. ChineseCupertinoLocalizations new two methods, must be rewritten, otherwise an error;

5.3 instead of using const LinearGradient definition, use var;

6. Dependency issues. Before we could reference header files without relying on other plugins, now we must rely on the corresponding plugin.

7. Name conflicts with class names in the system library. You can use ‘hide XXXX’, ‘as XXX’, or rename the class.

8. What is this

This requires the ‘control-flow-colllections’ language feature to be enabled.



Check, said by adding the following can be solved, the result still exists

analyzer:
  enable-experiment:
    - control-flow-collections
    - spread-collections
Copy the code

Finally, it was found that the lowest dart version in the environment was too low. Modify the environment in YAML in Plugin as follows:

environment:
  sdk: "> = 2.7.0 < 3.0.0"
Copy the code

9. Idevice_id and iProxy files have changed.- Idevice_id and iProxy cannot be opened in Flutter, the path given in this blog has changed, you can open it to see the file changes inside, the impact is not big, the iProxy address has not changed, when the pop-up permission reminder, still according to the original operation can be processed.

10. Update your podfile and post an update to your podfile.

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

# 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'.'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 Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages'.'flutter_tools'.'bin'.'podhelper'), flutter_root)

flutter_ios_podfile_setup
target Runner do
  platform :ios, '10.0'
  use_frameworks!
  use_modular_headers!
  source 'https://github.com/aliyun/aliyun-specs.git'
  source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
  pod 'Flutter'To:path= > 'Flutter'
  
  pod 'xxxx'
  pod 'xxxx'
  pod 'xxxx'
  pod 'xxxx'
  pod 'xxxx'

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end
Copy the code