Skip to content

Commit 29dda15

Browse files
author
Igor Makarov
committed
don't use NSSelectorFromString - Apple seems to be rejecting apps that use it, even legitimately
1 parent ef9d161 commit 29dda15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/UIViewController+AnyPromise.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ - (AnyPromise *)promiseViewController:(UIViewController *)vc animated:(BOOL)anim
5656
}
5757

5858
if (!promise) {
59-
if (![vc respondsToSelector:NSSelectorFromString(@"promise")]) {
59+
if (![vc respondsToSelector:@selector(promise)]) {
6060
id userInfo = @{NSLocalizedDescriptionKey: @"ViewController is not promisable"};
6161
id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo];
6262
return [AnyPromise promiseWithValue:err];

Tests/TestUIViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private class MockViewController: UIViewController, Promisable {
9393

9494
var appeared = false
9595

96-
private override func viewDidAppear(_ animated: Bool) {
96+
fileprivate override func viewDidAppear(_ animated: Bool) {
9797
appeared = true
9898
}
9999
}

0 commit comments

Comments
 (0)