I have followed this guide [https://developer.xamarin.com/guides/cross-platform/macios/binding/objective-sharpie/examples/cocoapod/]
and created a binding project, added the contents of the two generated files from the binding folder (AFNetworking_ApiDefinitions.cs & AFNetworking_StructsAndEnums.cs). Then added the AFNetworking.framework that was also in the folder as a native reference to the binding project and there were many errors and i almost solved all except these 4 errors.
// -(BOOL)evaluateServerTrust:(SecTrustRef _Nonnull)serverTrustforDomain(NSString* _Nullable)domain;
[Export("evaluateServerTrust:forDomain:")]
unsafe bool EvaluateServerTrust(SecTrustRef* serverTrust, [NullAllowed] string domain);
}
error -/AFNetworkingBinding/AFNetworkingBinding/ApiDefinition.cs(34,34): Error CS0246: The type or namespace name `SecTrustRef' could not be found. Are you missing an assembly reference? (CS0246) (AFNetworkingBinding)
// -(instancetype _Nonnull)initWithReachability:(SCNetworkReachabilityRef _Nonnull)reachability __attribute__((objc_designated_initializer));
[Export("initWithReachability:")]
[DesignatedInitializer]
unsafe IntPtr Constructor(SCNetworkReachabilityRef* reachability);
error -Projects/AFNetworkingBinding/AFNetworkingBinding/ApiDefinition.cs(28,28): Error CS0246: The type or namespace name `SCNetworkReachabilityRef' could not be found. Are you missing an assembly reference? (CS0246) (AFNetworkingBinding)
// -(void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^ _Nullable)(NSURLSession * _Nonnull, NSURLAuthenticationChallenge * _Nonnull, NSURLCredential * _Nullable * _Nullable))block;
[Export("setSessionDidReceiveAuthenticationChallengeBlock:")]
unsafe void SetSessionDidReceiveAuthenticationChallengeBlock([NullAllowed] Func<NSUrlSession, NSUrlAuthenticationChallenge, Foundation.NSURLCredential*, NSUrlSessionAuthChallengeDisposition> block);
error - /Projects/AFNetworkingBinding/AFNetworkingBinding/ApiDefinition.cs(137,137): Error CS0234: The type or namespace name NSURLCredential' does not exist in the namespace
Foundation'. Are you missing an assembly reference? (CS0234) (AFNetworkingBinding)
// -(void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^ _Nullable)(NSURLSession * _Nonnull, NSURLSessionTask * _Nonnull, NSURLAuthenticationChallenge * _Nonnull, NSURLCredential * _Nullable * _Nullable))block;
[Export("setTaskDidReceiveAuthenticationChallengeBlock:")]
unsafe void SetTaskDidReceiveAuthenticationChallengeBlock([NullAllowed] Func<NSUrlSession, NSUrlSessionTask, NSUrlAuthenticationChallenge, Foundation.NSURLCredential*, NSUrlSessionAuthChallengeDisposition> block);
error -/Projects/AFNetworkingBinding/AFNetworkingBinding/ApiDefinition.cs(152,152): Error CS0234: The type or namespace name NSURLCredential' does not exist in the namespace
Foundation'. Are you missing an assembly reference? (CS0234) (AFNetworkingBinding)