0.3.13
iOS
๋ฌธ์ ์์ด ์ ํ์ ๊ตฌ๋งคํ ๊ฒ์ผ๋ก ์์๋จ
"์" ์ฅ์น์์ ์ฒ์์ผ๋ก product_A๋ฅผ ๊ตฌ์
ํ ๋ - ์๋ํฉ๋๋ค.
๋ ๋ฒ์งธ๋ก ๋์ผํ ์ํ_A ๊ตฌ๋งค๋ฅผ ์๋ํฉ๋๋ค(์ฑ์ ๋ค์ ์์ํด๋ ์๊ด์์).
์๋ ์ ํ ๊ฒ์ด๋ค. ์ค๋ฅ ๋ฉ์์ง๋ "์ ์ ์๊ฑฐ๋ ์๊ธฐ์น ์์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค. ๋์ค์ ๋ค์ ์๋ํ์ญ์์ค."์
๋๋ค.
1.ReadME์ ๊ฐ์ด IAP๋ฅผ ๊ตฌํํฉ๋๋ค.
try {
const msg = await RNIap.prepare()
const products = await RNIap.getProducts([`${productId}`])
const purchase = await RNIap.buyProduct(productId)
this.props.purchaseCoinsPack(coinsPack)
await RNIap.consumePurchase(purchase.transactionReceipt)
} catch (err) {
alert(err.message);
}
_ ๋ด componentDidMount() ๋ฐ componentWillUnmount()์ ์ด ์ฝ๋๊ฐ ์๋ ๊ฒฝ์ฐ๋ฅผ ๋๋นํ์ฌ:_
getPurchases = async () => {
try {
const purchases = await RNIap.getAvailablePurchases();
purchases.forEach(async purchase => {
const boughtPack = R.find(R.propEq('androidStoreId', purchase.productId))(this.props.coinsPacks)
if (boughtPack) {
this.props.purchaseCoinsPack(boughtPack);
await RNIap.consumePurchase(purchase.transactionReceipt);
}
})
} catch (err) {
console.warn(err); // standardized err.code and err.message available
} finally {
this.setState({ isLoading: false })
}
}
async componentDidMount() {
try {
await RNIap.prepare()
} catch (err) {
console.warn(err);
}
this.getPurchases()
}
async componentWillUnmount() {
RNIap.endConnection()
}
2.์ฒซ ๊ตฌ๋งค๋ ๊ด์ฐฎ์ต๋๋ค.
๋์ค์ ๋ค์ ์๋ ํด์ฃผ์ญ์์ค."
์ ํ์ ์๋ชจํ์ ๋๊น, ์๋๋ฉด ๋น์๋ชจํ์ ๋๊น?
@JJMoon ์๋ชจํ.
์ต์ v0.3.15๋ ๋ฉ์์ง์ ํจ๊ป error code
๋ฅผ ์ ๊ณตํฉ๋๋ค.
์ต์ ๋ฆด๋ฆฌ์ค๋ฅผ ๋ค์ ์๋ํ๊ณ ์ค๋ฅ ์ฝ๋๋ ๋ฌด์์
๋๊น?
์ค๋ฅ ์ฝ๋๊ฐ -1001์ด๋ฉด Apple์ ์์ ์๋๋ฐ์ค ๋ฌธ์ ์ผ ์ ์์ต๋๋ค.
์ด ๋ฌธ์ ๋ ์ดํด๋ณด๊ฒ ์ต๋๋ค.
0.3.15๋ก ์
๋ฐ์ดํธํ ํ iOS์์ ๋ฌธ์ ๊ฐ ์ฌ๋ผ์ก์ต๋๋ค.
์๋๋ก์ด๋๋ ํ๋ฅญํ๊ฒ ์๋ํฉ๋๋ค.
๊ฐ์ฌํฉ๋๋ค!
์ข์ ์์์
๋๋ค!
์ ๋ฆด๋ฆฌ์ค๊ฐ ๋ก๊ทธ ์ธ์๋ ๋ณ๊ฒฝ๋์ง ์์๊ธฐ ๋๋ฌธ์ Apple์ ์ผ์์ ์ธ ๋ฌธ์ ์ผ ์ ์์ต๋๋ค.
์๋๋ฐ์ค๋ก ํ
์คํธํ ๋ ๋ฌธ์ ๊ฐ ๋๋ฌด ๋ง์์ต๋๋ค.
๋๋ถ๋ถ์ ๊ฒฝ์ฐ ์ฑ ์คํ ์ด์์ ์ถ์ํ ํ๋ก๋์
์์๋ ๋ฐ์ํ์ง ์์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ต์ v0.3.15๋ ๋ฉ์์ง์ ํจ๊ป
error code
๋ฅผ ์ ๊ณตํฉ๋๋ค.์ต์ ๋ฆด๋ฆฌ์ค๋ฅผ ๋ค์ ์๋ํ๊ณ ์ค๋ฅ ์ฝ๋๋ ๋ฌด์์ ๋๊น?
์ค๋ฅ ์ฝ๋๊ฐ -1001์ด๋ฉด Apple์ ์์ ์๋๋ฐ์ค ๋ฌธ์ ์ผ ์ ์์ต๋๋ค.
์ด ๋ฌธ์ ๋ ์ดํด๋ณด๊ฒ ์ต๋๋ค.