@sellwild/react-native-sdk 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # @sellwild/react-native-sdk
2
+
3
+ Sellwild mobile advertising SDK for React Native. Server-side header bidding through Prebid Server — one SDK, sub-200ms auctions, no client-side bidder SDKs.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @sellwild/react-native-sdk react-native-webview
9
+ cd ios && pod install && cd ..
10
+ ```
11
+
12
+ ## Quick Start
13
+
14
+ ```tsx
15
+ import React from 'react';
16
+ import { SafeAreaView } from 'react-native';
17
+ import { SellwildBanner, buildConfig } from '@sellwild/react-native-sdk';
18
+
19
+ const config = buildConfig({
20
+ partnerCode: 'your-partner',
21
+ listingsUrl: 'https://api.sellwild.com/widget/listings?partner=your-partner',
22
+ appBundleId: 'com.yourcompany.yourapp',
23
+ appStoreUrl: 'https://play.google.com/store/apps/details?id=com.yourcompany.yourapp',
24
+ prebidServer: {
25
+ accountId: 'your-account',
26
+ endpoint: 'https://prebid.sellwild.com/openrtb2/auction',
27
+ bidders: ['appnexus', 'rubicon', 'ix', 'openx'],
28
+ timeout: 1500,
29
+ },
30
+ });
31
+
32
+ export default function App() {
33
+ return (
34
+ <SafeAreaView style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
35
+ <SellwildBanner
36
+ config={config}
37
+ size="300x250"
38
+ onImpression={() => console.log('Ad impression')}
39
+ onError={(err) => console.warn('Ad error:', err.message)}
40
+ />
41
+ </SafeAreaView>
42
+ );
43
+ }
44
+ ```
45
+
46
+ ## Components
47
+
48
+ - **`SellwildBanner`** — Display ad (300x250, 320x50, 728x90)
49
+ - **`SellwildWidget`** — Full marketplace widget with listings and ads
50
+ - **`SellwildListingCard`** — Individual listing card component
51
+ - **`useSellwildListings`** — Hook for fetching listings data
52
+
53
+ ## Documentation
54
+
55
+ Full integration guide: [sdk.sellwild.com](https://sdk.sellwild.com/guide/react-native)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellwild/react-native-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Sellwild mobile advertising SDK for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -23,7 +23,7 @@
23
23
  "react-native-webview": ">=11.0.0"
24
24
  },
25
25
  "dependencies": {
26
- "@sellwild/sdk-core": "^1.0.0"
26
+ "@sellwild/sdk-core": "^1.1.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/react": "^18.0.0",
@@ -205,6 +205,12 @@ function configToAttributes(config: SellwildConfig): string {
205
205
  add('growthcode', config.growthcode)
206
206
  add('bh-tag', config.bhTag)
207
207
 
208
+ // Mobile ad controls
209
+ add('enable-interstitial', config.enableInterstitial || undefined)
210
+ add('enable-fullscreen-video', config.enableFullscreenVideo || undefined)
211
+ add('interstitials-per-session', config.interstitialsPerSession)
212
+ add('video-takeovers-per-session', config.videoTakeoversPerSession)
213
+
208
214
  // Debug
209
215
  add('debug', config.debug || undefined)
210
216
  add('membership-type', config.membershipType)
package/src/index.ts CHANGED
@@ -21,4 +21,10 @@ export type {
21
21
  AdPlacementType,
22
22
  } from '@sellwild/sdk-core'
23
23
 
24
- export { buildConfig, currencyToSymbol } from '@sellwild/sdk-core'
24
+ export {
25
+ buildConfig,
26
+ buildConfigWithRemote,
27
+ currencyToSymbol,
28
+ fetchRemoteConfig,
29
+ clearRemoteConfigCache,
30
+ } from '@sellwild/sdk-core'