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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:28:29+00:00 2026-06-04T12:28:29+00:00

A simple example of my problem: Within the BlahDataController.h @interface BlahDataController : NSObject -(NSString

  • 0

A simple example of my problem:

“Within the BlahDataController.h”

@interface BlahDataController : NSObject
-(NSString *)aMethod:(NSString *)theString;
@end

“Within the BlahDataController.m”

#import "BlahDataController.h"
@implementation BlahDataController

-(NSString *)aMethod:(NSString *)theString
{
    return @"Something";
}

@end

“Within BobViewController.h”

@interface BobViewController : NSObject
-(void)aMethodOfSomeSort;
@end

“Within BobViewController.m”

#import "BobViewController.h"
#import "BlahDataController.h"

@implementation BobViewController

-(void)aMethodOfSomeSort
{
    BlahDataController *blahDataController = [[BlahDataController alloc] init];
    NSLog(@"%@",[blahDataController aMethod:@"Variable"]);
}

@end

On the line “NSLog(@”%@”,[blahDataController aMethod:@”Variable”]);” I’m receiving the error: “No visible @interface for ‘BlahDataController’ declares the selector ‘aMethod:'”

Anyone know why this error is occurring?

-=-=-=-=-=-=-=-=-=-=-

The thing is, in my actual program, I have this same implementation and it works fine for hundreds of methods created this way. However, every so often, I’ll receive this error on a newly created method. I didn’t make it any differently. It just won’t recognize it’s newly created existence.

-=-=-=-=-=-=-=-=-=-=-

This is how I’m currently going around it, although I have no idea why the compiler accepts this way, but not the other:

Modify BobViewController.m:

#import "BobViewController.h"
#import "BlahDataController.h"
#import "AnotherDataController.h"

@implementation BobViewController

-(void)aMethodOfSomeSort
{
    BlahDataController *blahDataController = [[BlahDataController alloc] init];
    AnotherDataController *anotherDataController = [[AnotherDataController alloc] init];
    [anotherDataController fixedMethod:blahDataController theString:@"Variable"];
}

@end

“Within the AnotherDataController.h”

@interface AnotherDataController : NSObject
-(void)fixedMethod:(BlahDataController *)blahDataController theString:(NSString *)theString;
@end

“Within the AnotherDataController.m”

#import "AnotherDataController.h"
#import "BlahDataController.h"
@implementation AnotherDataController

-(void)fixedMethod:(BlahDataController *)blahDataController theString:(NSString *)theString
{
    NSLog(@"%@",[blahDataController aMethod:theString]);
}
@end

And….it works just fine…So I imagine xcode is just failing to recognize the method in one class, and working as it should in another…Man, I have no idea why this error is occurring…

-=-=-

Minor Update:
Doing the entire “xcode dance” didn’t solve the issue
1) Clean Build
2) Delete Derived Data
3) Completely Close XCode and reopen

  • 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-04T12:28:31+00:00Added an answer on June 4, 2026 at 12:28 pm

    tl;dr – There’s a duplicate file somewhere in the project! Go hunt it down and destroy it mercilessly!

    Ok, for all those in the future with this issue; this is what the problem was.

    I had made BlahDataController months ago. About a week ago, I restructured the folders of the project and moved BlahDataController from a folder called “Blah” to another folder called “Data”.

    When I changed the code for BlahDataController within the “Data” folder, one of my classes could see the changed code, however, another class couldn’t.

    What ended up being the issue was that when I moved BlahDataController, it actually created a copy of it. So I had a BlahDataController in the “Data” folder, and an older BlahDataController in the “Blah” folder. Even though the older BlahDataController was no longer attached to the project in the project manager (left side of xcode), the fact that the physical file still existed in the folder caused this issue.

    After deleting the duplicate older copy of BlahDataController, the issue was resolved.

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

Sidebar

Related Questions

This problem is not readily reproducible in a simple example here but was wondering
Consider the simple example below of implementing a method in an Enum. One problem
Can someone give me a simple example involving threads in this manner, please. Problem
First, a simple example to describe my problem. Model public class User { public
[Update]: my initial example doesn't reflect my problem. Updated the sample, hopfully it is
A simple example: Let's say I have one alias being sourced somewhere as: alias
This simple example fails to compile in VS2K8: io_service io2; shared_ptr<asio::deadline_timer> dt(make_shared<asio::deadline_timer>(io2, posix_time::seconds(20))); As
Very simple example: #include <string> #include <boost/program_options.hpp> namespace po = boost::program_options; int main(int argc,
Very simple example - hoping for a simple solution: char x[7]; if(fgets(x,5,stdin)) printf(y); else
if so can show simple example, ex in jquery ajax.post

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.