I am trying to use below tops command through NSTask:
tops replace "__My_CompanyName__" with "XYZ" TryItOut.m
but it is always giving below error:
File replace "__My_CompanyName__" with "XYZ" does not exist
When executed through terminal it works fine.
Below is the code, which I used:
NSTask *theTopsCommand = [[NSTask alloc] init];
[theTopsCommand setLaunchPath:@"/usr/bin/tops"];
[theTopsCommand setArguments:[[NSArray alloc] initWithObjects:@"replace \"__My_CompanyName__\" with \"XYZ\"", self.selectedFilePath,nil]];
[theTopsCommand launch];
[theTopsCommand waitUntilExit];
Can anyone suggest me, if I did anything wrong?