放大 GraphQL API 与 iOS 14 部署目标不兼容? (扑)

Amplify GraphQL API incompatible with iOS 14 deployment target? (flutter)

使用包 amplify_api 0.1.0 时,如果部署目标不是 9.0,iOS 应用程序将不会构建。删除 API 依赖项或在 podfile 中使用 ios: 9.0 会导致构建成功。有人知道出了什么问题或如何解决吗?

这是输出,其中包含很多错误,其中许多似乎是重复的。

Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/USER/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio-0.6.9/darwin/Classes/UriAudioSource.m:25:84: warning: 'stringByReplacingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding. [-Wdeprecated-declarations]
            item = [[IndexedPlayerItem alloc] initWithURL:[NSURL fileURLWithPath:[[uri stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] substringFromIndex:7]]];
                                                                                       ^
    In module 'UIKit' imported from /Users/USER/APPS/APPNAME/ios/Pods/Target Support Files/just_audio/just_audio-prefix.pch:2:
    In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:596:1: note: 'stringByReplacingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here
    - (nullable NSString *)stringByReplacingPercentEscapesUsingEncoding:(NSStringEncoding)enc API_DEPRECATED("Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding.", macos(10.0,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));
    ^
    1 warning generated.
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/Compression.swift:59:25: warning: 'withUnsafeBytes' is deprecated: use `withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R` instead
            return try data.withUnsafeBytes { (bytes:UnsafePointer<UInt8>) -> Data in
                            ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/Compression.swift:83:29: warning: initialization of 'UnsafeMutablePointer<UInt8>' results in a dangling pointer
                strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/Compression.swift:83:57: note: implicit argument conversion from '[UInt8]' to 'UnsafeMutablePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
                strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
                                                            ^~~~~~~
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/Compression.swift:83:57: note: use the 'withUnsafeMutableBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
                strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
                                                            ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/Compression.swift:145:33: warning: initialization of 'UnsafeMutablePointer<UInt8>' results in a dangling pointer
                    strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/Compression.swift:145:61: note: implicit argument conversion from '[UInt8]' to 'UnsafeMutablePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
                    strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
                                                                ^~~~~~~
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/Compression.swift:145:61: note: use the 'withUnsafeMutableBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
                    strm.next_out = UnsafeMutablePointer<UInt8>(&buffer)
                                                                ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/Compression.swift:140:14: warning: 'withUnsafeBytes' is deprecated: use `withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R` instead
            data.withUnsafeBytes { (ptr:UnsafePointer<UInt8>) -> Void in
                 ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/SSLSecurity.swift:172:13: warning: 'SecTrustEvaluate' was deprecated in iOS 13.0: renamed to 'SecTrustEvaluateWithError(_:_:)'
                SecTrustEvaluate(trust,&result)
                ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/SSLSecurity.swift:172:13: note: use 'SecTrustEvaluateWithError(_:_:)' instead
                SecTrustEvaluate(trust,&result)
                ^~~~~~~~~~~~~~~~
                SecTrustEvaluateWithError
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/SSLSecurity.swift:220:9: warning: 'SecTrustEvaluate' was deprecated in iOS 13.0: renamed to 'SecTrustEvaluateWithError(_:_:)'
            SecTrustEvaluate(trust, &result)
            ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/SSLSecurity.swift:220:9: note: use 'SecTrustEvaluateWithError(_:_:)' instead
            SecTrustEvaluate(trust, &result)
            ^~~~~~~~~~~~~~~~
            SecTrustEvaluateWithError
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/SSLSecurity.swift:221:16: warning: 'SecTrustCopyPublicKey' was deprecated in iOS 14.0: renamed to 'SecTrustCopyKey(_:)'
            return SecTrustCopyPublicKey(trust)
                   ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/SSLSecurity.swift:221:16: note: use 'SecTrustCopyKey(_:)' instead
            return SecTrustCopyPublicKey(trust)
                   ^~~~~~~~~~~~~~~~~~~~~
                   SecTrustCopyKey
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:199:33: warning: 'SSLSetEnabledCiphers' was deprecated in iOS 13.0: No longer supported. Use Network.framework.
                        let resIn = SSLSetEnabledCiphers(sslContextIn, cipherSuites, cipherSuites.count)
                                    ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:200:34: warning: 'SSLSetEnabledCiphers' was deprecated in iOS 13.0: No longer supported. Use Network.framework.
                        let resOut = SSLSetEnabledCiphers(sslContextOut, cipherSuites, cipherSuites.count)
                                     ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:280:13: warning: 'SSLGetPeerDomainNameLength' was deprecated in iOS 13.0: No longer supported. Use Network.framework.
                SSLGetPeerDomainNameLength(sslContextOut, &peerNameLen)
                ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:282:30: warning: 'withUnsafeMutableBytes' is deprecated: use `withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R` instead
                let _ = peerName.withUnsafeMutableBytes { (peerNamePtr: UnsafeMutablePointer<Int8>) in
                                 ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:283:17: warning: 'SSLGetPeerDomainName' was deprecated in iOS 13.0: No longer supported. Use Network.framework.
                    SSLGetPeerDomainName(sslContextOut, peerNamePtr, &peerNameLen)
                    ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:1326:14: warning: 'withUnsafeBytes' is deprecated: use `withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R` instead
            data.withUnsafeBytes { _ = CC_SHA1([=12=], CC_LONG(data.count), &digest) }
                 ^
    /Users/USER/APPS/APPNAME/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:1327:16: warning: 'init(bytes:)' is deprecated: use `init(_:)` instead
            return Data(bytes: digest).base64EncodedString()
                   ^
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    /Users/USER/APPS/APPNAME/ios/Pods/AppSyncRealTimeClient/AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+ErrorHandler.swift:9:8: error: compiling for iOS 9.0, but module 'Starscream' has a minimum deployment target of iOS 14.0: /Users/USER/APPS/APPNAME/build/ios/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
    import Starscream
           ^
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

将这个添加到 Podfile 中就可以了。

post_install do |installer|
   installer.pods_project.targets.each do |target|
     flutter_additional_ios_build_settings(target)
+    target.build_configurations.each do |config|
+      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
+    end
   end
 end