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

Cannot open e-wallet, because deprecated UIApplication.openURL(_:) #611

Open
RioRizkyRainey opened this issue Dec 26, 2024 · 0 comments
Open

Comments

@RioRizkyRainey
Copy link

🚨 Critical Issue: Replace Deprecated UIApplication.openURL(_:) to Restore E-Wallet Functionality

Description

The Midtrans iOS SDK is currently using the deprecated UIApplication.openURL(_:) method. This causes critical functionality issues when attempting to open external e-wallet apps like GoPay and ShopeePay.

This is a critical issue that affects user experience and functionality. I believe all related code affecting this issue should be reviewed and replaced to prevent further problems. Resolving this promptly is essential to ensure e-wallet integrations work seamlessly.

Issue Details

  • Deprecated API: UIApplication.openURL(_:)
  • Replacement API: UIApplication.open(_:options:completionHandler:)
  • Reason for Change:
    • The new API provides more options and a completion handler to handle the result of the open action, ensuring better compatibility with the latest iOS versions and future-proofing the SDK.
    • This issue directly impacts the ability to open external e-wallet apps like GoPay and ShopeePay, breaking functionality for users.

Impact

  • Xcode 16:
    • When building with Xcode 16, the app cannot open e-wallets such as GoPay and ShopeePay.
  • Xcode 15:
    • The issue does not occur in Xcode 15; functionality remains intact.

Proposed Solution

Replace all occurrences of UIApplication.openURL(_:) in the codebase with UIApplication.open(_:options:completionHandler:). This ensures that the entire SDK is updated to be fully compatible with the latest iOS versions and avoids similar issues in other parts of the code.

Example:

// Old Code
UIApplication.shared.openURL(url)

// New Code
UIApplication.shared.open(url, options: [:], completionHandler: nil)

Environment

Xcode Version: Xcode 16

References

Apple Documentation

Screenshots

Screenshot 2024-12-26 at 16 04 26

Please let me know if you needs more additional details.

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

1 participant