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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:24:14+00:00 2026-06-07T14:24:14+00:00

I made a class that uses the delegate pattern and I put it in

  • 0

I made a class that uses the delegate pattern and I put it in a static library. Then, I created a demo app to test the library. The demo just has a single view controller, and in the .h file, I have this:

@interface ViewController : UIViewController <AuthenticationDelegate>

@property (nonatomic, retain) IBOutlet UITextField *usernameTextField;
@property (nonatomic, retain) IBOutlet UITextField *passwordTextField;

@end

When I compile, I get an error right on the first line of the file that says:

Cannot find protocol declaration for ‘AuthenticationDelegate’.

But, in the .m file for the same view controller, I have:

#import "Authentication.h"
#import "ViewController.h"

The file “Authentication.h” is the only header file in my static library, and it does declare the delegate class:

@class AuthenticationProvider;
@protocol AuthenticationDelegate <NSObject>

@optional

- (void)provider:(AuthenticationProvider *)provider didReplyWithResponse:(AuthenticationProviderResponse)response;

@end

Where am I going wrong?

Update:

If I put #import "Authentication.h in ViewController.h, I get this:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_AuthenticationProvider", referenced from:
      objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I get that when I remove #import "Authentication.h from ViewController.m also.

  • 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-07T14:24:15+00:00Added an answer on June 7, 2026 at 2:24 pm

    Try #import "Authentication.h" in your classes .h file, not your .m file

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

Sidebar

Related Questions

I have put together a simple ASP.NET MVC 3 test web app that uses
I made a class library, and put it in GAC. It has one C#
I have a class library project that i have made. Let's call it ClassA.
I have made an openGL camera class that uses lazy evaluation to provide the
I have made an openGL camera class that uses lazy evaluation to provide the
I have a database class that I made that uses PDO to connect to
I've extended sorl-thumbnail's KVStoreBase class, and made a key-value backend that uses a single
So, I made a class that takes arrays and calculates a value from them.
I made a music class that will play a song. I have made onResume
This is a C++ class that I have made with n number of pointers.

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.