Use -[NSWorkspace openFile:WithApplication:]
like so:
[[NSWorkspace sharedWorkspace] openFile:@"/Myfiles/untitled.rtf"
withApplication:@"TextEdit"];
Or, if one just wants to open a file with the default application for that file, use -[NSWorkspace openFile:]
like so:
[[NSWorkspace sharedWorkspace] openFile:@"/Myfiles/untitled.rtf"];
The be sure to check the documentation for NSWorkspace for details and other related methods.