Hello Experts,
I am trying to connect Mac Pro through command line utility using Mac OS API. I am successfully able to connect client though when network goes down and comes up again, on GUI dialog is again asking for username and password even though it was connected earlier. So I tried to use helper method CWKeychainSetWiFiEAPUsernameAndPassword
but unfortunately it is giving error code -108 Error: 0xFFFFFF94 -108 Failed to allocate memory.
My little code snippet looks as below,
BOOL result = [a associateToEnterpriseNetwork:network.anyObject identity:nil username:onexuser password:onexpass error:&connecterr];
NSLog(@"Association Result: %d", result);
NSLog(@"Error: %@", connecterr);
NSData *nssid = [network.anyObject ssidData];
CWKeychainDomain d = kCWKeychainDomainUser;
OSStatus er =
CWKeychainSetWiFiEAPUsernameAndPassword(kCWKeychainDomainUser, nssid, onexuser, onexpass);
NSLog(@"Status: %d", er);
Now I am not sure what could be the cause of error? Any pointers would be appreciated.