Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

iOS Private APIs

$
0
0

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

@end


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>