EddyVerbruggen / nativescript-admob

NativeScript plugin to earn some precious :moneybag::moneybag: with ads by Google AdMob
MIT License
69 stars 26 forks source link

Change iOS request from function to property #63

Closed davr59 closed 5 years ago

davr59 commented 5 years ago

Seems that request from GADRequest now is a property instead of a function. Changed it accordingly.

EddyVerbruggen commented 5 years ago

Hi! Why exactly do you think it's a property? Did they perhaps change that in a newer version of the Pod which this plugin doesn't yet use (the plugin is at 7.37.0).

I just generated typings and it still seems to be a function, and logging also indicated it's still a function.

If there's a good reason to expect it will change to a function in the near future then we may also opt for making it backward compatible by having the {N} runtime figure it out:

      var adRequest = utils.ios.getter(GADRequest, GADRequest.request);

I would happily merge a PR using that pattern (note that it needs to be applied 3 times in this file).