Skip to content

Commit

Permalink
Merge pull request #991 from ankit-thanekar007/issue_981
Browse files Browse the repository at this point in the history
Fixes for Issue 981
  • Loading branch information
jsligh authored Jun 3, 2024
2 parents 042857d + 75318b0 commit 66db238
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
@property (nonatomic, assign) UIInterfaceOrientation statusBarOrientation;
@property (nonatomic, assign, readonly) CGRect statusBarFrame;

- (BOOL)openURL:(nonnull NSURL*)url NS_DEPRECATED_IOS(2_0, 10_0, "Please use openURL:options:completionHandler: instead") NS_EXTENSION_UNAVAILABLE_IOS("");
- (BOOL)openURL:(nonnull NSURL*)url NS_SWIFT_NAME(openURL(url:)) NS_DEPRECATED_IOS(2_0, 10_0, "Please use openURL:options:completionHandler: instead") NS_EXTENSION_UNAVAILABLE_IOS("");

- (void)openURL:(nonnull NSURL*)url options:(nullable NSDictionary<NSString *, id> *)options completionHandler:(void (^ __nullable)(BOOL success))completion NS_AVAILABLE_IOS(10_0) NS_EXTENSION_UNAVAILABLE_IOS("");

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class MockUIApplication : PBMUIApplicationProtocol {

var openURLClosure:((URL)->Bool)?

func open(_ url: URL) -> Bool {
func openURL(url: URL) -> Bool {
return self.openURLClosure?(url) ?? false
}

func open(_ url: URL, options: [String : Any]? = [:], completionHandler completion: ((Bool) -> Void)? = nil) {
let result = open(url)
let result = openURL(url: url)
completion?(result)
}
}

0 comments on commit 66db238

Please sign in to comment.