Custom Cocoa Framework and a problem using it

Posted by happyCoding25 on Stack Overflow See other posts from Stack Overflow or by happyCoding25
Published on 2010-03-19T23:52:58Z Indexed on 2010/03/20 0:31 UTC
Read the original article Hit count: 380

Filed under:
|
|
|
|

Hello,

I made a custom cocoa framework just to experiment and find the best way to make one but ran in to a problem using it. The framework project builds and compiles just fine, but when I use it in an xcode project I get the error, 'LogTest' undeclared. The name of the framework is LogTest

Heres the code to my app that uses the framework:

AppDelegate.h:

#import <Cocoa/Cocoa.h>
#import <LogTest/LogTest.h>

@interface TestAppDelegate : NSObject <NSApplicationDelegate> {

NSWindow *window;

}

@property (assign) IBOutlet NSWindow *window;

@end

AppDelegate.m:

#import "TestAppDelegate.h"

@implementation TestAppDelegate

@synthesize window;

- (void)awakeFromNib {
[LogTest logStart:@"testing 123":@"testing 1234"]; //This is the line where the error occurs
}


@end

Framework Code........

LogTest.h:

#import <Cocoa/Cocoa.h>
#import "Method.h"


@protocol LogTest //Not sure if this is needed I just wanted a blank header


@end

Method.h:

#import <Cocoa/Cocoa.h>


@interface Method : NSObject {

}


+ (void)logStart:(NSString *)test:(NSString *)test2;

  @end

Method.m:

#import "Method.h"


@implementation Method

+ (void)logStart:(NSString *)test:(NSString *)test2 {
NSLog(test);
NSLog(test2);
}

@end

If anyone knows why I am getting this error please reply.

Thanks for any help

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about framework