0

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

piokuc
  • 25,594
  • 11
  • 72
  • 102
splatoperator
  • 227
  • 1
  • 2
  • 10

1 Answers1

1

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.

Phillip Mills
  • 30,888
  • 4
  • 42
  • 57
  • Thank you so much. This is very helpful. Buzztouch is a canned iOS/Android framework. Basically, it's something that's aiming to be like wordpress for apps. Unlike a lot of other template style app makers, it packages and allows you to download the source code for either iOS or Android. It's nice for me because I'm learning Objective-C and it allows me to see how things work and tinker with the code. Again, thanks for the clear explanation. – splatoperator Aug 07 '12 at 18:48