Any help clue to debug this issue appreciated. Thanks.
Post
Replies
Boosts
Views
Activity
Any help on this appreciated. Thanks.
Thanks for the reply. But my requirement is through script only, how can I get it done? There has to be some way around it, right?
I recommend that you try this with native code built in to a native app. - I have created native app only with the help of py2app and for that I am giving location permission as well. But still I don't get those values.
Thanks for the explanation.
So I am wondering that if my application is going to be used in background only from CLI, will signing my code will give BSSID? Otherwise I can avoid spending time on this to understand how process works to sign code and all
On similar line, on MAC OS 13.x behaviour has changed looks like, once I allow Python location service from UI, I can see BSSID values. So behaviour has changed from at least older release.
Thanks for the prompt response.
I am writing one agent which need to scan WiFi and check for BSSID into golang, so once I compile this executable I currently run it from terminal(ssh into apple machine and run it manually through CMD) during development phase, once I am done developing it, will be run through separate process Via a launchd agent or Via a launchd daemon so user does not need to run it every time manually after boot.
If you want to see sample code part, I can host it over github for your reference as well, let me know which ever way works for you.
Thank you for such prompt reply.
I was going through the article and I must say it is very heavy to understand. I have one suggestion, It is totally missing one example where we can get all the steps to sign any code with respect to for example, App wants permission to get Location or any other type of permission with Apple Developer Account and how to sign/use that app in context of executable binary launchd (not developed with xcode, we can consider it developed in some other language, as normal xcode development process has handled through UI, I guess.).
I tried with launchd and looks like it is not working for me, I guess some info.plist or any other issue. Very hard to understand as not being Mac Developer hurting my chance to get into RCA.
Hi Experts, Any hint appreciated.
Hi eskimo,
I am able to successfully execute code below, also er is null but seems after switch off / on Wi-Fi from UI again it is asking for username and password.
OSStatus er = CWKeychainSetWiFiEAPUsernameAndPassword(d, nssid, onexuser, onexpass);
NSLog(@"Status: %@", er);```
Am I using wrong routine?
Would appreciate help here.
Hi, Did you get any fix for this issue? Looks like my problem is same, after using above call I can connect to Ssid but if I reboot Mac then after reboot it is asking for username and password again. Did you get any working solution? I tried with different routine corewlan seteapusernameandpassword as well but no avail.
Hi Nishant, Did you get any working solution with respect to BSSID nil?
I am getting same error with very simple below code as well, Also I analysed that hex value of NSLog is having same value. Is there any logs I can refer to further debug this ?
void SetUsernamePassword(char * cOnexuser, char * cOnexpass) {
NSString * onexuser = [[NSString alloc] initWithUTF8String:cOnexuser];
NSString * onexpass = [[NSString alloc] initWithUTF8String:cOnexpass];
NSData * nssid = [@"Testing" dataUsingEncoding:NSUTF8StringEncoding];
NSLog(@"NSSData: %@", nssid);
CWKeychainDomain d = kCWKeychainDomainUser;
OSStatus err;
err = CWKeychainSetWiFiEAPUsernameAndPassword(d, nssid, onexuser, onexpass);
NSLog(@"Status: %d", err);
}
You are perfectly right, even on my Xcode 14.2 above code is building perfectly and working as expected. Key shows up into keychain.
I remembered your earlier answer to my one of post that there is difference between permission when we execute CLI over SSH vs VNC and using Terminal. And that is where my issue was lying.
Thanks a lot for quick help.
Thanks Quinn, for looking into query. Yes, I am using ARC Mode while compiling.
Just to add more info, currently if I try to connect with nil ssid object with the help of associateToEnterpriseNetwork:identity:username:password:error: it crashes with
2024-01-08 12:00:35.291 osx-core-location[35472:7987323]
Object choosen: <CWNetwork: 0x600001f40000> [ssid=(null), bssid=(null), security=(null), rssi=-24, channel=<CWChannel: 0x600001f40180> [channelNumber=116(5GHz), channelWidth={80MHz}], ibss=0]
SIGILL: illegal instruction
PC=0x7ff80be65610 m=0 sigcode=1
signal arrived during cgo execution