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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:01:34+00:00 2026-05-28T21:01:34+00:00

I have been trying to develop an app for my ipad which i can

  • 0

I have been trying to develop an app for my ipad which i can use to connect to my local network devices in order to get files and so on without any progress.
What i want to do is to first detect the devices on the network and then select which i want to browse files from by connecting to it.

What i got so far is

    #import "BrowseForNetworkDevices.h"

@implementation BrowseForNetworkDevices

- (id)init
{    
    self = [super init];

    if (self) 
    {        
        services = [[NSMutableArray alloc] init]; 
        serviceBrowser = [[NSNetServiceBrowser alloc] init];
        [serviceBrowser setDelegate: delegateObject];        

        searching = NO;        
    }

    return self;    
}

- (void)dealloc
{    
    [services release];    
    [serviceBrowser release];
    [super dealloc];    
}



// Sent when browsing begins
- (void)netServiceBrowserWillSearch:(NSNetServiceBrowser *)browser
{    
    searching = YES;    
    [serviceBrowser searchForServicesOfType:@" " inDomain:@"local."];
    [self updateUI];    
}

// Sent when browsing stops
- (void)netServiceBrowserDidStopSearch:(NSNetServiceBrowser *)browser
{    
    searching = NO;    
    [self updateUI];    
}

// Sent if browsing fails
- (void)netServiceBrowser:(NSNetServiceBrowser *)browser
             didNotSearch:(NSDictionary *)errorDict
{    
    searching = NO;    
    [self handleError:[errorDict objectForKey:NSNetServicesErrorCode]];    
}

// Sent when a service appears
- (void)netServiceBrowser:(NSNetServiceBrowser *)browser
           didFindService:(NSNetService *)aNetService
               moreComing:(BOOL)moreComing
{    
    //[services addObject:aNetService];
    if (![services containsObject:aNetService]) {
        [self willChangeValueForKey:@"services"];
        [services addObject:aNetService];
        [self didChangeValueForKey:@"service"];
    }
    if(!moreComing)        
    {       
        [self updateUI];        
    }    
}

// Sent when a service disappears
- (void)netServiceBrowser:(NSNetServiceBrowser *)browser
         didRemoveService:(NSNetService *)aNetService
               moreComing:(BOOL)moreComing
{
    //[services removeObject:aNetService];
    if ([services containsObject:aNetService]) {
        [self willChangeValueForKey:@"service"];
        [services removeObject:aNetService];
        [self didChangeValueForKey:@"service"];
    }
    if(!moreComing)        
    {       
        [self updateUI];       
    }  
}

// Error handling code
- (void)handleError:(NSNumber *)error
{    
    NSLog(@"An error occurred. Error code = %d", [error intValue]);

   // Handle error here    
}



// UI update code
- (void)updateUI
{

    if(searching)        
    {        
        // Update the user interface to indicate searching
        for(Class obj in services){
            NSLog(@"service found %@", obj);
        }
        // Also update any UI that lists available services

    }    
    else        
    {        
        // Update the user interface to indicate not searching        
    }

}


@end

Any good tutorials on how to perform such task?

Thanks in advance for all the help

  • 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-28T21:03:53+00:00Added an answer on May 28, 2026 at 9:03 pm

    You will need both the network devices and your iPad to be speaking the same protocol. You will need to pick an appropriate protocol. It sounds like what you want to do is file transfer – there are many protocols that can handle this that are implemented in libraries for iOS:
    – WebDAV
    – HTTP
    – FTP
    – SFTP
    – AFP
    – SAMBA
    In order for the devices to detect one another you will need to use something like Apple’s Bonjour

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to get some features developed for my app which I don't
I have been trying to develop an app that will deal with content providers
I have been trying to develop a peer to peer application that uses Micosoft's
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
I have been trying to get around this error for a day now and
I have been trying to develop a Java ME application using WTK 2.5.2 (Java
I have been trying to develop an application in a landscape mode so I
int duplicate (int cards[5][4][13]) I have been trying to develop a function (the prototype
I've been trying to develop a dynamic library in C++ that can be run-time
I have been challenged by a professor to develop a little Bluetooth Demo app

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.