No functions in class called in app developed in Monterey running on Catalina

 have an Objective C app originally developed in Xcode 12.3 on Catalina and ported to Xcode 13.4 on Monterey. The minimum OS version is set to 10.12 (Catalina). In the app is a class ImageController defined as below, with a number of functions

ImageController.h

#import <Cocoa/Cocoa.h>
@class AppDelegate;
…

@interface ImagesController : NSArrayController {
    …
- (void)addFileAtIndex:(NSString *)filePath index:(NSUInteger)index;
}

ImageController.m

#import "ImagesController.h"
…

#import "AppDelegate.h"
…
@implementation ImagesController

- (void)addFileAtIndex:(NSString*)filePath index:(NSUInteger) index{
...
     NSMutableArray *filesToAdd = [NSMutableArray array];

      [filesToAdd addObject:[CSSImageInfo containerWithPath:filePath]];

      NSMutableIndexSet *indexSet = [NSMutableIndexSet indexSetWithIndex:index];

       self insertObjects:filesToAdd atArrangedObjectIndexes:indexSet];
       NSInteger selectedIndex = [self selectionIndex];
        …
    }

When the function addFileAtIndex is called (with [imagesController addFileAtIndex:filename index:selectedIndex]; the app running on Monterey it executes normally. When is is called from the app running on Catalina it is never entered. What do I have to do to make the function accessible on Catalina?

Turns out the problem had nothing to do with MacOS version - the Catalina instance was trying to write a file to a folder with no write access and the success of the write was not being tested. The resulting error came much later. The problem was resolved by installing Xcode 12.3 on the Catalina instance and running the app from inside it, stopping to inspect values at various stages. Ignore this question...

No functions in class called in app developed in Monterey running on Catalina
 
 
Q