bazaarvoice / bv-ios-sdk

Bazaarvoice iOS SDK for Developers
Other
13 stars 8 forks source link

Duplicate review submissions #31

Closed imran-muhammad closed 3 years ago

imran-muhammad commented 5 years ago

Duplicate reviews being submitted and success closure on submitting a review is executing twice (failure closure only executes once). We noticed this issue after updating to SDK version 8+.

Installation: Carthage

Code:

func submitReview(review: HLReview, onSuccess: @escaping () -> Void, onFailure: @escaping (String) -> Void) {

    let reviewSubmission = BVReviewSubmission(reviewTitle: review.title!,
                                              reviewText: review.text!,
                                              rating: UInt(truncating: review.rating!),
                                              productId: review.styleID!)        
    reviewSubmission.action = BVSubmissionAction.submit
    reviewSubmission.userNickname = review.userNickName
    reviewSubmission.userEmail = review.email
    reviewSubmission.sendEmailAlertWhenPublished = true
    reviewSubmission.agreedToTermsAndConditions = true
    reviewSubmission.hostedAuthenticationEmail = review.email
    reviewSubmission.submit({ _ in
        onSuccess()
    }, failure: { (errors) in
        onFailure(errors.description)
    })
}
cameron-ollivierre commented 5 years ago

Thanks for reporting this issue. We've opened an internal ticket to further investigate.

domoniquecarter35 commented 5 years ago

Has there been any updates on this? I can confirm I also get the issue on SDK 8.0.

imran-muhammad commented 5 years ago

Has there been any updates on this? I can confirm I also get the issue on SDK 8.0.

I have not seen any updates yet.

narcisvoicu commented 4 years ago

I've also encountered this issue while using SDK 8.1.0. I found an workaround, there's a property userId and somehow if you set that property, the second call it will point to failure instead of success.

abhinavmandloiBV commented 4 years ago

This issue has been resolved in the latest version 8.1.1.