1
1
mirror of https://github.com/VKCOM/vk-ios-sdk.git synced 2024-08-15 09:40:40 +03:00

Allow any certificates for tests, to avoid test failed with SSL connection failure

This commit is contained in:
Roman Truba 2016-06-27 20:36:47 +03:00
parent 1ae11dad91
commit db1865da6b

View File

@ -23,6 +23,12 @@
self.continueAfterFailure = NO;
[VKSdk initializeWithAppId:@"3974615" apiVersion:@"5.50"];
NSURL *URL = [NSURL URLWithString:@"https://api.vk.com"];
[NSURLRequest.class performSelector:NSSelectorFromString(@"setAllowsAnyHTTPSCertificate:forHost:")
withObject:NSNull.null // Just need to pass non-nil here to appear as a BOOL YES, using the NSNull.null singleton is pretty safe
withObject:[URL host]];
}
- (void)tearDown {