Search code examples
swiftxcodefluttercocoapodsrazorpay

Could not build the precompiled application for the device. Error launching application on Adaptabiz's iPad


When I remove Razorpay and run the code, it works fine. But when I install Razorpay, it throws this error. It used to work normally previously even after razorpay integration, but it suddenly started throwing this error. I was not able to run the app in ios Simulator through vs code. I was able to run my code in ios simulators through xcode. But now i can't run my code from both vscode and xcode. Here is my Error Log

Launching lib/main.dart on Adaptabiz's iPad in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: Y2NZK7M69V
Xcode build done.                                           31.3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/gourav/Desktop/VideoTailorClient app/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64-apple-ios.swiftinterface:12:8: error: no such module '_Concurrency'
    import _Concurrency
           ^
/Users/gourav/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.7/ios/Classes/RazorpayDelegate.swift:2:8: error: failed to build module 'Razorpay' from its module interface; the compiler that produced it, 'Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'
    import Razorpay
           ^
    /Users/gourav/Desktop/VideoTailorClient app/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64-apple-ios.swiftinterface:12:8: error: no such module '_Concurrency'
    import _Concurrency
           ^
/Users/gourav/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.7/ios/Classes/RazorpayDelegate.swift:2:8: error: failed to build module 'Razorpay' from its module interface; the compiler that produced it, 'Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'
    import Razorpay
           ^
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FMDB' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'OrderedSet' from project 'Pods')
Could not build the precompiled application for the device.

Error launching application on Adaptabiz's iPad.
Exited (sigterm)

this is the result of flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.0, on Mac OS X 10.15.7 19H1417 darwin-x64, locale en-SG)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.63.0)
[✓] Connected device (2 available)
    ! Error: Adaptabiz's iPad is busy: Copying cache files from device. Xcode will continue when Adaptabiz's iPad is finished. (code -10)

• No issues found!

Solution

  • Try updating your flutter,Xcode and Razorpay versions to latest available... This Worked for me.