I'm currently running Mountain Lion OS X 10.8 with Xcode 4.4 installed. I'm running the iOS 5.1 simulator. I'm using Buzztouch as a learning tool while I'm studying Objective-C and Xcode. I get the following alerts when I compile, but the build succeeds. However, I would like to know exactly what is going on and how I can remedy the situation. Thank you for any assistance you can provide. Here's the code and the alerts I'm getting:

BT_fileManager.m

  1. Data argument not used by format string [BT_debugger showIt:self:[NSString stringWithFormat:@"readTextFileFromBundleWithEncoding ERROR using encoding NSUTF8StringEncoding, trying NSISOLatin1StringEncoding", @""]];

  2. Data argument not used by format string [BT_debugger showIt:self:[NSString stringWithFormat:@"readTextFileFromCacheWithEncoding ERROR using encoding NSUTF8StringEncoding, trying NSISOLatin1StringEncoding", @""]];

BT_camera_email.m

  1. Semantic Issue Sending 'BT_camera_email *' to parameter of incompatible type 'id'

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { NSLog(@"is camera ok"); UIActionSheet *photoSourceSheet = [[UIActionSheet alloc] initWithTitle:@"Select Image Source" delegate:self

Again, thanks.

Greg

1

There are 1 best solutions below

1
On

I have no idea what Buzztouch might be, however.... :-)

The first warning is fairly simple. In a format string there are placeholders beginning with a '%' sign to indicate where data values should be substituted. For example, to substitute a string, one would use '%@'. In the examples you show, there are no placeholders but there are data values -- empty strings. The compiler is warning that something you indicate you want to have put into the new string created by stringWithFormat: won't be.

To be sure about the second one, I'd want to see the .h file that declares BT_camera_email but my best guess is that it doesn't adopt the UIActionSheetDelegate protocol. The description of initWithTitle:... says the second parameter should be id<UIActionSheetDelegate> and that's probably what is being complained about.