I am making a framework for a company and I have completed all the code. I\'m now trying to package it into a framework. As a test I made a method with this name: -(v
please refer to : https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html
to answer your question, change
@interface Hello : NSObject
-(void)Hello:(NSString *)world;
@end
to
@interface CompanyMobile : NSObject{
}
+(void)Hello:(NSString *)world;
@end
and call the method [CompanyMobile Hello:@"world"];
You defined Hello:
as an instance method, but you're sending Hello:
to the class. To define a class method, you write + (void)Hello:
rather than - (void)Hello:
.