Bug Report
Description
When a user taps a promoted in-app product in the App Store and the app is cold started (not running in background), neither promotedProductListenerIOS callback nor getPromotedProductIOS() return any product — the callback is never triggered and getPromotedProductIOS() returns null.
The promotedProductListenerIOS callback does fire correctly when the app is resumed from background.
Steps to Reproduce
- Set up a promoted in-app purchase product in App Store Connect.
- Use a StoreKit configuration file or a direct App Store promoted product link (
itms-apps://...?action=purchaseIntent&productIdentifier=xxx) to simulate a promoted product tap.
- Ensure the app is fully terminated (cold start scenario).
- Tap the promoted product link.
- Observe that neither
onPromotedProductIOS (via useIAP) nor promotedProductListenerIOS fires, and getPromotedProductIOS() returns null.
Code Sample
// None of these work on cold start:
// Approach 1 - useIAP hook callback
useIAP({
onPromotedProductIOS: (product) => {
console.log('never called on cold start', product);
},
});
// Approach 2 - standalone listener
useEffect(() => {
const subscription = promotedProductListenerIOS((product) => {
console.log('never called on cold start', product);
});
return () => subscription.remove();
}, []);
// Approach 3 - polling after mount
useEffect(() => {
(async () => {
const product = await getPromotedProductIOS();
console.log('always null on cold start', product); // null
})();
}, []);
Expected Behavior
At least one of the above APIs should reliably deliver the promoted product info when the app is cold-started from a promoted product tap in the App Store.
Environment
|
|
expo-iap version |
4.2.4 |
| Expo SDK |
~54 |
| React Native |
0.79+ |
| Platform |
iOS |
| Device |
Physical device |
| Xcode |
16+ |
Bug Report
Description
When a user taps a promoted in-app product in the App Store and the app is cold started (not running in background), neither
promotedProductListenerIOScallback norgetPromotedProductIOS()return any product — the callback is never triggered andgetPromotedProductIOS()returnsnull.The
promotedProductListenerIOScallback does fire correctly when the app is resumed from background.Steps to Reproduce
itms-apps://...?action=purchaseIntent&productIdentifier=xxx) to simulate a promoted product tap.onPromotedProductIOS(viauseIAP) norpromotedProductListenerIOSfires, andgetPromotedProductIOS()returnsnull.Code Sample
Expected Behavior
At least one of the above APIs should reliably deliver the promoted product info when the app is cold-started from a promoted product tap in the App Store.
Environment
expo-iapversion