smileidentity / react-native

The Official Smile ID React Native SDK
https://docs.smileidentity.com/integration-options/mobile
MIT License
0 stars 2 forks source link

Consecutive statements on a line must be separated by ';' #59

Open Goldtek opened 2 months ago

Goldtek commented 2 months ago

![Uploading Screenshot 2024-08-22 at 10.18.47.png…]()

            let response = if isEnroll {
                try await SmileID.api.doSmartSelfieEnrollment(
                    signature: authResponse.signature,
                    timestamp: authResponse.timestamp,
                    selfieImage: smartSelfieImage,
                    livenessImages: smartSelfieLivenessImages,
                    userId: userId,
                    partnerParams: extraPartnerParams,
                    callbackUrl: SmileID.callbackUrl,
                    sandboxResult: nil,
                    allowNewEnroll: allowNewEnroll
                )
            } 

@JNdhlovu @mldangelo @jumaallan @vanshg @ntkzwane

jumaallan commented 2 months ago

@Goldtek Can you describe the issue better?

Goldtek commented 2 months ago

its complaining about this let response = if isEnroll { so i cant even build the project, please is it something that can be quickly looked at @jumaallan

Goldtek commented 2 months ago

![Uploading Screenshot 2024-08-26 at 15.25.20.png…]() @jumaallan @vanshg @mldangelo @JNdhlovu This has not been looked into yet

if the image is uploaded here did not show, use this wetransfer link to check the image https://we.tl/t-kRNohvHehP

Goldtek commented 2 months ago

change this on selfieViewModel  let response = if isEnroll {                     try await SmileID.api.doSmartSelfieEnrollment(                         signature: authResponse.signature,                         timestamp: authResponse.timestamp,                         selfieImage: smartSelfieImage,                         livenessImages: smartSelfieLivenessImages,                         userId: userId,                         partnerParams: extraPartnerParams,                         callbackUrl: SmileID.callbackUrl,                         sandboxResult: nil,                         allowNewEnroll: allowNewEnroll                     )                 } else {                     try await SmileID.api.doSmartSelfieAuthentication(                         signature: authResponse.signature,                         timestamp: authResponse.timestamp,                         userId: userId,                         selfieImage: smartSelfieImage,                         livenessImages: smartSelfieLivenessImages,                         partnerParams: extraPartnerParams,                         callbackUrl: SmileID.callbackUrl,                         sandboxResult: nil                     )                 }                                 to                                                 let response = isEnroll ? try await SmileID.api.doSmartSelfieEnrollment( signature: authResponse.signature, timestamp: authResponse.timestamp, selfieImage: smartSelfieImage, livenessImages: smartSelfieLivenessImages, userId: userId, partnerParams: extraPartnerParams, callbackUrl: SmileID.callbackUrl, sandboxResult: nil, allowNewEnroll: allowNewEnroll ) : try await SmileID.api.doSmartSelfieAuthentication( signature: authResponse.signature, timestamp: authResponse.timestamp, userId: userId, selfieImage: smartSelfieImage, livenessImages: smartSelfieLivenessImages, partnerParams: extraPartnerParams, callbackUrl: SmileID.callbackUrl, sandboxResult: nil )

Goldtek commented 2 months ago

change this on localStorage

 static func isNetworkFailure(         error: SmileIDError     ) -> Bool {         switch error {         case .httpError:             true         default:             false         }     }         to         static func isNetworkFailure( error: SmileIDError ) -> Bool { switch error { case .httpError: return true default: return false } }

Goldtek commented 2 months ago

you can thank me

jumaallan commented 2 months ago

Is this a react native issue @Goldtek ?

Goldtek commented 2 months ago

Yes

On Mon, 2 Sept 2024, 8:14 am Juma Allan, @.***> wrote:

Is this a react native issue @Goldtek https://github.com/Goldtek ?

— Reply to this email directly, view it on GitHub https://github.com/smileidentity/react-native/issues/59#issuecomment-2323984429, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFC5SLCK2IKYU35SMARYHOLZUQF65AVCNFSM6AAAAABM5WZSM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTHE4DINBSHE . You are receiving this because you were mentioned.Message ID: @.***>

Goldtek commented 2 months ago

But th issue is majorly on the sdk in ios associated with the react native package

On Mon, 2 Sept 2024, 8:18 am Chisom Onwuegbuzie Dike, < @.***> wrote:

Yes

On Mon, 2 Sept 2024, 8:14 am Juma Allan, @.***> wrote:

Is this a react native issue @Goldtek https://github.com/Goldtek ?

— Reply to this email directly, view it on GitHub https://github.com/smileidentity/react-native/issues/59#issuecomment-2323984429, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFC5SLCK2IKYU35SMARYHOLZUQF65AVCNFSM6AAAAABM5WZSM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTHE4DINBSHE . You are receiving this because you were mentioned.Message ID: @.***>

jumaallan commented 2 months ago

Those files you mentioned exist on our native swift sdk @Goldtek

https://github.com/smileidentity/ios

Goldtek commented 2 months ago

Yes please, also I feel you guys needs ro still look into it

On Mon, 2 Sept 2024, 8:20 am Juma Allan, @.***> wrote:

Those files you mentioned exist on our native swift sdk @Goldtek https://github.com/Goldtek

https://github.com/smileidentity/ios

— Reply to this email directly, view it on GitHub https://github.com/smileidentity/react-native/issues/59#issuecomment-2323993936, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFC5SLGCEUTSYKT2WFD54RDZUQGT3AVCNFSM6AAAAABM5WZSM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTHE4TGOJTGY . You are receiving this because you were mentioned.Message ID: @.***>

jumaallan commented 2 months ago

Yes please, also I feel you guys needs ro still look into it On Mon, 2 Sept 2024, 8:20 am Juma Allan, @.> wrote: Those files you mentioned exist on our native swift sdk @Goldtek https://github.com/Goldtek https://github.com/smileidentity/ios — Reply to this email directly, view it on GitHub <#59 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFC5SLGCEUTSYKT2WFD54RDZUQGT3AVCNFSM6AAAAABM5WZSM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTHE4TGOJTGY . You are receiving this because you were mentioned.Message ID: @.>

This code runs fine. Can you share more information about where you are using this? Is this being used in a react native repo on your end? what version are you using? that should help us debug the issue better - or you can provide a sample repo that has this issue @Goldtek