Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 59

Ronin
Aspiring developer
Profile
Posts: 19
Reg: Jul 13, 2012
Arlington, VA
2,240
08/07/12 04:42 PM (13 years ago)

Fixing the alerts problem with BT2 and Xcode 4.4, including BT_Camera_email.m

So, I'm compiling this after finally getting the answers I needed to fix a few problems. If you are using BT 2 with Xcode 4.4. For a while I was getting 40+ alerts when I was compiling. I now have fixed all of them. First and foremost, this post explains how to fix the bulk of them: http://www.buzztouch.com/forum/thread.php?tid=7C16B9C2E02ED2E15089B6E&sortColumn=FT.id&sortUpDown=DESC&currentPage=1 Basically, in a lot of the alerts you find strings where you need to add a '%' in front of the '@'. This is to tell the code to insert a string into this spot. However, without the '%' there are problems. After fixing these, I still had three alerts BT_fileManager.m. They were as follows: 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", @""]]; The fix for this is to delete , @"" from the code. The code should look like this: [BT_debugger showIt:self:[NSString stringWithFormat:@"readTextFileFromBundleWithEncoding ERROR using encoding NSUTF8StringEncoding, trying NSISOLatin1StringEncoding"]]; So, that fixes those problems. Finally, I had the following problem with BT_camera_email.m BT_camera_email.m 1. Semantic Issue Sending 'BT_camera_email *' to parameter of incompatible type 'id<UIActionSheetDelegate>' if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { NSLog(@"is camera ok"); UIActionSheet *photoSourceSheet = [[UIActionSheet alloc] initWithTitle:@"Select Image Source" delegate:self The problem can be fixed by going to the file BT_camera_email.m and doing the following: So, go to BT_camera_email.h file in the BT_Plugins>bt_camera_email>BT_camera_email.h. Find the following line of code: @interface BT_camera_email : BT_viewController <UIApplicationDelegate, UIImagePickerControllerDelegate,MFMailComposeViewControllerDelegate, UINavigationControllerDelegate, UIAlertViewDelegate> You need to add UIActionSheetDelegate into this line of code. I just put it on the end like this: @interface BT_camera_email : BT_viewController <UIApplicationDelegate, UIImagePickerControllerDelegate,MFMailComposeViewControllerDelegate, UINavigationControllerDelegate, UIAlertViewDelegate, UIActionSheetDelegate> And that fixes that. After I did a clean and rebuild, I got zero alerts. Ronin
 
SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
like
08/07/12 06:48 PM (13 years ago)
Excellent! hopefully this fixes a bunch of peoples problems Dave
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
08/08/12 02:34 PM (13 years ago)
Nice, I've cleaned up that error in other files a similar way. Is this that new Camera Plugin from Buzztouch Mods? Still have yet to look at it, but did notice a lot of folks with issues getting it working. I've been building my own plug-in so i can add more functionality, but progressing slowly while i finish other stuff. Thanks for the detailed tips/fixes. Excellent post.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.