I have a simple function which I wish to execute in objective c. I am using xcode and this is just a dummy application which requires no view. I have been told never to change the main method..so the question arises, how can I execute this function. the function is stored in a simple objective c class in the classes folder and I am using a window based project….
Thanks
Import the file (header if it has one) into the App Delegate; in the
applicationDidFinishLoading:method: create an instance of the class the function is in (assuming its not a class method (starts with a + instead of a -)); and call the function on your created instance, you may want to NSLog the return value if there is one.Something like this in your appdelegate.m