1
votes

Hey guys can anyonr please help me out ? I need the syntax for remove ads IAP for corona sdk. I tried to implement it by my self but failed. And also if possibile can you give me the code to show chartboost or vungle ad after game over.

1

1 Answers

1
votes

There isn't a specific code for this. A lot depends on how you have your app implemented. But the basics are this:

  1. Set a flag if you want to show ads or not:

    local showAds = true

  2. Then in your code, wrap the ads.show() call with something like:

    if showAds then ads.show("banner") -- or interstital or however you call it. end

  3. In your IAP code, when you detect a purchase and the purchase happens to be the purchase that turns off ads then do:

    showAds = false

  4. You will need to save that information out and when you restart the app, read that value to determine what to initialize your app too.