Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8156749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:03:21+00:00 2026-06-06T17:03:21+00:00

I need a notification from the system when airport is connecting to an ap.

  • 0

I need a notification from the system when airport is connecting to an ap. Is there any possibility to do that with the SystemConfiguration framework? I have problems to understand the systemconfigurations api documentation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:03:24+00:00Added an answer on June 6, 2026 at 5:03 pm

    You are on the right track with the SystemConfiguration network, which offers the SCNetworkReachability set of functions. You could try using

    SCNetworkReachabilitySetCallback
    

    to set a callback which will be called when the reachability changes; and

    SCNetworkReachabilityScheduleWithRunLoop
    

    to schedule the reachability check within the run loop

    Or you might try using a reachability framework (both for MacOS and iOS) which is built on top of the SystemConfiguration framework to make things even easier (higher-level).

    If you want to go the SystemConfiguration way, this is how you check for present reachability and install the callback to be notified of changes (source):

    - (void)checkReachability {
      NSString *server = [[NSUserDefaults standardUserDefaults] stringForKey:@"NCIDServer"];
    
      if (server == nil) {
        ncid_message_callback(self, [NSLocalizedString(@"No caller ID server was specified.", nil) UTF8String]);
        return;
      }
    
      const char *serverName = [[[server componentsSeparatedByString:@":"] objectAtIndex:0] UTF8String];
      SCNetworkReachabilityContext context = {0, (void *)self, NULL, NULL, NULL};
      networkReachability = SCNetworkReachabilityCreateWithName(NULL, serverName);
    
      if (networkReachability == NULL)
        goto fail;
    
      // If reachability information is available now, we don't get a callback later
      SCNetworkConnectionFlags flags;
    
      if (SCNetworkReachabilityGetFlags(networkReachability, &flags))
        networkReachabilityCallback(networkReachability, flags, self);
    
      if (!SCNetworkReachabilitySetCallback(networkReachability, networkReachabilityCallback, &context))
        goto fail;
    
      if (!SCNetworkReachabilityScheduleWithRunLoop(networkReachability, [[NSRunLoop currentRunLoop] getCFRunLoop], kCFRunLoopCommonModes))
         goto fail;
      return;
    
    fail:
      if (networkReachability != NULL)
        CFRelease(networkReachability);
    
      networkReachability = NULL; //-- ivar representing current reachability
    
    }
    

    And this is a sample of the callback:

    static void networkReachabilityCallback(SCNetworkReachabilityRef target,
                    SCNetworkConnectionFlags flags,
                    void *object) {
      // Observed flags:
      // - nearly gone: kSCNetworkFlagsReachable alone (ignored)
      // - gone: kSCNetworkFlagsTransientConnection | kSCNetworkFlagsReachable | kSCNetworkFlagsConnectionRequired
      // - connected: kSCNetworkFlagsIsDirect | kSCNetworkFlagsReachable
    
      if (networkReachability == NULL)
        return;
    
      if ((flags & kSCNetworkFlagsReachable) && !(flags & kSCNetworkFlagsConnectionRequired))    {
    
        if (isReachable) // typically receive a reachable message ~20ms before the unreachable one
        return;
    
        isReachable = YES;
        ncid_network_kill();
        [NSThread detachNewThreadSelector:@selector(runThread:) toTarget:object withObject:nil];
    
      } else {
        isReachable = NO;
        ncid_network_kill();
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just heard that - push notification is possible in iPhone I need
I have a Java servlet from which I need to send few notifications to
I have to developp an app that uses Push Notification in a particular way,
How can I cause the Android system to show a notification from my app,
i have put that url http://pvpcoach.com/notification.php in Instant Payment Notification setting in my profile
I have code that relies heavily on email notification. In my web.config I am
I have a very interesting task that I need help with. The description is
What's a good alternative to Notification Services now that Microsoft has removed it from
I am using local notification ,i need to update/delete the notification for that I
I have been playing with PostgreSQL's notification system and cannot for the life of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.