You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is my code i am using react native expo
import React, { useEffect, useState } from "react";
import { View, Text, Button } from "react-native";
import * as RNIap from "react-native-iap";
const InAppPurchases = () => {
const [products, setProducts] = useState([]);
const [purchasedProducts, setPurchasedProducts] = useState([]);
this is my code i am using react native expo
import React, { useEffect, useState } from "react";
import { View, Text, Button } from "react-native";
import * as RNIap from "react-native-iap";
const InAppPurchases = () => {
const [products, setProducts] = useState([]);
const [purchasedProducts, setPurchasedProducts] = useState([]);
useEffect(() => {
const initIAP = async () => {
try {
const productIds = ["premium_01"]; // Replace with your actual product IDs
await RNIap.initConnection();
const products = await RNIap.getProducts(productIds);
setProducts(products);
} catch (error) {
console.error("Error preparing IAP:", error);
}
};
The text was updated successfully, but these errors were encountered: