0
votes

I'm trying to let the user post a status on facebook and I get the error: "Data argument not used by format string" on this code:

[mySLComposerSheet setInitialText:[NSString stringWithFormat:@"This is quite average.",mySLComposerSheet.serviceType]];

Anyone see what is wrong?

Best regards, Øyvind Larsen Runestad.

1

1 Answers

1
votes

The issue is, by using stringWithFormat, it's expecting you to use % which is a specifier for format. If your string is simply, "This is quite average." then do the following line.

[mySLComposerSheet setInitialText:@"This is quite average."]

If you're trying to append "This is quite average." to mySLComposerSheet.serviceType, then do the following

NSString* text = [mySLComposerSheet.serviceType stringByAppendingString:@"This is quite average."]; 

and then do

[mySLComposerSheet setInitialText:text];