"'Razorpay' was created for incompatible target arm64-apple-ios10.0" while building for flutter iOS simulator

1.1k Views Asked by At

After importing Razorpay plugin in flutter, my app is not building for iOS simulator. It is running on iOS Physical device and Android emulator but I'm unable to find out the reason for this error while building for simulator.

Error:

Launching lib/main.dart on iPhone 13 in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                           37.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **


Xcode's output:
↳
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
/Users/kaushalkishore/Developer/flutter/.pub-   cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.9/ios/Classes/RazorpayDelegate.swift:2:8: error: module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/kaushalkishore/StudioProjects/entryking/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
import Razorpay
       ^
/Users/kaushalkishore/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.9/ios/Classes/RazorpayDelegate.swift:2:8: error: module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/kaushalkishore/StudioProjects/entryking/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
import Razorpay
       ^
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order

Could not build the application for the simulator.
Error launching application on iPhone 13.
1

There are 1 best solutions below

3
On

You can resolve this problem by deleting the derived data in xcode and adding arm64 as excluded architecture.

Check this github issue for more info: issue