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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:58:59+00:00 2026-05-14T06:58:59+00:00

The idea it’s very easy, i have an http download class, this class must

  • 0

The idea it’s very easy, i have an http download class, this class must support the http authentication but it’s basically a background thread so i would like to avoid to prompt directly to the screen, i would like to use a delegate method to require from outside of the class, like a viewController.

But i don’t know if is possible or if i have to use a different syntax.

This class use this delegate protocol:

//Updater.h
@protocol Updater <NSObject>
-(NSDictionary *)authRequired;
@optional
-(void)statusUpdate:(NSString *)newStatus;
-(void)downloadProgress:(int)percentage;
@end



@interface Updater : NSThread {
...
}

This is the call to the delegate method:

//Updater.m
// This check always fails :(
if ([self.delegate respondsToSelector:@selector(authRequired:)]) { 
    auth = [delegate authRequired];
}

This is the implementation of the delegate method

//rootViewController.m
-(NSDictionary *)authRequired;
{
    // TODO: some kind of popup or modal view
    NSMutableDictionary *ret=[[NSMutableDictionary alloc] init]; 
    [ret setObject:@"utente" forKey:@"user"];
    [ret setObject:@"password" forKey:@"pass"];
    return ret;
}
  • 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-14T06:58:59+00:00Added an answer on May 14, 2026 at 6:58 am
    if ([self.delegate respondsToSelector:@selector(authRequired:)]) { 
    

    In ObjC, the colons (:) in the method name is significant. That means authRequired and authRequired: are different methods. Try this instead:

    if ([delegate respondsToSelector:@selector(authRequired)]) {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The idea is to start a chat. So I have this properties in my
The idea of the class is to create X squares on the screen, and
Any idea why this function doesn't work properly in Internet Explorer? function days_between(check_in, check_out)
Any idea how to set background color of a UIButton? I tried to use
Any idea why this does not validate ( under w3c ) <?=date('Y')?> Doc type
Any idea how to draw square gradient using xml in android? http://www.filterforge.com/wiki/index.php/Square_Gradient
Any idea how to fix this error in Visual Studio? This error occurs when
The idea is to produce utility class , so that whenever the guys hack
Any idea about this error? gcc -oxtmpmain.exe xtmpmain.o fiber_driver.o xtmp_options.o getopt.o D:\usr\xtensa\XtDevToolsDE\in stall\tools\RB-2008.4-win32\XtensaTools\lib\iss\xtmp.lib xtmpmain.o(.text+0x213):xtmpmain.c:
The idea behind this code is that it uses an extension method to instantiate

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.