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 3803940
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:26:27+00:00 2026-05-19T14:26:27+00:00

Is there a straight forward way to brut force the network connection (cellular and

  • 0

Is there a straight forward way to “brut force” the network connection (cellular and WIFI) off and back on on an iphone? I’m working on an application that syncs through dropbox and would like to test & debug my error recovery code from lost connections.

UPDATE: I should have been a bit more specific, I want to turn this off in sw. For example after launching a request to dropbox, I want to simulate a failed download by turning off the network.

  • 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-05-19T14:26:27+00:00Added an answer on May 19, 2026 at 2:26 pm

    Open Settings, and turn Airplane Mode on to disable all network connections; off to re-enable.

    EDIT: To enable Airplane Mode using iOS SDK (2.x and maybe 3.x), try Erica Sadun’s code:

    #import <UIKit/UIKit.h>
    #import <UIKit/UIApplication.h>
    #include <dlfcn.h>
    #include <stdio.h>
    
    // Framework Paths
    #define SBSERVPATH  "/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices"
    #define UIKITPATH "/System/Library/Framework/UIKit.framework/UIKit"
    
    int main(int argc, char **argv)
    {
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    
       //
       // For testing try issuing the following: 
       //         ap y; sleep 5; ./ap n
       //
    
       if (argc < 2)
       {
          printf("Usage: %s (y | n)\n", argv[0]);
          exit(-1);
       }
    
       // Argument used to switch airplane mode off or on
       BOOL yorn = [[[NSString stringWithCString:argv[1]] 
                        uppercaseString] hasPrefix:@"Y"];
    
       // Fetch the SpringBoard server port
       mach_port_t *p;
       void *uikit = dlopen(UIKITPATH, RTLD_LAZY);
       int (*SBSSpringBoardServerPort)() = 
             dlsym(uikit, "SBSSpringBoardServerPort");
       p = SBSSpringBoardServerPort(); 
       dlclose(uikit);
    
       // Link to SBSetAirplaneModeEnabled
       void *sbserv = dlopen(SBSERVPATH, RTLD_LAZY);
       int (*setAPMode)(mach_port_t* port, BOOL yorn) = 
             dlsym(sbserv, "SBSetAirplaneModeEnabled");
       setAPMode(p, yorn);
       dlclose(sbserv);
    
       [pool release];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a trivial, or at least moderately straight-forward way to generate territory maps
Is there a straight forward way to decode a base64 string using ONLY THE
Is there a straight forward way to do it? I'm stuck here: #include <iostream>
Is there a straight forward way to view the SQL command text actually executed
Is there a straight forward way to extract Pear packages and use them as
In PHP/AJAX, is there a straight forward way to display a certain number rows
Is there a straight forward CSS way to make the border of an element
Is there a more straight-forward way to do this? for_each(v_Numbers.begin(), v_Numbers.end(), bind1st(operator<<, cout)); Without
Any straight forward way to measure the height of text? The way I am
Is there a straightforward way to query a web service to see which messages

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.