Thanks man, you explained it well I have In App Purchases in my game, it works differently for Windows Phone / Android / iOS. I would like to keep some kind of abstraction in my core, let's say:
public abstract bool HasProductPurchased(String productId);
public abstract async void PurchaseProduct(String productId, Callback);
In Android, WP, iOS projects I would like to keep implementation of this abstract. Is it possible ? To "inject" specific implementation ? Or should I use preprocessor macros, like
In my opinion, it will be messy to keep it with macros, because probably I have to also keep imports (uses) also wrapped with #IFDEF macros. I appreciate any help. I have a lot of such problems during port of game, like access to storage, in app purchases, highscores etc., so I would like to have good approach. I think the best way is to create such abstraction layer in shared core, but how to inject specific implementation ?