I would like to implement an iOS private API in my Xamarin project. Can someone explain, how I can implement the following private API in Xamarin? I think I need to create a binding project, but I cannot get it to work.
The following code works when running in my native iOS project.
My .h file:
import <Foundation/Foundation.h>
@interface NSURLRequest (IgnoreSSL)
- (BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host;
@end My .m file:
import "NSURLRequest+IgnoreSSL.h"
@interface NSURLRequest () @end
@implementation NSURLRequest (IgnoreSSL)
- (BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host { // ignore certificate errors only for this domain return YES; }