facing problem when import Stripe package

48 views Asked by At
Launching lib/main.dart on new simulator in debug mode...
Xcode build done.                                           252.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/61/6wf76hg919x_7mvw1l2y2q380000gn/T/flutter_tools.qrN5RR/flutter_ios_build_temp_dirt4Yajk/temporary_xcresult_bundle

    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Stripe Sdk/CustomerSheet/ReactNativeCustomerAdapter.swift:156:125: warning: expression implicitly coerced from 'String?' to 'Any'
                self.stripeSdk.sendEvent(withName: "onCustomerAdapterSetSelectedPaymentOptionCallback", body: ["paymentOption": paymentOption?.value])
                                                                                          ^~~~~~~~~~~~~~~~~~~~
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Stripe Sdk/CustomerSheet/ReactNativeCustomerAdapter.swift:156:140: note: provide a default value to avoid this warning
                self.stripeSdk.sendEvent(withName: "onCustomerAdapterSetSelectedPaymentOptionCallback", body: ["paymentOption": paymentOption?.value])
                                                                                          ~~~~~~~~~~~~~~~^~~~~
                                                                                          ?? <#default value#>
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Stripe Sdk/CustomerSheet/ReactNativeCustomerAdapter.swift:156:140: note: force-unwrap the value to avoid this warning
                self.stripeSdk.sendEvent(withName: "onCustomerAdapterSetSelectedPaymentOptionCallback", body: ["paymentOption": paymentOption?.value])
                                                                                          ~~~~~~~~~~~~~~~^~~~~
                                                                                          !
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Stripe Sdk/CustomerSheet/ReactNativeCustomerAdapter.swift:156:140: note: explicitly cast to 'Any' with 'as Any' to silence this warning
                self.stripeSdk.sendEvent(withName: "onCustomerAdapterSetSelectedPaymentOptionCallback", body: ["paymentOption": paymentOption?.value])
                                                                                          ~~~~~~~~~~~~~~~^~~~~
                                                                                          as Any
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/StripePlugin.swift:291:20: warning: value 'resultList' was defined but never used; consider replacing with boolean test
                if let resultList = paymentResult as? [Any] {
                   ~~~~^~~~~~~~~~~~~              ~~~
                                                  is
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Stripe Sdk/CustomerSheet/ReactNativeCustomerAdapter.swift:156:125: warning: expression implicitly coerced from 'String?' to 'Any'
                self.stripeSdk.sendEvent(withName: "onCustomerAdapterSetSelectedPaymentOptionCallback", body: ["paymentOption": paymentOption?.value])
                                                                                          ^~~~~~~~~~~~~~~~~~~~
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Stripe Sdk/CustomerSheet/ReactNativeCustomerAdapter.swift:156:140: note: provide a default value to avoid this warning
                self.stripeSdk.sendEvent(withName: "onCustomerAdapterSetSelectedPaymentOptionCallback", body: ["paymentOption": paymentOption?.value])
                                                                                          ~~~~~~~~~~~~~~~^~~~~
                                                                                          ?? <#default value#>
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Stripe Sdk/CustomerSheet/ReactNativeCustomerAdapter.swift:156:140: note: force-unwrap the value to avoid this warning
                self.stripeSdk.sendEvent(withName: "onCustomerAdapterSetSelectedPaymentOptionCallback", body: ["paymentOption": paymentOption?.value])
                                                                                          ~~~~~~~~~~~~~~~^~~~~
                                                                                          !
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Stripe Sdk/CustomerSheet/ReactNativeCustomerAdapter.swift:156:140: note: explicitly cast to 'Any' with 'as Any' to silence this warning
                self.stripeSdk.sendEvent(withName: "onCustomerAdapterSetSelectedPaymentOptionCallback", body: ["paymentOption": paymentOption?.value])
                                                                                          ~~~~~~~~~~~~~~~^~~~~
                                                                                          as Any
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/StripePlugin.swift:291:20: warning: value 'resultList' was defined but never used; consider replacing with boolean test
                if let resultList = paymentResult as? [Any] {
                   ~~~~^~~~~~~~~~~~~              ~~~
                                                  is
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Bridge/RCTBridge.m:26:17: warning: property 'requiresMainQueueSetup' requires method 'requiresMainQueueSetup' to be defined - use @dynamic or provide a method implementation in this category [-Wobjc-property-implementation]
    @implementation NSObject (React)
                    ^
    In file included from /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Bridge/RCTBridge.m:1:
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Bridge/RCTBridge.h:57:46: note: property declared here
    @property (nonatomic, assign, readonly) BOOL requiresMainQueueSetup;
                                                 ^
    1 warning generated.
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Bridge/RCTBridge.m:26:17: warning: property 'requiresMainQueueSetup' requires method 'requiresMainQueueSetup' to be defined - use @dynamic or provide a method implementation in this category [-Wobjc-property-implementation]
    @implementation NSObject (React)
                    ^
    In file included from /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Bridge/RCTBridge.m:1:
    /Users/apple/.pub-cache/hosted/pub.dev/stripe_ios-10.1.0/ios/Classes/Bridge/RCTBridge.h:57:46: note: property declared here
    @property (nonatomic, assign, readonly) BOOL requiresMainQueueSetup;
                                                 ^
    1 warning generated.
    Unhandled exception:
    Null check operator used on a null value
    #0      Context.embedFlutterFrameworks (file:///Users/apple/Documents/flutter/sdk/flutter/packages/flutter_tools/bin/xcode_backend.dart:235:68)
    #1      Context.run (file:///Users/apple/Documents/flutter/sdk/flutter/packages/flutter_tools/bin/xcode_backend.dart:59:9)
    #2      main (file:///Users/apple/Documents/flutter/sdk/flutter/packages/flutter_tools/bin/xcode_backend.dart:17:5)
    #3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
    #4      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
    Command PhaseScriptExecution failed with a nonzero exit code
    /Users/apple/Documents/flutter projects/Flutter Projects/mentor-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'shared_preferences_foundation-shared_preferences_foundation_privacy' from project 'Pods')
    /Users/apple/Documents/flutter projects/Flutter Projects/mentor-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'path_provider_foundation-path_provider_foundation_privacy' from project 'Pods')
    /Users/apple/Documents/flutter projects/Flutter Projects/mentor-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'image_picker_ios-image_picker_ios_privacy' from project 'Pods')
    note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
    warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
    /Users/apple/Documents/flutter projects/Flutter Projects/mentor-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'GoogleSignIn-GoogleSignIn' from project 'Pods')
    /Users/apple/Documents/flutter projects/Flutter Projects/mentor-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'GoogleSignIn' from project 'Pods')
    /Users/apple/Documents/flutter projects/Flutter Projects/mentor-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'GTMSessionFetcher-GTMSessionFetcher_Core_Privacy' from project 'Pods')
    /Users/apple/Documents/flutter projects/Flutter Projects/mentor-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'GTMSessionFetcher' from project 'Pods')
    /Users/apple/Documents/flutter projects/Flutter Projects/mentor-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'GTMAppAuth' from project 'Pods')
    /Users/apple/Documents/flutter projects/Flutter Projects/mentor-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'AppAuth' from project 'Pods')

Could not build the application for the simulator.
Error launching application on new simulator.


Exited (1).
flutter clean
flutter pub get

deleted podfile.lock and pod file and regenerated them but still facing the same issue.

update the pod repo but did not worked for me.

For android it's working fine, but for iOS not working.

0

There are 0 answers