Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [@nstudio/nativescript-auth0](packages/nativescript-auth0/README.md)
- [@nstudio/nativescript-barcodescanner](packages/nativescript-barcodescanner/README.md)
- [@nstudio/nativescript-blur](packages/nativescript-blur/README.md)
- [@nstudio/nativescript-branch](packages/nativescript-branch/README.md)
- [@nstudio/nativescript-camera-plus](packages/nativescript-camera-plus/README.md)
- [@nstudio/nativescript-cardview](packages/nativescript-cardview/README.md)
- [@nstudio/nativescript-carousel](packages/nativescript-carousel/README.md)
Expand Down
3 changes: 2 additions & 1 deletion apps/demo-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"@nstudio/nativescript-qr": "file:../../dist/packages/nativescript-qr",
"@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-web-server": "file:../../dist/packages/nativescript-web-server",
"@nstudio/nativescript-branch": "file:../../dist/packages/nativescript-branch"
},
"devDependencies": {
"@nativescript/android": "~8.9.0",
Expand Down
1 change: 1 addition & 0 deletions apps/demo-angular/src/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const routes: Routes = [
{ path: 'nativescript-auth0', loadChildren: () => import('./plugin-demos/nativescript-auth0.module').then((m) => m.NativescriptAuth0Module) },
{ path: 'nativescript-barcodescanner', loadChildren: () => import('./plugin-demos/nativescript-barcodescanner.module').then((m) => m.NativescriptBarcodescannerModule) },
{ path: 'nativescript-blur', loadChildren: () => import('./plugin-demos/nativescript-blur.module').then((m) => m.NativescriptBlurModule) },
{ path: 'nativescript-branch', loadChildren: () => import('./plugin-demos/nativescript-branch.module').then((m) => m.NativescriptBranchModule) },
{ path: 'nativescript-camera-plus', loadChildren: () => import('./plugin-demos/nativescript-camera-plus.module').then((m) => m.NativescriptCameraPlusModule) },
{ path: 'nativescript-cardview', loadChildren: () => import('./plugin-demos/nativescript-cardview.module').then((m) => m.NativescriptCardviewModule) },
{ path: 'nativescript-carousel', loadChildren: () => import('./plugin-demos/nativescript-carousel.module').then((m) => m.NativescriptCarouselModule) },
Expand Down
3 changes: 3 additions & 0 deletions apps/demo-angular/src/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export class HomeComponent {
{
name: 'nativescript-blur',
},
{
name: 'nativescript-branch',
},
{
name: 'nativescript-camera-plus',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ActionBar title="nativescript-branch" class="action-bar"> </ActionBar>
<StackLayout class="p-20">
<ScrollView class="h-full">
<StackLayout>
<Button text="Test nativescript-branch" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
</StackLayout>
</ScrollView>
</StackLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Component, NgZone } from '@angular/core';
import { DemoSharedNativescriptBranch } from '@demo/shared';
import {} from '@nstudio/nativescript-branch';

@Component({
selector: 'demo-nativescript-branch',
templateUrl: 'nativescript-branch.component.html',
})
export class NativescriptBranchComponent {
demoShared: DemoSharedNativescriptBranch;

constructor(private _ngZone: NgZone) {}

ngOnInit() {
this.demoShared = new DemoSharedNativescriptBranch();
}
}
10 changes: 10 additions & 0 deletions apps/demo-angular/src/plugin-demos/nativescript-branch.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
import { NativescriptBranchComponent } from './nativescript-branch.component';

@NgModule({
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptBranchComponent }])],
declarations: [NativescriptBranchComponent],
schemas: [NO_ERRORS_SCHEMA],
})
export class NativescriptBranchModule {}
1 change: 1 addition & 0 deletions apps/demo-angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@nstudio/nativescript-persona": ["../../packages/nativescript-persona/index.d.ts"],
"@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"]
}
},
Expand Down
7 changes: 4 additions & 3 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@nstudio/nativescript-cardview": "file:../../packages/nativescript-cardview",
"@nstudio/nativescript-carousel": "file:../../packages/nativescript-carousel",
"@nstudio/nativescript-checkbox": "file:../../packages/nativescript-checkbox",
"@nstudio/nativescript-dynatrace": "file:../../packages/nativescript-dynatrace",
"@nstudio/nativescript-embrace": "file:../../packages/nativescript-embrace",
"@nstudio/nativescript-dynatrace": "file:../../dist/packages/nativescript-dynatrace",
"@nstudio/nativescript-embrace": "file:../../dist/packages/nativescript-embrace",
"@nstudio/nativescript-exoplayer": "file:../../packages/nativescript-exoplayer",
"@nstudio/nativescript-fancyalert": "file:../../packages/nativescript-fancyalert",
"@nstudio/nativescript-filterable-listpicker": "file:../../packages/nativescript-filterable-listpicker",
Expand All @@ -31,7 +31,8 @@
"@nstudio/nativescript-qr": "file:../../packages/nativescript-qr",
"@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-web-server": "file:../../packages/nativescript-web-server",
"@nstudio/nativescript-branch": "file:../../packages/nativescript-branch"
},
"devDependencies": {
"@nativescript/android": "~9.0.0",
Expand Down
1 change: 1 addition & 0 deletions apps/demo/src/main-page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<Button text="nativescript-tracking-transparency" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
<Button text="nativescript-walletconnect" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
<Button text="nativescript-web-server" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
<Button text="nativescript-branch" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
</StackLayout>
</ScrollView>
</StackLayout>
Expand Down
10 changes: 10 additions & 0 deletions apps/demo/src/plugin-demos/nativescript-branch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Observable, EventData, Page } from '@nativescript/core';
import { DemoSharedNativescriptBranch } from '@demo/shared';
import {} from '@nstudio/nativescript-branch';

export function navigatingTo(args: EventData) {
const page = <Page>args.object;
page.bindingContext = new DemoModel();
}

export class DemoModel extends DemoSharedNativescriptBranch {}
14 changes: 14 additions & 0 deletions apps/demo/src/plugin-demos/nativescript-branch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
<Page.actionBar>
<ActionBar title="nativescript-branch" icon="" class="action-bar">
</ActionBar>
</Page.actionBar>
<StackLayout class="p-20">
<ScrollView class="h-full">
<StackLayout>
<Button text="Test nativescript-branch" tap="{{ testIt }}" class="btn btn-primary"/>

</StackLayout>
</ScrollView>
</StackLayout>
</Page>
1 change: 1 addition & 0 deletions apps/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@nstudio/nativescript-persona": ["../../packages/nativescript-persona/index.d.ts"],
"@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"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/nativescript-auth0/typings/auth0.android.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ declare module com {
serialExecutor: java.util.concurrent.Executor,
fragmentActivity: java.lang.ref.WeakReference<androidx.fragment.app.FragmentActivity>,
localAuthenticationOptions: com.auth0.android.authentication.storage.LocalAuthenticationOptions,
localAuthenticationManagerFactory: com.auth0.android.authentication.storage.LocalAuthenticationManagerFactory
localAuthenticationManagerFactory: com.auth0.android.authentication.storage.LocalAuthenticationManagerFactory,
);
public getCredentials(param0: string, param1: number, param2: java.util.Map<string, string>, param3: java.util.Map<string, string>, param4: boolean, param5: com.auth0.android.callback.Callback<com.auth0.android.result.Credentials, com.auth0.android.authentication.storage.CredentialsManagerException>): void;
public hasValidCredentials(expiresAt: number): boolean;
Expand Down
18 changes: 18 additions & 0 deletions packages/nativescript-branch/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*", "node_modules/**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
25 changes: 25 additions & 0 deletions packages/nativescript-branch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# @nstudio/nativescript-branch

```javascript
npm install @nstudio/nativescript-branch
```

## Usage

From your app's main entry import `BranchIO` to call the init method before the app launches.

```ts
import { BranchIO } from '@nstudio/nativescript-branch';

BranchIO.initSession(...);
```

## Config

[Android](https://help.branch.io/developers-hub/docs/android-basic-integration#4-configure-app)


[iOS](https://help.branch.io/developers-hub/docs/ios-basic-integration)
## License

Apache License Version 2.0
3 changes: 3 additions & 0 deletions packages/nativescript-branch/common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Observable } from '@nativescript/core';

export class NativescriptBranchCommon extends Observable {}
Loading