I'm trying to get better at Obj-C, and I'm making a series of simple apps. For developers of cydia apps, I'm sure you've heard of the Erica Utilities. I'm using the urlclip utility to make an app that makes a webclip. Here's my code:
But my system(cmdString) line is getting a warning: "Passing argument 1 of 'system' from incompatible pointer type". Is it because I'm using a string within system()? I tested it on my device, and it isn't working. The cmdString string is working right, as I tested it with a UIAlertView. The problem IS in the system(). Any ideas?
Code:
-(IBAction)makeClip {
urlString = [[NSString alloc] initWithFormat:urlField.text];
nameString = [[NSString alloc] initWithFormat:nameField.text];
cmdString = [[NSString alloc] initWithFormat:@"urlclip %@ %@", nameString, urlString];
system(cmdString);
}