Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 119

chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
10/23/12 08:42 AM (13 years ago)

in app purchases plugin

I haven't purchased the in-app purchases plugin yet, so this may already be a possibility and I don't know it. But it would be really great if you could hide screens once the in-app purchase was made. For instance, I would like to offer a free app with advertising enabled and with an in-app purchase option to remove advertising. The best way I can think to do that would be to remove the screens that have advertising and show (identical) screens that do not have advertising. Also, the screen to buy the upgrade could be removed as well once the purchase has been made. Just a thought.
 
Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
like
10/23/12 09:29 AM (13 years ago)
Hi Chris1. Its possible but you have to modify the code little. Instead of locking up a screen, you have to change Ads method from true to false. So when you decide to buy, establish the false in the code and the ads will then disappear. I hope you understand what I mean. I have buy the plugin but I have not try it yet.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
10/23/12 10:03 AM (13 years ago)
That would work too, and would be much cleaner. Hopefully that's not a hard change to make.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
10/23/12 10:10 AM (13 years ago)
Unfortunately I have adsense in web content, and rarely use admob/iad (I seem to get very low revenue) so that wouldn't work for me, otherwise, excellent and innovative idea for the plugin! Cheers, David https://buzztouchmods.com
 
theMonster
Code is Art
Profile
Posts: 435
Reg: Oct 18, 2011
US
8,050
like
11/03/12 03:43 AM (13 years ago)
Yes, it's possible, however that would require some custom programing on your end. Bassically, you'd make a BOOL with NSUserDefaults, and when the user makes a iAP just send them to a screen that says, "THANKS, ads have been removed". Then go into the BT_ViewController app and have it check for the NSUserDefaults BOOL to present a ad (since all screens inherit from BT_ViewController it'll kill ads app wide.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/17/12 03:45 PM (13 years ago)
Okay, I'm finally getting around to this. I'm not sure I entirely follow what you're saying, though. How and where do I make the BOOL with NSUserDefaults, and what do I need to alter in BT_ViewController? I assume I need to create an if statement in the section labeled "//showHideAdView". But I need some help with what the code looks like. (Sorry, I'm still learning how to code in obj-C) Also, I'm a little confused about how to test this out. The plugin description says: NOTE: When testing iAP on your device, you need to first log out of your current App Store account, create a Test Account in iTC (iTunes Connect), and then login via the application (NOT through the settings app). I understand how to log out of the App Store account by going through Settings, and I have a test account created in iTunes Connect using a different email address. But, if I'm not supposed to log in via settings, how do I log in to that test account on my device?
 

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.