{"_id":"@craftstudiodev/expo-tiktok-business","_rev":"3-3a3bfd3e8bac856e9b57453739dd4789","name":"@craftstudiodev/expo-tiktok-business","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@craftstudiodev/expo-tiktok-business","version":"1.0.0","keywords":["react-native","tiktok","tiktok-business","analytics","ads","turbo-module","new-architecture","expo","expo-plugin"],"author":{"name":"Craft Studio"},"license":"MIT","_id":"@craftstudiodev/expo-tiktok-business@1.0.0","maintainers":[{"name":"bmpdev","email":"huseyn.yenlmez@gmail.com"}],"homepage":"https://github.com/craftstudiodev/expo-tiktok-business#readme","bugs":{"url":"https://github.com/craftstudiodev/expo-tiktok-business/issues"},"dist":{"shasum":"971f4af69fd659a495285b221e525139c60ccd39","tarball":"https://registry.npmjs.org/@craftstudiodev/expo-tiktok-business/-/expo-tiktok-business-1.0.0.tgz","fileCount":34,"integrity":"sha512-NO+g7SoTUgtOt/Mmq7mvmHOqz6R9QYeK6KHj2SwY/cfzFR00VWCl3VfYTLW+u0p9SUuq4Z+wSCKHT18JGn6aGA==","signatures":[{"sig":"MEQCIC5amOV2upYOpfMF33ygFV1wjx8BRnWaI5OLRNAYDmAGAiBzqbJY7fslDYimo9ee/Z6q8/d9/fzoDFL4BeqXoAdl7A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55714},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"f523fb7f75601290f1ca6a23af53cfac5f8787ff","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf lib plugin/build","prepare":"npm run build && npm run build:plugin","build:plugin":"tsc -p plugin/tsconfig.json"},"_npmUser":{"name":"bmpdev","email":"huseyn.yenlmez@gmail.com"},"repository":{"url":"git+https://github.com/craftstudiodev/expo-tiktok-business.git","type":"git"},"_npmVersion":"10.8.2","description":"TikTok Business SDK for React Native — Turbo Module (New Architecture) + Expo support","directories":{},"_nodeVersion":"20.20.2","codegenConfig":{"name":"ExpoTikTokBusinessSpec","type":"modules","android":{"javaPackageName":"com.craftstudiodev.tiktokbusiness"},"jsSrcsDir":"src"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@expo/config-plugins":"^55.0.8"},"peerDependencies":{"react":">=18.0.0","react-native":">=0.73.0"},"_npmOperationalInternal":{"tmp":"tmp/expo-tiktok-business_1.0.0_1775732648981_0.98653877057964","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@craftstudiodev/expo-tiktok-business","version":"1.0.2","keywords":["react-native","tiktok","tiktok-business","analytics","ads","turbo-module","new-architecture","expo","expo-plugin"],"author":{"name":"Craft Studio"},"license":"MIT","_id":"@craftstudiodev/expo-tiktok-business@1.0.2","maintainers":[{"name":"bmpdev","email":"huseyn.yenlmez@gmail.com"}],"homepage":"https://github.com/craftstudiodev/expo-tiktok-business#readme","bugs":{"url":"https://github.com/craftstudiodev/expo-tiktok-business/issues"},"dist":{"shasum":"ca489972462cbc66eb99f9e265bce1431c99de51","tarball":"https://registry.npmjs.org/@craftstudiodev/expo-tiktok-business/-/expo-tiktok-business-1.0.2.tgz","fileCount":34,"integrity":"sha512-w3FErU2mIdqAMuglAIYa/e8jyeezpN/hB46gFKhsU0JJIpnrbHOG8C0VP9RiXVabkSOmcHrx9KAm470o0WQVgQ==","signatures":[{"sig":"MEYCIQCELbHQoRg9qHNJf0S9Zq0S6p18yyFjo45ExVXoYsPCAAIhALDSnPjR4csd9jBUUPC/2OErHhJKzPkrp//lrXMcGGNh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55480},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"ee2a41f46fdcd5dd4057a46c2e3354299b328864","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf lib plugin/build","prepare":"npm run build && npm run build:plugin","build:plugin":"tsc -p plugin/tsconfig.json"},"_npmUser":{"name":"bmpdev","email":"huseyn.yenlmez@gmail.com"},"repository":{"url":"git+https://github.com/craftstudiodev/expo-tiktok-business.git","type":"git"},"_npmVersion":"10.8.2","description":"TikTok Business SDK for React Native — Turbo Module (New Architecture) + Expo support","directories":{},"_nodeVersion":"20.20.2","codegenConfig":{"name":"ExpoTikTokBusinessSpec","type":"modules","android":{"javaPackageName":"com.craftstudiodev.tiktokbusiness"},"jsSrcsDir":"src"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@expo/config-plugins":"^55.0.8"},"peerDependencies":{"react":">=18.0.0","react-native":">=0.73.0"},"_npmOperationalInternal":{"tmp":"tmp/expo-tiktok-business_1.0.2_1776007663735_0.6177199890190224","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@craftstudiodev/expo-tiktok-business","version":"1.0.3","description":"TikTok Business SDK for React Native — Turbo Module (New Architecture) + Expo support","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","build:plugin":"tsc -p plugin/tsconfig.json","prepare":"npm run build && npm run build:plugin","clean":"rm -rf lib plugin/build"},"keywords":["react-native","tiktok","tiktok-business","analytics","ads","turbo-module","new-architecture","expo","expo-plugin"],"author":{"name":"Craft Studio"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/craftstudiodev/expo-tiktok-business.git"},"homepage":"https://github.com/craftstudiodev/expo-tiktok-business#readme","bugs":{"url":"https://github.com/craftstudiodev/expo-tiktok-business/issues"},"peerDependencies":{"react":">=18.0.0","react-native":">=0.73.0"},"devDependencies":{"@expo/config-plugins":"^55.0.8","typescript":"^5.0.0"},"codegenConfig":{"name":"ExpoTikTokBusinessSpec","type":"modules","jsSrcsDir":"src","android":{"javaPackageName":"com.craftstudiodev.tiktokbusiness"}},"_id":"@craftstudiodev/expo-tiktok-business@1.0.3","gitHead":"4d7071ee05102837ffc0d86b7fd47ce1d997412b","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-H4UvpWokmiXGJS1RBhVOQBShMbIZRMBrZB3lHmGd6o616IYAzBmwznyRXeZSA6gcMRtLBigypCGRgZDPdLlPPQ==","shasum":"06549dbe9fd161908748a7508a62416182e40e41","tarball":"https://registry.npmjs.org/@craftstudiodev/expo-tiktok-business/-/expo-tiktok-business-1.0.3.tgz","fileCount":34,"unpackedSize":55357,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDDJUHIF52oYM5rRlH5hZ6Uvg6a3EIQGOul2/ZrJrgB0gIgCgmmV97E1HJy78cEFk3/3R3ZOu8NX/Zl+jzJYj/BXgI="}]},"_npmUser":{"name":"bmpdev","email":"huseyn.yenlmez@gmail.com"},"directories":{},"maintainers":[{"name":"bmpdev","email":"huseyn.yenlmez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/expo-tiktok-business_1.0.3_1776007829414_0.5435702241124851"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-09T11:04:08.896Z","modified":"2026-04-12T15:30:29.768Z","1.0.0":"2026-04-09T11:04:09.138Z","1.0.2":"2026-04-12T15:27:43.868Z","1.0.3":"2026-04-12T15:30:29.619Z"},"bugs":{"url":"https://github.com/craftstudiodev/expo-tiktok-business/issues"},"author":{"name":"Craft Studio"},"license":"MIT","homepage":"https://github.com/craftstudiodev/expo-tiktok-business#readme","keywords":["react-native","tiktok","tiktok-business","analytics","ads","turbo-module","new-architecture","expo","expo-plugin"],"repository":{"type":"git","url":"git+https://github.com/craftstudiodev/expo-tiktok-business.git"},"description":"TikTok Business SDK for React Native — Turbo Module (New Architecture) + Expo support","maintainers":[{"name":"bmpdev","email":"huseyn.yenlmez@gmail.com"}],"readme":"# @craftstudiodev/expo-tiktok-business\n\nTikTok Business SDK bridge for React Native — built as a **Turbo Module** for the New Architecture, with an **Expo config plugin** for zero-config setup.\n\n> React Native 0.73+ · iOS 13+ · Android API 23+ · Expo SDK 50+\n\n---\n\n## Why this package?\n\nThe official TikTok Business SDK only ships native iOS/Android libraries. This package bridges them to React Native using a **Turbo Module** (not the legacy NativeModules bridge), so it works natively with the New Architecture without any interop layer overhead.\n\n- **Turbo Module with Codegen** — type-safe, synchronous-capable native bridge\n- **Expo config plugin** — handles ATT permissions, ProGuard rules automatically\n- **Singleton pattern** — initialize once, use anywhere\n- **Fully typed** — every event name, property, and config is typed\n\n---\n\n## Installation\n\n```bash\n# npm\nnpm install @craftstudiodev/expo-tiktok-business\n\n# yarn\nyarn add @craftstudiodev/expo-tiktok-business\n```\n\n### Bare React Native (CLI)\n\n```bash\ncd ios && pod install\n```\n\n**Android**: Add TikTok's Maven repository to your project-level `android/build.gradle`:\n\n```gradle\nallprojects {\n  repositories {\n    maven { url \"https://artifact.bytedance.com/repository/pangle\" }\n  }\n}\n```\n\n**iOS**: Add `NSUserTrackingUsageDescription` to your `Info.plist`:\n\n```xml\n<key>NSUserTrackingUsageDescription</key>\n<string>We use this to measure ad performance and show you relevant ads.</string>\n```\n\n### Expo\n\nAdd the plugin to your `app.json`:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\n      [\"@craftstudiodev/expo-tiktok-business\"]\n    ]\n  }\n}\n```\n\nWith custom ATT description:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\n      [\n        \"@craftstudiodev/expo-tiktok-business\",\n        {\n          \"trackingDescription\": \"Your custom tracking permission message.\"\n        }\n      ]\n    ]\n  }\n}\n```\n\nThen run `npx expo prebuild` to apply the native changes.\n\n---\n\n## Usage\n\n### Initialize\n\nCall this once at app startup (e.g., in your root component or service initializer):\n\n```typescript\nimport { TikTokBusiness } from '@craftstudiodev/expo-tiktok-business';\n\nconst tiktok = TikTokBusiness.getInstance();\n\nawait tiktok.initialize({\n  appId: 'com.yourcompany.yourapp',\n  tiktokAppId: 'YOUR_TIKTOK_APP_ID',\n  accessToken: 'YOUR_ACCESS_TOKEN',\n  debug: __DEV__,\n});\n```\n\n### Track events\n\nUse built-in event names for standard events, or pass custom strings:\n\n```typescript\nimport { TikTokBusiness, TikTokEventName } from '@craftstudiodev/expo-tiktok-business';\n\nconst tiktok = TikTokBusiness.getInstance();\n\n// Standard event — no params\nawait tiktok.trackEvent(TikTokEventName.LAUNCH_APP);\n\n// Standard event — with params\nawait tiktok.trackEvent(TikTokEventName.PURCHASE, {\n  value: 29.99,\n  currency: 'USD',\n  content_id: 'premium_monthly',\n});\n\n// Custom event\nawait tiktok.trackEvent('button_click', {\n  button_name: 'signup',\n  screen: 'onboarding',\n});\n```\n\n### Available standard events\n\n| Event Name | Constant |\n|---|---|\n| AddToCart | `TikTokEventName.ADD_TO_CART` |\n| AddToWishlist | `TikTokEventName.ADD_TO_WISHLIST` |\n| Checkout | `TikTokEventName.CHECKOUT` |\n| Purchase | `TikTokEventName.PURCHASE` |\n| ViewContent | `TikTokEventName.VIEW_CONTENT` |\n| LaunchAPP | `TikTokEventName.LAUNCH_APP` |\n| InstallApp | `TikTokEventName.INSTALL_APP` |\n| CompleteRegistration | `TikTokEventName.COMPLETE_REGISTRATION` |\n| AddPaymentInfo | `TikTokEventName.ADD_PAYMENT_INFO` |\n| CompleteTutorial | `TikTokEventName.COMPLETE_TUTORIAL` |\n| AchieveLevel | `TikTokEventName.ACHIEVE_LEVEL` |\n| CreateGroup | `TikTokEventName.CREATE_GROUP` |\n| CreateRole | `TikTokEventName.CREATE_ROLE` |\n| GenerateLead | `TikTokEventName.GENERATE_LEAD` |\n| InAppADClick | `TikTokEventName.IN_APP_AD_CLICK` |\n| InAppADImpr | `TikTokEventName.IN_APP_AD_IMPRESSION` |\n| JoinGroup | `TikTokEventName.JOIN_GROUP` |\n| Login | `TikTokEventName.LOGIN` |\n| Rate | `TikTokEventName.RATE` |\n| Search | `TikTokEventName.SEARCH` |\n| SpendCredits | `TikTokEventName.SPEND_CREDITS` |\n| StartTrial | `TikTokEventName.START_TRIAL` |\n| Subscribe | `TikTokEventName.SUBSCRIBE` |\n| UnlockAchievement | `TikTokEventName.UNLOCK_ACHIEVEMENT` |\n\n### Identify users\n\n```typescript\ntiktok.identify({\n  externalId: 'user_123',\n  email: 'user@example.com',\n  phoneNumber: '+1234567890',\n});\n```\n\n### Logout\n\n```typescript\ntiktok.logout();\n```\n\n### Enable/disable tracking\n\nATT (App Tracking Transparency) should be handled at the **app level** — not inside this SDK. Use `expo-tracking-transparency` or your own ATT flow, then pass the result:\n\n```typescript\n// After your ATT prompt resolves:\ntiktok.setTrackingEnabled(userGrantedTracking); // true or false\n```\n\n---\n\n## Full example\n\n```typescript\nimport { useEffect } from 'react';\nimport { TikTokBusiness, TikTokEventName } from '@craftstudiodev/expo-tiktok-business';\n\nexport default function App() {\n  useEffect(() => {\n    const init = async () => {\n      const tiktok = TikTokBusiness.getInstance();\n\n      // Initialize SDK\n      await tiktok.initialize({\n        appId: 'com.yourcompany.app',\n        tiktokAppId: 'YOUR_TIKTOK_APP_ID',\n        accessToken: 'YOUR_ACCESS_TOKEN',\n        debug: __DEV__,\n      });\n\n      // Track app launch\n      await tiktok.trackEvent(TikTokEventName.LAUNCH_APP);\n    };\n\n    init();\n  }, []);\n\n  return <YourApp />;\n}\n\n// Later, anywhere in your app:\nasync function onPurchase(item: { id: string; price: number }) {\n  const tiktok = TikTokBusiness.getInstance();\n  await tiktok.trackEvent(TikTokEventName.PURCHASE, {\n    content_id: item.id,\n    value: item.price,\n    currency: 'USD',\n  });\n}\n```\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}