{"_id":"@akxks_/react-native-apple-ads-attribution","name":"@akxks_/react-native-apple-ads-attribution","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.4":{"name":"@akxks_/react-native-apple-ads-attribution","version":"1.0.4","description":"React Native Apple Ads attribution package using AdServices only, without deprecated iAd/ADClient dependencies.","main":"index.js","keywords":["react-native","ios","apple","ads","apple-search-ads","search-ads","AdServices","attribution","attributionToken"],"author":{"name":"Adrian Koszpek"},"license":"MIT","homepage":"https://github.com/akxks/react-native-apple-ads-attribution#readme","repository":{"type":"git","url":"git+https://github.com/akxks/react-native-apple-ads-attribution.git"},"bugs":{"url":"https://github.com/akxks/react-native-apple-ads-attribution/issues"},"publishConfig":{"access":"public"},"peerDependencies":{"react-native":"*"},"_id":"@akxks_/react-native-apple-ads-attribution@1.0.4","gitHead":"af3d8f83c2076e7545e7e26192e05fa5c8cd5317","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-PV16wZwL2fdphFbD64rg0TJ0Pp5qvrKvRjZVb+ZflrZymJt7VHHiS4fuCSphSl9nQew+8Jq//f9GpXksfMpJ+A==","shasum":"0b2142579713a27df3360ba41a33ad3bbeff8ece","tarball":"https://registry.npmjs.org/@akxks_/react-native-apple-ads-attribution/-/react-native-apple-ads-attribution-1.0.4.tgz","fileCount":7,"unpackedSize":14732,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCl71rsRITjxNF35BFxdzwPPpmAfDinIngHzE64im0r8QIhAIOtvo7EjQb8BYuy2RvrGkzwwTWLNAK9R4C7WQJKA6Lr"}]},"_npmUser":{"name":"akxks_","email":"81ampler.partner@icloud.com"},"directories":{},"maintainers":[{"name":"akxks_","email":"81ampler.partner@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-apple-ads-attribution_1.0.4_1780594614258_0.41156231760393336"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-04T17:36:53.726Z","1.0.4":"2026-06-04T17:36:54.397Z","modified":"2026-06-04T17:36:54.649Z"},"maintainers":[{"name":"akxks_","email":"81ampler.partner@icloud.com"}],"description":"React Native Apple Ads attribution package using AdServices only, without deprecated iAd/ADClient dependencies.","homepage":"https://github.com/akxks/react-native-apple-ads-attribution#readme","keywords":["react-native","ios","apple","ads","apple-search-ads","search-ads","AdServices","attribution","attributionToken"],"repository":{"type":"git","url":"git+https://github.com/akxks/react-native-apple-ads-attribution.git"},"author":{"name":"Adrian Koszpek"},"bugs":{"url":"https://github.com/akxks/react-native-apple-ads-attribution/issues"},"license":"MIT","readme":"# @akxks_/react-native-apple-ads-attribution\n\nReact Native Apple Ads attribution for iOS using Apple's supported `AdServices` flow only.\n\nThis package exists because older Apple Ads attribution libraries still reference the deprecated `iAd` / `ADClient` API. That can fail modern iOS builds with linker errors such as:\n\n```txt\nUndefined symbols for architecture arm64\nSymbol: _OBJC_CLASS_$_ADClient\n```\n\nThis package keeps the familiar React Native API shape, but removes the unsupported legacy fallback and uses the supported `AdServices` token + attribution request path instead.\n\n## Why this package is needed\n\n- Modern Xcode / EAS builds can fail when a package still links against `ADClient`\n- Apple’s supported attribution path is `AdServices`, not `iAd`\n- Some apps only need a safe way to determine attribution and pass the token or result to their backend\n- Existing apps may want a drop-in replacement with minimal JS changes\n\n## What changed from the older package\n\n- Removed `iAd` / `ADClient`\n- Kept `AdServices`\n- Kept the same exported method names for easier migration\n- `getiAdAttributionData()` now rejects with a clear unsupported error instead of attempting deprecated behavior\n\n## Installation\n\n```bash\nnpm install @akxks_/react-native-apple-ads-attribution\n```\n\nIf you use Expo with prebuild:\n\n```bash\nnpx expo prebuild --clean --platform ios\n```\n\n## Usage\n\n```js\nimport AppleAdsAttribution from \"@akxks_/react-native-apple-ads-attribution\";\n\nconst attributionData = await AppleAdsAttribution.getAttributionData();\nconst adServicesAttributionToken =\n  await AppleAdsAttribution.getAdServicesAttributionToken();\nconst adServicesAttributionData =\n  await AppleAdsAttribution.getAdServicesAttributionData();\n```\n\n## API\n\n### `getAttributionData()`\n\nFetches attribution data using `AdServices`.\n\n### `getAdServicesAttributionToken()`\n\nReturns an Apple Ads attribution token generated on-device. The token is typically valid for 24 hours.\n\n### `getAdServicesAttributionData()`\n\nGenerates a token and requests attribution data from Apple’s attribution API.\n\n### `getiAdAttributionData()`\n\nRejected intentionally because the deprecated `iAd` / `ADClient` path is not supported in this package.\n\n## iOS support\n\n- iOS 14.3+\n- Real device required for token generation\n- Simulator is not supported for attribution token generation\n\n## Migration from older packages\n\nReplace:\n\n```bash\nnpm uninstall react-native-apple-ads-attribution @hexigames/react-native-apple-ads-attribution\n```\n\nWith:\n\n```bash\nnpm install @akxks_/react-native-apple-ads-attribution\n```\n\nThen update imports:\n\n```js\nimport AppleAdsAttribution from \"@akxks_/react-native-apple-ads-attribution\";\n```\n\n## Notes\n\n- On non-iOS platforms, methods return `null` just like the original package behavior\n- If attribution is unavailable, handle errors with `try/catch`\n- If your backend only needs the attribution token or a boolean attribution flag, this package works well as a minimal bridge\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-67026e15461e97d6e77876cb73fa92e1"}