Unable to create Hotspot connection using NEHotspotConfigurationManager

Hi,

when I try to create a hotspot connection in my Xamarin.IOS project I get the following error returned in the description when using NEHotspotConfigurationManager :

Error Domain=NEHotspotConfigurationErrorDomain Code=8 \"internal error.\" UserInfo={NSLocalizedDescription=internal error.}

I have tried to connect to both the network in the office and my phone's wifi hotspot and both return the same message. I have enabled both the options "Accept WiFi Information" and "Hotspot" on both the App ID on the developer portal and also the same in the Entitlements.plist and still the same error. 

The code is written in a Xamarin.IOS project which is shown below :

NEHotspotConfiguration config = new NEHotspotConfiguration("WIFI SSID", "WIFIPASS", false);
config.JoinOnce = true;
TaskCompletionSource<NSError> tcs = new TaskCompletionSource<NSError>();
NEHotspotConfigurationManager.SharedManager.RemoveConfiguration("WIFI SSID");
NEHotspotConfigurationManager.SharedManager.ApplyConfiguration(config, err => tcs.SetResult(err));
NSError error = await tcs.Task;
if (error != null)
{
PAGE.IOSErrorAlert(error.Description, this);
return;
}

Unable to create Hotspot connection using NEHotspotConfigurationManager
 
 
Q