So I'm following a tutorial that shows how to use the same codebase to build both a FREE and PAID version of an app.
It shows how to set up a DEFINE for "FREE" and I've got all that stuff working fine. What seems to be glossed over, is how to deal with this class definition. For the FREE app, it needs to be delegates for GADBannerViewDelegate, GADInterstitialDelegate, while the PAID version does not.
So I was hoping to set up something like this:
#if FREE
class GameViewController: UIViewController, GKGameCenterControllerDelegate, GADBannerViewDelegate, GADInterstitialDelegate {
#else
class GameViewController: UIViewController, GKGameCenterControllerDelegate{
#endif
But that's not valid, and I after reading the docs, I understand why. What I don't understand, is how to deal with this. As a workaround, I figured I'd just make the PAID version have those GoogleAd delegates as well. But then Apple rejected my app, because including that makes it look like my app is serving up ads, when it isn't, and that's against the rules.
So for now, whenever I build the PAID vs FREE app, I'm just manually editing the code to change the declaration. It works, but is dumb. There's got to be a way to automate this, right?