From 76dce17a349b965832aa09f3988d27985decb754 Mon Sep 17 00:00:00 2001 From: Osei Fortune Date: Sat, 21 Feb 2026 21:04:12 -0400 Subject: [PATCH] feat: tiktok business sdk --- README.md | 1 + apps/demo-angular/package.json | 3 +- apps/demo-angular/src/app-routing.module.ts | 1 + apps/demo-angular/src/home.component.ts | 3 + .../nativescript-tiktok.component.html | 8 + .../nativescript-tiktok.component.ts | 17 + .../nativescript-tiktok.module.ts | 10 + apps/demo-angular/tsconfig.json | 3 +- apps/demo/package.json | 3 +- apps/demo/src/main-page.xml | 1 + .../src/plugin-demos/nativescript-tiktok.ts | 10 + .../src/plugin-demos/nativescript-tiktok.xml | 14 + apps/demo/tsconfig.json | 3 +- packages/nativescript-tiktok/.eslintrc.json | 18 + packages/nativescript-tiktok/README.md | 13 + packages/nativescript-tiktok/index.android.ts | 386 ++++ packages/nativescript-tiktok/index.d.ts | 167 ++ packages/nativescript-tiktok/index.ios.ts | 230 +++ .../nativescript.config.ts | 14 + packages/nativescript-tiktok/package.json | 35 + .../platforms/android/include.gradle | 8 + packages/nativescript-tiktok/project.json | 66 + packages/nativescript-tiktok/references.d.ts | 1 + packages/nativescript-tiktok/tsconfig.json | 9 + .../nativescript-tiktok/typings/android.d.ts | 1791 +++++++++++++++++ .../typings/objc!TikTokBusinessSDK.d.ts | 577 ++++++ tools/demo/index.ts | 1 + tools/demo/nativescript-tiktok/index.ts | 8 + tools/workspace-scripts.js | 11 + tsconfig.base.json | 3 +- 30 files changed, 3410 insertions(+), 5 deletions(-) create mode 100644 apps/demo-angular/src/plugin-demos/nativescript-tiktok.component.html create mode 100644 apps/demo-angular/src/plugin-demos/nativescript-tiktok.component.ts create mode 100644 apps/demo-angular/src/plugin-demos/nativescript-tiktok.module.ts create mode 100644 apps/demo/src/plugin-demos/nativescript-tiktok.ts create mode 100644 apps/demo/src/plugin-demos/nativescript-tiktok.xml create mode 100644 packages/nativescript-tiktok/.eslintrc.json create mode 100644 packages/nativescript-tiktok/README.md create mode 100644 packages/nativescript-tiktok/index.android.ts create mode 100644 packages/nativescript-tiktok/index.d.ts create mode 100644 packages/nativescript-tiktok/index.ios.ts create mode 100644 packages/nativescript-tiktok/nativescript.config.ts create mode 100644 packages/nativescript-tiktok/package.json create mode 100644 packages/nativescript-tiktok/platforms/android/include.gradle create mode 100644 packages/nativescript-tiktok/project.json create mode 100644 packages/nativescript-tiktok/references.d.ts create mode 100644 packages/nativescript-tiktok/tsconfig.json create mode 100644 packages/nativescript-tiktok/typings/android.d.ts create mode 100644 packages/nativescript-tiktok/typings/objc!TikTokBusinessSDK.d.ts create mode 100644 tools/demo/nativescript-tiktok/index.ts diff --git a/README.md b/README.md index b9604dd2..d22e41bc 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ - [@nstudio/nativescript-persona](packages/nativescript-persona/README.md) - [@nstudio/nativescript-plaid](packages/nativescript-plaid/README.md) - [@nstudio/nativescript-qr](packages/nativescript-qr/README.md) +- [@nstudio/nativescript-tiktok](packages/nativescript-tiktok/README.md) - [@nstudio/nativescript-tracking-transparency](packages/nativescript-tracking-transparency/README.md) - [@nstudio/nativescript-walletconnect](packages/nativescript-walletconnect/README.md) - [@nstudio/nativescript-web-server](packages/nativescript-web-server/README.md) diff --git a/apps/demo-angular/package.json b/apps/demo-angular/package.json index cf0399d5..0b700497 100644 --- a/apps/demo-angular/package.json +++ b/apps/demo-angular/package.json @@ -31,7 +31,8 @@ "@nstudio/nativescript-tracking-transparency": "file:../../dist/packages/nativescript-tracking-transparency", "@nstudio/nativescript-walletconnect": "file:../../dist/packages/nativescript-walletconnect", "@nstudio/nativescript-web-server": "file:../../dist/packages/nativescript-web-server", - "@nstudio/nativescript-branch": "file:../../dist/packages/nativescript-branch" + "@nstudio/nativescript-branch": "file:../../dist/packages/nativescript-branch", + "@nstudio/nativescript-tiktok": "file:../../dist/packages/nativescript-tiktok" }, "devDependencies": { "@nativescript/android": "~8.9.0", diff --git a/apps/demo-angular/src/app-routing.module.ts b/apps/demo-angular/src/app-routing.module.ts index 2cfb346b..d5047368 100644 --- a/apps/demo-angular/src/app-routing.module.ts +++ b/apps/demo-angular/src/app-routing.module.ts @@ -33,6 +33,7 @@ const routes: Routes = [ { path: 'nativescript-persona', loadChildren: () => import('./plugin-demos/nativescript-persona.module').then((m) => m.NativescriptPersonaModule) }, { path: 'nativescript-plaid', loadChildren: () => import('./plugin-demos/nativescript-plaid.module').then((m) => m.NativescriptPlaidModule) }, { path: 'nativescript-qr', loadChildren: () => import('./plugin-demos/nativescript-qr.module').then((m) => m.NativescriptQrModule) }, + { path: 'nativescript-tiktok', loadChildren: () => import('./plugin-demos/nativescript-tiktok.module').then((m) => m.NativescriptTiktokModule) }, { path: 'nativescript-tracking-transparency', loadChildren: () => import('./plugin-demos/nativescript-tracking-transparency.module').then((m) => m.NativescriptTrackingTransparencyModule) }, { path: 'nativescript-walletconnect', loadChildren: () => import('./plugin-demos/nativescript-walletconnect.module').then((m) => m.NativescriptWalletconnectModule) }, { path: 'nativescript-web-server', loadChildren: () => import('./plugin-demos/nativescript-web-server.module').then((m) => m.NativescriptWebServerModule) }, diff --git a/apps/demo-angular/src/home.component.ts b/apps/demo-angular/src/home.component.ts index 3c465c2a..c0e95378 100644 --- a/apps/demo-angular/src/home.component.ts +++ b/apps/demo-angular/src/home.component.ts @@ -87,6 +87,9 @@ export class HomeComponent { { name: 'nativescript-qr', }, + { + name: 'nativescript-tiktok', + }, { name: 'nativescript-tracking-transparency', }, diff --git a/apps/demo-angular/src/plugin-demos/nativescript-tiktok.component.html b/apps/demo-angular/src/plugin-demos/nativescript-tiktok.component.html new file mode 100644 index 00000000..ddbb6c9f --- /dev/null +++ b/apps/demo-angular/src/plugin-demos/nativescript-tiktok.component.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/apps/demo-angular/src/plugin-demos/nativescript-tiktok.component.ts b/apps/demo-angular/src/plugin-demos/nativescript-tiktok.component.ts new file mode 100644 index 00000000..4b333d7e --- /dev/null +++ b/apps/demo-angular/src/plugin-demos/nativescript-tiktok.component.ts @@ -0,0 +1,17 @@ +import { Component, NgZone } from '@angular/core'; +import { DemoSharedNativescriptTiktok } from '@demo/shared'; +import {} from '@nstudio/nativescript-tiktok'; + +@Component({ + selector: 'demo-nativescript-tiktok', + templateUrl: 'nativescript-tiktok.component.html', +}) +export class NativescriptTiktokComponent { + demoShared: DemoSharedNativescriptTiktok; + + constructor(private _ngZone: NgZone) {} + + ngOnInit() { + this.demoShared = new DemoSharedNativescriptTiktok(); + } +} diff --git a/apps/demo-angular/src/plugin-demos/nativescript-tiktok.module.ts b/apps/demo-angular/src/plugin-demos/nativescript-tiktok.module.ts new file mode 100644 index 00000000..7dee4961 --- /dev/null +++ b/apps/demo-angular/src/plugin-demos/nativescript-tiktok.module.ts @@ -0,0 +1,10 @@ +import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; +import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; +import { NativescriptTiktokComponent } from './nativescript-tiktok.component'; + +@NgModule({ + imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptTiktokComponent }])], + declarations: [NativescriptTiktokComponent], + schemas: [NO_ERRORS_SCHEMA], +}) +export class NativescriptTiktokModule {} diff --git a/apps/demo-angular/tsconfig.json b/apps/demo-angular/tsconfig.json index 1fcca7c2..f90d9dc1 100644 --- a/apps/demo-angular/tsconfig.json +++ b/apps/demo-angular/tsconfig.json @@ -36,7 +36,8 @@ "@nstudio/nativescript-walletconnect": ["../../packages/nativescript-walletconnect/index.d.ts"], "@nstudio/nativescript-web-server": ["../../packages/nativescript-web-server/index.d.ts"], "@nstudio/nativescript-branch": ["../../packages/nativescript-branch/index.d.ts"], - "@nstudio/nativescript-auth0": ["../../packages/nativescript-auth0/index.d.ts"] + "@nstudio/nativescript-auth0": ["../../packages/nativescript-auth0/index.d.ts"], + "@nstudio/nativescript-tiktok": ["../../packages/nativescript-tiktok/index.d.ts"] } }, "files": ["./references.d.ts", "./src/main.ts", "./src/polyfills.ts"], diff --git a/apps/demo/package.json b/apps/demo/package.json index baa07aa1..b16ee884 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -32,7 +32,8 @@ "@nstudio/nativescript-tracking-transparency": "file:../../packages/nativescript-tracking-transparency", "@nstudio/nativescript-walletconnect": "file:../../packages/nativescript-walletconnect", "@nstudio/nativescript-web-server": "file:../../packages/nativescript-web-server", - "@nstudio/nativescript-branch": "file:../../packages/nativescript-branch" + "@nstudio/nativescript-branch": "file:../../packages/nativescript-branch", + "@nstudio/nativescript-tiktok": "file:../../packages/nativescript-tiktok" }, "devDependencies": { "@nativescript/android": "~9.0.0", diff --git a/apps/demo/src/main-page.xml b/apps/demo/src/main-page.xml index 8ee4ede0..f863cc5f 100644 --- a/apps/demo/src/main-page.xml +++ b/apps/demo/src/main-page.xml @@ -35,6 +35,7 @@