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

Unable to receive whether UIApplication.openURL(_:options:completionHandler:) was successful #128

Open
naoigcat opened this issue Jul 4, 2022 · 0 comments

Comments

@naoigcat
Copy link

naoigcat commented Jul 4, 2022

SCCAPIConnection.performRequest(_:error:) returns YES even if UIApplication.openURL(_:options:completionHandler:) fails (i.e. Square Point of Sale fails to launch).

The launch failure occurred once, but the condition of occurrence could not be specified.

Code

https://github.com/square/SquarePointOfSaleSDK-iOS/blob/291656d64d633a2876b61fa3f1b5c3935ebe2e3a/Sources/SCCAPIConnection.m#L83-92

+ (BOOL)_performRequestWithURL:(nonnull NSURL *)URL error:(out NSError *__nullable *__nullable)error;
{
    if (![self _canPerformRequestWithURL:URL error:error application:[UIApplication sharedApplication]]) {
        return NO;
    }

    [[UIApplication sharedApplication] openURL:URL options:@{} completionHandler:nil];

    return YES;
}
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