both flutter build ios fails and xcode build fails with weird error

352 views Asked by At

This error is new, everything was working until couple of days. I have tried all solutions in the internet but nothing works and the error is not descriptive.

I have Xcode: 12.5.1 Mac Big Sur: 11.5.2

I also have done this:

  • Deleted Pods folder inside the ios directory
  • Deleted the Podfile.lock file inside the ios directory
  • cd ios
  • pod install
  • pod update
  • cd ..
  • flutter clean
  • flutter pub get
  • flutter build ios --release

Dependencies are:

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  credit_card_type_detector: ^2.0.0
  cupertino_icons: ^1.0.2
  date_time_picker: "^2.1.0"
  flutter:
    sdk: flutter
  flutter_google_places: ^0.3.0
  flutter_native_splash: ^1.2.1
  flutter_stripe: ^1.2.0
  flutter_vibrate: ^1.1.0
  get: ^4.3.0
  get_storage: ^2.0.3
  http: ^0.13.3
  intl: ^0.17.0
  intl_phone_number_input: ^0.7.0+2
  pay: ^1.0.5
  pinput: ^1.2.0
  url_launcher: ^6.0.9
  
dev_dependencies:
  flutter_driver:
    sdk: flutter
  flutter_launcher_icons: "^0.9.0"
  flutter_test:
    sdk: flutter
  lint: ^1.0.0
  test: ^1.16.8

The following is the logs from the flutter build ios command.

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


Xcode's output:
↳
    /Users/rey/src/sponges/sponges-client-app/ios/Pods/libPhoneNumber-iOS/libPhoneNumber/NBPhoneNumberUtil.m:3482:51:
    warning: 'subscriberCellularProvider' is deprecated: first deprecated in iOS 12.0 [-Wdeprecated-declarations]
      NSString *isoCode = [[self.telephonyNetworkInfo subscriberCellularProvider] isoCountryCode];
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                                      serviceSubscriberCellularProviders
    In module 'CoreTelephony' imported from
    /Users/rey/src/sponges/sponges-client-app/ios/Pods/libPhoneNumber-iOS/libPhoneNumber/NBPhoneNumberUtil.m:20:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library
    /Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h:112:50: note: property
    'subscriberCellularProvider' is declared deprecated here
    @property(readonly, retain, nullable) CTCarrier *subscriberCellularProvider
    API_DEPRECATED_WITH_REPLACEMENT("serviceSubscriberCellularProviders", ios(4.0, 12.0)) API_UNAVAILABLE(macos);
                                                     ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library
    /Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h:112:50: note: 'subscriberCellularProvider' has
    been explicitly marked deprecated here
    1 warning generated.
    /Users/rey/src/sponges/sponges-client-app/ios/Pods/Stripe/Stripe3DS2/Stripe3DS2/STDSSecTypeUtilities.m:133:21:
    warning: 'SecCertificateCopyPublicKey' is deprecated: first deprecated in iOS 12.0 [-Wdeprecated-declarations]
            publicKey = SecCertificateCopyPublicKey(certificate);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                        SecCertificateCopyKey
    In module 'Security' imported from
    /Users/rey/src/sponges/sponges-client-app/ios/Pods/Stripe/Stripe3DS2/Stripe3DS2/STDSSecTypeUtilities.m:13:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library
    /Frameworks/Security.framework/Headers/SecCertificate.h:174:11: note: 'SecCertificateCopyPublicKey' has been
    explicitly marked deprecated here
    SecKeyRef SecCertificateCopyPublicKey(SecCertificateRef certificate)
              ^
    1 warning generated.
    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/CardFieldView.swift:31
    0:21: warning: expression implicitly coerced from '[String : Any?]' to '[String : Any]'
           onCardChange(cardData)
                        ^~~~~~~~
    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/CardFieldView.swift:31
    0:21: note: explicitly cast to '[String : Any]' with 'as [String : Any]' to silence this warning
           onCardChange(cardData)
                        ^~~~~~~~
                                 as [String : Any]
    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/Mappers.swift:371:25:
    warning: expression implicitly coerced from 'String?' to 'Any'
                    "type": mapFromPaymentIntentLastPaymentErrorType(lastPaymentError.type),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/Mappers.swift:371:25:
    note: provide a default value to avoid this warning
                    "type": mapFromPaymentIntentLastPaymentErrorType(lastPaymentError.type),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                            ?? <#default value#>
    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/Mappers.swift:371:25:
    note: force-unwrap the value to avoid this warning
                    "type": mapFromPaymentIntentLastPaymentErrorType(lastPaymentError.type),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                           !
    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/Mappers.swift:371:25:
    note: explicitly cast to 'Any' with 'as Any' to silence this warning
                    "type": mapFromPaymentIntentLastPaymentErrorType(lastPaymentError.type),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                            as Any
    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/StripeSdk.swift:214:77
    : warning: conditional downcast from 'CardFieldViewFactory?' to 'CardFieldManager' is equivalent to an implicit
    conversion to an optional 'CardFieldManager'
            let cardFieldUIManager = bridge.module(forName: "CardFieldManager") as? CardFieldManager
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/StripeSdk.swift:453:77
    : warning: conditional downcast from 'CardFieldViewFactory?' to 'CardFieldManager' is equivalent to an implicit
    conversion to an optional 'CardFieldManager'
            let cardFieldUIManager = bridge.module(forName: "CardFieldManager") as? CardFieldManager
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/StripeSdk.swift:498:77
    : warning: conditional downcast from 'CardFieldViewFactory?' to 'CardFieldManager' is equivalent to an implicit
    conversion to an optional 'CardFieldManager'
            let cardFieldUIManager = bridge.module(forName: "CardFieldManager") as? CardFieldManager
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

    /Users/rey/Development/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_ios-1.2.0/ios/Classes/StripeSdk.swift:565:77
    : warning: conditional downcast from 'CardFieldViewFactory?' to 'CardFieldManager' is equivalent to an implicit
    conversion to an optional 'CardFieldManager'
            let cardFieldUIManager = bridge.module(forName: "CardFieldManager") as? CardFieldManager
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~


    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete

Encountered error while building for device.

0

There are 0 answers