Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems like missing declaration and export of getPromotedProductIOS() and buyPromotedProductIOS() #729

Closed
su1736 opened this issue Sep 24, 2019 · 1 comment
Labels
❄️ types Typing issues

Comments

@su1736
Copy link

su1736 commented Sep 24, 2019

Version of react-native-iap

3.4.12

Version of react-native

0.60.5

Platforms you faced the error (IOS or Android or both?)

iOS

Expected behavior

normal working: return productId and open AppStore purchase process

Actual behavior

javascript error in debugger like "getPromotedProductIOS is not a function"

Tested environment (Emulator? Real Device?)

real device

Steps to reproduce the behavior

Try to use these functions.




After I added declaration and export in index.d.ts and index.js all works well.

index.d.ts

  ...
  export function getPromotedProductIOS(): Promise<Product<string>>;
  export function buyPromotedProductIOS(): Promise<ProductPurchase>;

index.js

export default {
  ...,
  getPromotedProductIOS,
  buyPromotedProductIOS,
};
@hyochan hyochan added the ❄️ types Typing issues label Sep 25, 2019
@hyochan
Copy link
Owner

hyochan commented Sep 25, 2019

You are right. I've just release 3.4.13 with update. Consider giving PR next time! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❄️ types Typing issues
Projects
None yet
Development

No branches or pull requests

2 participants