不明白为什么我会收到“未找到方法定义错误”

Don't see why I'm getting a “Method Definition not found error”

我不得不将一些现有代码从 AppDelegate 中移出并将其放置在公共 class 中,这样应用程序就不必重新启动了。在我执行此操作之前,一切都在构建而没有错误并且执行正常。这是我的 .h 文件中的代码:

#import <Foundation/Foundation.h>
#import "AppDelegate.h"
#import "SingletonClass.h"
#import "SettingsViewController.h"
#import "CoreData+MagicalRecord.h"

@interface CommonMethods : NSObject {

}

@property (nonatomic, strong) NSMutableArray *unsortedNailArray;
@property (nonatomic, strong) NSMutableArray *unsortedHairArray;
@property (nonatomic, strong) NSMutableArray *unsortedCustomArray;

-(void) sortAndReloadServicesArray: (NSMutableArray *) textboxValues;
-(void) initalizeEnsembles;

-(void) displayAlert: (NSString *)alertTitle andMessage: (NSString *)alertMessage andViewController: (UIViewController *) viewController andTag:(int)tag;
-(NSMutableDictionary *) createStaffNamesDictionary;
-(NSMutableArray *) createStaffNamesArray;
-(BOOL)testConnectionToInternet;

-(void) initializeEnsembles;  //  definition that is missing?

- (NSString *) convert12HourTimeTo24HourTime: dateString andReturnType: (NSString *) dateOrDateTime;
- (NSString *) convert24HourTimeTo12HourTime: (NSString *)timeString;
- (NSNumber *) checkForApptOverlap: startTime andStopTime: stopTime andServiceTech: serviceTech;

@end

这是关联的 .m 文件:

#import "CommonMethods.h"

@interface CommonMethods () <CDEPersistentStoreEnsembleDelegate>
@end

@implementation CommonMethods  {

CDEPersistentStoreEnsemble *ensemble;
CDEICloudFileSystem *cloudFileSystem;
}

@synthesize unsortedNailArray;
@synthesize unsortedHairArray;
@synthesize unsortedCustomArray;


#pragma mark - initializeEnsembles
-(void) initializeEnsembles  {  //  <---- here it is!

// set Ensembles verbose logging
CDESetCurrentLoggingLevel(CDELoggingLevelVerbose);

//  Ensemble: load the model
NSManagedObjectModel *model = [NSManagedObjectModel MR_newManagedObjectModelNamed:@"salonbook.momd"];  //  (xcdatamodeld)
[NSManagedObjectModel MR_setDefaultManagedObjectModel:model];

有类似的方法声明

-(void) initalizeEnsembles;
sortAndReloadServicesArray

之后

没有 i