{"_id":"@ampup-me/react-native-sdk","name":"@ampup-me/react-native-sdk","dist-tags":{"latest":"1.0.12"},"versions":{"1.0.12":{"name":"@ampup-me/react-native-sdk","version":"1.0.12","description":"AmpUp React Native SDK bridge with native parity.","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","source":"src/index.ts","react-native":"src/index.ts","exports":{".":{"react-native":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"repository":{"type":"git","url":"git+https://github.com/AmpUp-me/ampup-5a0f903d.git","directory":"ampup-sdk/sdk-react-native"},"license":"UNLICENSED","expo":{"plugin":"./app.plugin.js"},"scripts":{"build":"tsc -p tsconfig.json","clean":"rm -rf dist","prepack":"npm run clean && npm run build"},"peerDependencies":{"react-native":">=0.74.0","expo":">=50.0.0"},"peerDependenciesMeta":{"expo":{"optional":true}},"publishConfig":{"registry":"https://registry.npmjs.org","access":"public"},"devDependencies":{"react-native":"^0.74.0","typescript":"^5.8.3","@types/react-native":"^0.73.0"},"_id":"@ampup-me/react-native-sdk@1.0.12","gitHead":"001c46f67b46f20dbeb44e6513a635fbe8653b1b","bugs":{"url":"https://github.com/AmpUp-me/ampup-5a0f903d/issues"},"homepage":"https://github.com/AmpUp-me/ampup-5a0f903d#readme","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-MtTf4/OvXqM+KJOi78LqLE40YkyoN0qfxJFtBwZT+KR+++rovoIU+xjURTrgnWLNyVH84WEA/B+MAL9u8IiUnA==","shasum":"fa0d9d0c0d4babf7a89e897063f08184ec503b03","tarball":"https://registry.npmjs.org/@ampup-me/react-native-sdk/-/react-native-sdk-1.0.12.tgz","fileCount":24,"unpackedSize":24759,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBRpFQkpkmioxm5QS5dTwlJAwTL1I9RjwZTH5PU1/MCfAiB35GB6Ijg0Xpt7tYiUg65OKhWJk4CDY+ilWhRJU13quw=="}]},"_npmUser":{"name":"ampup-me","email":"abdelrahmankhaled257@gmail.com"},"directories":{},"maintainers":[{"name":"ampup-me","email":"abdelrahmankhaled257@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-sdk_1.0.12_1776864446151_0.7051952755640434"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-22T13:27:26.088Z","1.0.12":"2026-04-22T13:27:26.307Z","modified":"2026-04-22T13:27:26.511Z"},"maintainers":[{"name":"ampup-me","email":"abdelrahmankhaled257@gmail.com"}],"description":"AmpUp React Native SDK bridge with native parity.","homepage":"https://github.com/AmpUp-me/ampup-5a0f903d#readme","repository":{"type":"git","url":"git+https://github.com/AmpUp-me/ampup-5a0f903d.git","directory":"ampup-sdk/sdk-react-native"},"bugs":{"url":"https://github.com/AmpUp-me/ampup-5a0f903d/issues"},"license":"UNLICENSED","readme":"# AmpUp React Native SDK\n\nReact Native bridge for AmpUp native SDKs (Android Kotlin + iOS Swift) with parity-focused behavior.\n\n## Requirements\n\n- React Native 0.74+\n- iOS 13+\n- Android minSdk 21+\n- Expo Dev Client or Bare workflow for native module support\n- Expo Go is not supported for full parity behavior\n\n## Install\n\nUse your package manager:\n\n```bash\nnpm install @ampup-me/react-native-sdk\n```\n\n```bash\nyarn add @ampup-me/react-native-sdk\n```\n\n```bash\npnpm add @ampup-me/react-native-sdk\n```\n\n### Registry\n\nLaunch distribution is public npm for consumer installs:\n\n```bash\nregistry=https://registry.npmjs.org\n```\n\n## Expo (Dev Client) Setup\n\n1) Add plugin in your app config:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\"@ampup-me/react-native-sdk\"]\n  }\n}\n```\n\n2) Regenerate native projects after dependency/config changes:\n\n```bash\nnpx expo prebuild\n```\n\n3) Build and run with Dev Client:\n\n```bash\nnpx expo run:android\n```\n\n```bash\nnpx expo run:ios\n```\n\nThe plugin applies baseline native setup:\n\n- Android permissions: `INTERNET`, `ACCESS_NETWORK_STATE`\n- iOS tracking usage description fallback value if missing\n\nYou still own vendor SDK setup (Firebase/Adjust/Meta/AppsFlyer dependencies and native config files).\n\nYou must also ensure native AmpUp SDK dependencies resolve in host apps:\n\n- iOS: `AmpUpSDK` resolves via Swift Package Manager from `https://github.com/AmpUp-me/ampup-ios-sdk.git`.\n- Android: `com.ampup-me:sdk-android` resolves from the public Maven channel documented in `docs/sdk/android-integration.md`.\n\n## Bare React Native Setup\n\nInstall iOS pods:\n\n```bash\ncd ios && pod install\n```\n\nThen build as usual for Android/iOS.\n\n## Initialize\n\n```ts\nimport { AmpUp } from \"@ampup-me/react-native-sdk\";\n\nawait AmpUp.initialize({\n  workspaceId: \"ws_123\",\n  environment: \"sandbox\",\n  debugMode: true,\n  adapters: {\n    adjustAppToken: \"adj_token\",\n    appsFlyerDevKey: \"af_dev_key\",\n    appsFlyerAppleAppId: \"1234567890\",\n  },\n});\n```\n\n## Track Events\n\n```ts\nAmpUp.track(\"purchase\", {\n  value: 29.99,\n  currency: \"USD\",\n  order_id: \"ORD_123\",\n});\n```\n\n## Generated Wrapper Usage\n\nWhen using `sdk-package-generate` with platform `react-native`, include the generated `AmpUpEvents.ts` in your app and call wrapper methods instead of raw `track`.\n\n## Public API\n\n- `initialize(config)`\n- `track(eventName, params?)`\n- `setDebugMode(enabled)`\n- `checkVersionAndRefresh()`\n- `identify(userId, properties?)`\n\n## Troubleshooting\n\n- Native module missing at runtime:\n  - Ensure you are not using Expo Go.\n  - Rebuild native binaries after install (`expo prebuild`, `expo run:*`).\n- Expo plugin unresolved:\n  - Confirm package name in app config is exactly `@ampup-me/react-native-sdk`.\n  - Remove generated native dirs, then regenerate (`expo prebuild --clean`).\n- iOS build issues:\n  - Re-run `pod install`.\n  - Ensure iOS deployment target is 13+.\n- Android dependency issues:\n  - Ensure the app can resolve `com.ampup-me:sdk-android` from the configured public Maven repository.\n  - Local fallback: publish Android SDK to `mavenLocal` and add `mavenLocal()` in app repositories.\n- No destination events:\n  - Verify workspace config and destination toggles in dashboard.\n\n## Local Development (No Registry Credentials)\n\nFor monorepo testing without npm/Maven credentials:\n\n1. Link RN package locally in your host app:\n\n```bash\npnpm add \"@ampup-me/react-native-sdk@file:../../ampup-sdk/sdk-react-native\"\n```\n\n2. Publish Android SDK to local Maven:\n\n```bash\ncd ../../ampup-sdk/sdk-android\ngradle publishReleasePublicationToMavenLocal\n```\n\n3. Ensure host Android Gradle repositories include `mavenLocal()` before `mavenCentral()`.\n","readmeFilename":"README.md","_rev":"1-232efa0f914224755857288c48f1df30"}