
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
@adapty/react-native-ui
Advanced tools
Extension to the Adapty SDK that allows you to easily add purchase screens to your application.
AdaptyUI is an open-source framework that is an extension to the Adapty SDK that allows you to easily add purchase screens to your application. It’s 100% open-source, native, and lightweight.
react-native-adapty
>=2.4.7
yarn add @adapty/react-native-ui
pod install --project-directory=ios/
Enable and configure no-code paywall as described in the docs.
Fetch a paywall that has no-code paywall enabled as described in the SDK documentation.
import {adapty} from 'react-native-adapty';
try {
const paywall = await adapty.getPaywall("YOUR_PAYWALL_ID");
} catch (error) {
// handle the error
}
Create a view with a fetched paywall
import {createPaywallView} from '@adapty/react-native-ui';
const view = await createPaywallView(paywall);
Optionally, you can track any of the following events:
view.registerEventHandlers({
onCloseButtonPress() {
// ...
return true;
},
onPurchaseCompleted() {
// ...
return true;
},
onRestoreCompleted() {
// ...
return true;
},
onProductSelected() { /* ... */ },
onPurchaseStarted() { /* ... */ },
onPurchaseCancelled() { /* ... */ },
onPurchaseFailed() { /* ... */ },
onRestoreFailed() { /* ... */ },
onRenderingFailed() { /* ... */ },
onLoadingProductsFailed() { /* ... */ },
});
Returning true
from an event callback dismisses (closes) a paywall modal & removes all event listeners for this view
. Note the places, where return true;
is provided — these events close a paywall modal by default.
You can display and hide a modal using these methods consecutively:
view.present(); // shows a view
view.dismiss(); // hides a view
We recommend that you read the full documentation. If you are not familiar with Adapty, then start here.
So do we! Feel free to star the repo ⭐️⭐️⭐️ and make our developers happy!
AdaptyUI is available under the MIT license. Click here for details.
FAQs
Extension to the Adapty SDK that allows you to easily add purchase screens to your application.
We found that @adapty/react-native-ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.