MCPcopy Create free account
hub / github.com/dailydotdev/apps / getApplePricing

Function getApplePricing

packages/shared/src/contexts/payment/common.ts:98–113  ·  view source on GitHub ↗
(
  metadata: ProductPricingMetadata[],
  customIds?: string[],
)

Source from the content-addressed store, hash-verified

96 );
97
98export const getApplePricing = async (
99 metadata: ProductPricingMetadata[],
100 customIds?: string[],
101) => {
102 if (!messageHandlerExists(WebKitMessageHandlers.IAPSubscriptionRequest)) {
103 return [];
104 }
105
106 const response = getAppleProducts(metadata);
107 const ids =
108 customIds || metadata.map(({ idMap }) => idMap.ios).filter(Boolean);
109
110 postWebKitMessage(WebKitMessageHandlers.IAPProductList, ids);
111
112 return response;
113};

Callers 2

StoreKitSubProviderFunction · 0.90
coresPricesQueryOptionsFunction · 0.90

Calls 3

messageHandlerExistsFunction · 0.90
postWebKitMessageFunction · 0.90
getAppleProductsFunction · 0.85

Tested by

no test coverage detected