react-native-nap-ssp
v0.4.0
Published
React Native plugin for KT Nasmedia nap ssp SDK
Readme
react-native-nap-ssp
The React Native bridge for KT Nasmedia's nap mx (AdMixer SSP) SDK. Monetize React Native apps with banners, native ads, inline video, interstitials, interstitial video, and rewarded video.
🚀 What's New in v0.4.0
- Android SDK
2.1.1→2.1.3(BOM2026.07.03→2026.07.06, AdManager adapter2.0.2→2.0.4) — stability fixes plus deterministic failure reporting for unregistered ad units. - iOS SDK
2.3.7→2.4.2— improvedloadAdhandling, a simulator launch fix, and adapter refreshes. - iOS Teads support —
AdMixerMediationTeadsis now available as theTeadssubspec. Teads was previously Android-only here. - Huawei Maven repository added on Android, required by the official Teads installation guide.
- Documentation corrected — the guides now match the actual exported API surface. See the note below if you followed the v0.3.0 docs.
⚠️ If you copied code from the v0.3.0 README or API guide, it referenced
initSdk()andsetAdapterConfig(), which this package has never exported. Initialization isNapSspAd.initialize({ mediaKey, adUnitIds, ... }), and mediation keys go in that samemediationsobject. See the API Reference.
ℹ️ iOS 2.4.2 was source-verified by diffing the shipped
.swiftinterfaceof both SDK versions against every symbol this plugin calls. One breaking change was found and fixed (AMMVideoInterstitial.load, see the Migration Guide). A full Xcode build has not been run, so smoke-test your iOS target before shipping.
📚 Documentation
| Guide | Contents |
| :--- | :--- |
| 🚀 Setup & Installation | React Native, Android Gradle & BOM, iOS CocoaPods/SPM, Expo, per-network minSdk and Kotlin requirements. |
| 📖 API Reference | NapSspAd, BannerAd, NativeAd, VideoAd, InterstitialAd, RewardedAd, InterstitialVideoAd, events, errors, mediation config. |
| 🔄 Migration & Version Matrix | Upgrade steps, the verified version matrix, and native SDK breaking changes. |
| ❓ FAQ & Troubleshooting | Build and runtime fixes, privacy compliance (ATT, COPPA), glossary. |
Official native SDK guides: Android · iOS
⚡ Quick Start
1. Install
npm install react-native-nap-ssp
# or
yarn add react-native-nap-sspAndroid — enable the vendor SDK in android/gradle.properties:
napSsp.enableVendorSdk=trueiOS — cd ios && pod install.
2. Initialize
Call this once, before requesting any ad. Every ad unit you use must be registered here.
import React, { useEffect } from 'react';
import { NapSspAd } from 'react-native-nap-ssp';
export default function App() {
useEffect(() => {
NapSspAd.initialize({
mediaKey: 'YOUR_MEDIA_KEY',
adUnitIds: ['YOUR_BANNER_UNIT_ID', 'YOUR_INTERSTITIAL_UNIT_ID'],
logLevel: __DEV__ ? 'verbose' : 'error',
mediations: {
adManager: { googleAppId: 'YOUR_GOOGLE_APP_ID' },
appLovin: { sdkKey: 'YOUR_APPLOVIN_SDK_KEY' },
adFit: true,
},
}).catch((error) => console.warn('nap ssp init failed', error));
}, []);
return <YourAppRoot />;
}3. Show a banner
import { View } from 'react-native';
import { BannerAd } from 'react-native-nap-ssp';
export default function HomeScreen() {
return (
<View style={{ flex: 1, justifyContent: 'flex-end' }}>
<BannerAd
adUnitId="YOUR_BANNER_UNIT_ID"
size="BANNER_320x50"
onAdLoaded={() => console.log('banner loaded')}
onAdFailedToLoad={(error) => console.warn(error.code, error.message)}
/>
</View>
);
}4. Load and show an interstitial
import React, { useEffect, useRef } from 'react';
import { Button } from 'react-native';
import { InterstitialAd } from 'react-native-nap-ssp';
export default function GameScreen() {
const adRef = useRef<InterstitialAd>();
useEffect(() => {
const interstitial = new InterstitialAd('YOUR_INTERSTITIAL_UNIT_ID');
adRef.current = interstitial;
const unsubscribe = interstitial.addAdEventListener('loaded', () => {
console.log('interstitial ready');
});
interstitial.addAdEventListener('loadFailed', (error) => {
console.warn(error.code, error.message);
});
interstitial.load();
return () => {
unsubscribe();
interstitial.cancelLoad(); // abort an in-flight load
interstitial.destroy();
};
}, []);
return <Button title="Show Ad" onPress={() => adRef.current?.show()} />;
}Event names are the short form (loaded, loadFailed, opened, closed, clicked, impression, rewarded, completed, skipped) — see the full event table.
📦 Supported Ad Formats
| Format | Export | Android | iOS |
| :--- | :--- | :---: | :---: |
| Banner | BannerAd | ✅ | ✅ |
| Native | NativeAd | ✅ | ✅ |
| Inline video | VideoAd | ✅ | ✅ |
| Interstitial | InterstitialAd | ✅ | ✅ |
| Interstitial video | InterstitialVideoAd | ✅ | ✅ |
| Rewarded video | RewardedAd | ✅ | ✅ |
Mediation networks: Google Ad Manager, Kakao AdFit, Pangle, AppLovin, Unity Ads, Naver Ad Manager, Teads.
🛡️ License
MIT — Copyright © 2026 KT Nasmedia.
