Skip to content

Commit

Permalink
Fix: iOS commands for setparams (#14)
Browse files Browse the repository at this point in the history
* feat: iOS base views props in progress

* feat: SmartSelfie enrollment ios

* feat: cleanup smile ios swift coimments

* fix: remove package manager enforced version

* fix: lint

* feat: add smartselfie auth

* feat: init method and rename modules

* fix: event not emmited

* fix: event not emmited

* feat: docv, enhanced docv,biometrickyc

* feat: consent and params deserialisation

* feat: refactor ios remove products and use indvidual params

* feat:onresult abstraction

* feat: callbacks

* feat: swiftlint

* feat: remove tags

* feat: rn ios products refactor

* feat: docs on view model

* feat: rename products and views

* feat: update to android out of beta

* feat: ios add enhanced kyc

* feat: update ios to v10

* feat: update ios to v10

* feat: remove wrappers

* feat: comments on missing required data text in swiftui methods

* fix: remove reference for smile_config.json in proj file

* feat: comments on ui udpates

* fix: format fiels

* feat: update android to 10.0.1 remove immutable impl

* feat: remove wrappers from main

* feat: data validation matching swift impl

* fix: ios command id as int and android command id as string
  • Loading branch information
JNdhlovu authored Dec 14, 2023
1 parent 414624f commit e501e6a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 12 deletions.
9 changes: 7 additions & 2 deletions src/SmileIDBiometricKYCView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import React, { Component } from 'react';
import { HostComponent, UIManager, findNodeHandle } from 'react-native';
import {
HostComponent,
UIManager,
findNodeHandle,
Platform,
} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import { BiometricKYCRequest } from './index';

Expand All @@ -24,7 +29,7 @@ export default class SmileIDBiometricKYCView extends Component<BiometricKYCReque
if (typeof commandId !== 'undefined') {
UIManager.dispatchViewManagerCommand(
findNodeHandle(this.viewRef.current),
commandId.toString(),
Platform.OS === 'android' ? commandId.toString() : commandId,
[parameters]
);
} else {
Expand Down
9 changes: 7 additions & 2 deletions src/SmileIDConsentView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import React, { Component } from 'react';
import { HostComponent, UIManager, findNodeHandle } from 'react-native';
import {
HostComponent,
UIManager,
findNodeHandle,
Platform,
} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import { ConsentRequest } from './index';

Expand All @@ -23,7 +28,7 @@ export default class SmileIDConsentView extends Component<ConsentRequest> {
if (typeof commandId !== 'undefined') {
UIManager.dispatchViewManagerCommand(
findNodeHandle(this.viewRef.current),
commandId.toString(),
Platform.OS === 'android' ? commandId.toString() : commandId,
[parameters]
);
} else {
Expand Down
9 changes: 7 additions & 2 deletions src/SmileIDDocumentVerificationView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import React, { Component } from 'react';
import { HostComponent, UIManager, findNodeHandle } from 'react-native';
import {
HostComponent,
UIManager,
findNodeHandle,
Platform,
} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import { DocumentVerificationRequest } from './index';

Expand All @@ -25,7 +30,7 @@ export default class SmileIDDocumentVerificationView extends Component<DocumentV
if (typeof commandId !== 'undefined') {
UIManager.dispatchViewManagerCommand(
findNodeHandle(this.viewRef.current),
commandId.toString(),
Platform.OS === 'android' ? commandId.toString() : commandId,
[parameters]
);
} else {
Expand Down
9 changes: 7 additions & 2 deletions src/SmileIDEnhancedDocumentVerificationView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import React, { Component } from 'react';
import { HostComponent, UIManager, findNodeHandle } from 'react-native';
import {
HostComponent,
UIManager,
findNodeHandle,
Platform,
} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import { DocumentVerificationRequest } from './index';

Expand All @@ -25,7 +30,7 @@ export default class SmileIDEnhancedDocumentVerificationView extends Component<D
if (typeof commandId !== 'undefined') {
UIManager.dispatchViewManagerCommand(
findNodeHandle(this.viewRef.current),
commandId.toString(),
Platform.OS === 'android' ? commandId.toString() : commandId,
[parameters]
);
} else {
Expand Down
9 changes: 7 additions & 2 deletions src/SmileIDSmartSelfieAuthenticationView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import React, { Component } from 'react';
import { HostComponent, UIManager, findNodeHandle } from 'react-native';
import {
HostComponent,
UIManager,
findNodeHandle,
Platform,
} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import { SmartSelfieAuthenticationRequest } from './index';

Expand All @@ -25,7 +30,7 @@ export default class SmileIDSmartSelfieAuthenticationView extends Component<Smar
if (typeof commandId !== 'undefined') {
UIManager.dispatchViewManagerCommand(
findNodeHandle(this.viewRef.current),
commandId.toString(),
Platform.OS === 'android' ? commandId.toString() : commandId,
[parameters]
);
} else {
Expand Down
9 changes: 7 additions & 2 deletions src/SmileIDSmartSelfieEnrollmentView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import React, { Component } from 'react';
import { HostComponent, UIManager, findNodeHandle } from 'react-native';
import {
HostComponent,
UIManager,
findNodeHandle,
Platform,
} from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import { SmartSelfieEnrollmentRequest } from './index';

Expand All @@ -25,7 +30,7 @@ export default class SmileIDSmartSelfieEnrollmentView extends Component<SmartSel
if (typeof commandId !== 'undefined') {
UIManager.dispatchViewManagerCommand(
findNodeHandle(this.viewRef.current),
commandId.toString(),
Platform.OS === 'android' ? commandId.toString() : commandId,
[parameters]
);
} else {
Expand Down

0 comments on commit e501e6a

Please sign in to comment.