Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS not able to open UPI Apps #4

Open
affansk opened this issue Mar 21, 2024 · 4 comments
Open

IOS not able to open UPI Apps #4

affansk opened this issue Mar 21, 2024 · 4 comments

Comments

@affansk
Copy link

affansk commented Mar 21, 2024

lutter_pay_upi/FlutterPayUpiPlugin.swift:26: Fatal error: Unexpectedly found nil while unwrapping an Optional value
flutter_pay_upi/FlutterPayUpiPlugin.swift:26: Fatal error: Unexpectedly found nil while unwrapping an Optional value

  • thread 'RangeError' is not a subtype of type 'UpiException' in type cast #1, queue = 'com.apple.main-thread', stop reason = Fatal error: Unexpectedly found nil while unwrapping an Optional value
    frame #0: 0x00000001857233d4 libswiftCore.dylib_swift_runtime_on_report libswiftCore.dylib:
    -> 0x1857233d4 <+0>: ret
    libswiftCore.dylib: 0x1857233d8 <+0>: b 0x1857233d4 ; _swift_runtime_on_report libswiftCore.dylib:
    0x1857233dc <+0>: adrp x8, 452079
    0x1857233e0 <+4>: ldrb w0, [x8, #0xecc]

    Expanded(
    child: UPIAppList(onClick: (upiApp) async {
    print(upiApp);
    try {
    FlutterPayUpiManager.startPayment(
    paymentApp: upiApp!,
    payeeVpa: getPayeeDetails['payeeVpa']!,
    payeeName: getPayeeDetails['payeeName']!,
    amount: '1',
    description: getPayeeDetails['description']!,
    transactionRefId: getPayeeDetails['transactionId']!,
    payeeMerchantCode:
    getPayeeDetails['payeeMerchantCode']!,
    transactionId: getPayeeDetails['transactionId']!,
    response: (UpiResponse response, String amount) {
    final paymentCallBackRequest = callPayeeDetailsSet();
    paymentCallbackMutation
    .mutate(paymentCallBackRequest);
    },
    error: (e) {
    paymentFailureDialog();
    // _showRoundedDialog(context, e.toString());
    });
    } catch (e) {
    // Handle exceptions thrown within the try block
    print('Caught an exception: $e');
    // Add your exception handling logic here
    }
    // }
    }), // UPIAppList takes the available height
    ),

@affansk
Copy link
Author

affansk commented Mar 26, 2024

@abhishekbardolia?

@abhishekbardolia
Copy link
Owner

Have you add this line in info.plist? @affansk

<key>LSApplicationQueriesSchemes</key> <array> <string>phonepe</string> <string>tez</string> <string>paytm</string> <string>gpay</string> <string>BHIM</string> </array>

It is because of this you are getting range error. Please check and let me know.

@affansk
Copy link
Author

affansk commented Mar 27, 2024

LSApplicationQueriesSchemes

phonepe
tez
paytm
gpay
BHIM

	yes i have this line in info.plist and i am testing in Iphone 7

@affansk
Copy link
Author

affansk commented May 3, 2024

@abhishekbardolia you got a chance to see this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants