Discussion Forums  >  Xcode, Errors, Installing, Configuring

Replies: 11    Views: 103

Doug E
Aspiring developer
Profile
Posts: 18
Reg: Nov 20, 2010
Memphis
980
12/05/15 07:11 AM (8 years ago)

Updating App. Having Parse issue and Semantic issue.

I am updating my app because I haven't in a couple of years. I have forgotten a lot. I'm getting the errors below and would appreciate any help. Error 1: I'm getting a - !Parse Issue - Unexpected '@' in program Error 2: I'm getting a - Semantic Issue - Use of undeclared identifier 'alert Tag' } //clickedButtonAtIndex... -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"alertView clickedButtonAtIndex: %d, buttonIndex]]; int alertTag = [alertView tag]; ERROR 1 // 0 = no, 1 = yes if(buttonIndex == 0){ //do nothing... } if(buttonIndex == 1 && alertTag == 12){ Error 2 //refresh entire app contents [self downloadAppData]; } }
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/05/15 08:28 PM (8 years ago)
Which plugin or section are you getting these errors? Perhaps you need to update the code with a more recent version? your 'Error #2' I think that should be more like... if ((buttonIndex == 1) && (alertTag == 12)) { you usually need to separate each comparator. Cheers! -- Smug
 
Doug E
Aspiring developer
Profile
Posts: 18
Reg: Nov 20, 2010
Memphis
980
like
12/07/15 05:53 PM (8 years ago)
I'm not really sure. I haven't used Xcode in almost 2 years and it is a challenge. I only have 3 plugins that I'm using. It is on the BT_loadConfigDataViewController.m Error 1: Undeclared selector ' registerUserNotificationsSetting:" Error 2:Use of undeclared identifier UIUserNotification settings Error 3: ARC Semantic Issue no visible @interface for 'UI Application' declares the selector 'registerForRemoteNotifications' //promptForPushNotifications... if([appDelegate.rootApp promptForPushNotifications]){ [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"promptForPushNotifications %@",@""]]; //iOS8 handles register for push differently... (1) if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { //use registerUserNotificationSettings (2) [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; (3) [[UIApplication sharedApplication] registerForRemoteNotifications]; } else { //prior to iOS8, use registerForRemoteNotificationTypes... [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; } } }
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/07/15 06:10 PM (8 years ago)
How old is the project you're working with? We don't use ARC in iOS anymore... That Error #3 'ARC' is kind of odd... You may want to download a more recent package of your project and work with that... Cheers! -- Smug
 
Doug E
Aspiring developer
Profile
Posts: 18
Reg: Nov 20, 2010
Memphis
980
like
12/08/15 06:01 AM (8 years ago)
Thanks for your help! I will re-download and try again. My app is now outdated, but I hope to get that corrected so I won't have to pull my app.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/08/15 07:30 AM (8 years ago)
Hopefully you won't have to pull your app... An update should work just fine. But with the newer xcode revisions to the BT core have been made to accommodate the updates. So you'll be ok, but you'll of course need to familiarize yourself with the 'new' code... If you have questions, or problems, shoot a post on the forums and someone can jump in to help. Cheers! -- Smug
 
Doug E
Aspiring developer
Profile
Posts: 18
Reg: Nov 20, 2010
Memphis
980
like
12/08/15 07:39 AM (8 years ago)
I re-downloaded app, and I still have a ARC semantic issue. Also, when I delete the lines below that give me an error...it builds with no errors. //fade out the BT_loadConfigData controller... [self fadeOutLoadView]; //promptForPushNotifications... if([appDelegate.rootApp promptForPushNotifications]){ [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"promptForPushNotifications %@",@""]]; //iOS8 handles register for push differently... if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { //use registerUserNotificationSettings [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; [[UIApplication sharedApplication] registerForRemoteNotifications]; } else { //prior to iOS8, use registerForRemoteNotificationTypes... [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; } }
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/08/15 08:21 AM (8 years ago)
Which plugin or class is this error occurring in? Cheers! -- Smug
 
Doug E
Aspiring developer
Profile
Posts: 18
Reg: Nov 20, 2010
Memphis
980
like
12/08/15 05:40 PM (8 years ago)
Thanks for helping me. I do appreciate it. I'm sure you have people asking dumb questions all the time, and I certainly hate being one of them. Things have changed a lot since my last update, especially my memory. I learn enough to get my app out, because my "real" job is pretty demanding, so I don't have a ton of extra time. Until the next update...then I start learning all over again...lol. It seems to gets harder every year. I was thinking maybe it was something I needed to set on the website before I downloaded the package. Maybe something changed or was added that I am leaving blank since my last update about 18+ months ago. The only error I am having is occurring on the BT_loadConfigDataController.m //iOS8 handles register for push differently... if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) { //use registerUserNotificationSettings [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; [[UIApplication sharedApplication] registerForRemoteNotifications]; It gives me 2 errors: Semantic Issue: Use of undeclared identifier 'UIUserNotificationSettings' ARC Semantic Issue: No visible @interface for 'UIApplication' declares the selector 'registerForRemoteNotifications'
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/08/15 09:40 PM (8 years ago)
And that's what I kind of don't understand... the BT "Core" is pretty stable... there are warnings (in yellow) of course, it seems Apple deprecates something new every 10 minutes... but those aren't deal stoppers... And I never get any errors out of the BT core. Unless I've done something, usually. But if you haven't edited any of those methods, it should be good. Otherwise, I'm curious... What target are you 'building' for? That's the only thing I can think of, is perhaps you're building for an older iOS version... Try setting it for v7.1 or better... Most of the older devices aren't being used, and you can be usually certain that people 'at least' run v7+. There are a few old devices running around, specifically my old iPad v1, which can only update to v5.1, but that is the exception, not the rule. Let us know. Cheers! -- Smug
 
Doug E
Aspiring developer
Profile
Posts: 18
Reg: Nov 20, 2010
Memphis
980
like
12/10/15 04:59 PM (8 years ago)
It turns out the OS on the iPad was wacky. I re-installed the OS, and my app works just fine. I am going to leave well enough alone. My app works! All is good! Thanks for your help SmugWimp. I'll be back!
 
Doug E
Aspiring developer
Profile
Posts: 18
Reg: Nov 20, 2010
Memphis
980
like
12/10/15 05:13 PM (8 years ago)
It turns out the OS on the iPad was wacky. I re-installed the OS, and my app works just fine. I am going to leave well enough alone. My app works! All is good! Thanks for your help SmugWimp. I'll be back!
 

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.