Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 68

David73
Aspiring developer
Profile
Posts: 66
Reg: Jan 12, 2013
Texas
660
04/12/14 03:01 PM (10 years ago)

Disable ads using IAP Plugin

Before upgrading to version 3.0 and X-Code 5, I had a procedure for using the IAP plugin to disable ads. It was a combination of 2 different procedures that others had posted here and something that I hired a programmer on Elance to do. None of the procedures worked by themselves, but I was able to combine all 3 of them into a procedure that worked quite well. Now that I am converting everything over to self hosting with Buzztouch 3.0 and X-Code 5, the procedure no longer works. I have been able to hack my way through it again and get something that works, but it isn't doing what it used to. Previously, I had a Disable Ads button that was on the top of the home page. If a person bought the IAP, the button no longer appeared. To this point, I have not been able to get that part to work. Here is the code that I am trying to get to work. I believe this is trying to put a button on the menu screen, but X-Code 5 doesn't like it. I am getting an error that says "use of undeclared identifier 'appDelegate' if(![[NSUserDefaults standardUserDefaults] boolForKey:@"noAds"]) { ((UINavigationController*)[appDelegate.rootApp.rootNavController.retain retain]).navigationBar.topItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:(@"Disable Ads") style:UIBarButtonItemStyleBordered target:(self) action:@selector(disableAds)]; } else { nil; } If anybody knows how to fix this I would be eternally grateful. If I can get this working again, I will gladly post this for everybody to use. It is an easy way to disable ads and make a little bit of IAP money. Thanks, Dave
 
App
Apple Fan
Profile
Posts: 4
Reg: Mar 31, 2014
City DNai
40
like
04/12/14 05:14 PM (10 years ago)
 
David73
Aspiring developer
Profile
Posts: 66
Reg: Jan 12, 2013
Texas
660
like
04/12/14 06:01 PM (10 years ago)
That is one of the procedures that I used to make the original one. As it notes on that thread, it does not work. Step 4 of that tutorial is where my error is. With that said, it did give me an idea on how to fix it. I will update if I get it figured out. Until then, any help is still appreciated.
 
Mike the App Guy
Lost but trying
Profile
Posts: 435
Reg: Sep 19, 2011
Birmingham, Ala...
5,900
like
05/03/14 06:34 AM (10 years ago)
Any updates on this? I have noticed an app that I have downloaded that looks like it uses RevMob, maybe AdMob, and it has a button to "disable ads". When you press that, it goes to a page with a button where for $0.99 you can remove ads from the app. How do you do this?
 
David73
Aspiring developer
Profile
Posts: 66
Reg: Jan 12, 2013
Texas
660
like
05/03/14 01:51 PM (10 years ago)
That is what I am trying to get figured out for Xcode 5. It worked fine on Xcode 4, but apparently the code needs to be tweaked and I don't know how to do it. That's why I posted here. Either it can't be done or nobody who knows is sharing. :(
 

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.