I'm trying to use this method on an NSObject in a macOS Command Line Tool. https://developer.apple.com/documentation/objectivec/nsobject/1416176-performselector?language=objc
This works fine in a normal app but when I try to use it in a Command Line Tool nothings happens. I'm keeping my app running by using dispatch_main()
. What else do I need to do to have this method working on an NSObject?
int main(int argc, const char * argv[])
{
@autoreleasepool
{
// ...
}
dispatch_main();
return 0;
}