smartystreets / smartystreets-ios-sdk

The official client libraries for accessing SmartyStreets APIs from iOS
https://smartystreets.com/docs/sdk/ios
Apache License 2.0
7 stars 7 forks source link

US Autocomplete API - Suggestion Not Working (Recent Regression?) #25

Closed ben-p-commits closed 2 years ago

ben-p-commits commented 2 years ago

❤️ Love the SDK btw- you do a great job! @DuncanBeutler - you seem to be the guy to talk to tag for this.

It appears that there is a bug that has been introduced sometime after version 8.8.7. It is working when I revert to 8.8.7, but broken in the latest version.

Reproduction

Make any request with the US autocomplete API that uses a selection string. View the string in the logs.

Expected Behavior

The query param for the selection should use proper %20 space escaping when viewed in the lldb logs: 112%20Nc%2054%20Apt%20(192)%20Carrboro%20NC%2027510 returns 200 with valid results

Actual Behavior (in latest version of the SDK)

The query param for the selection is using aberrant escaping for spaces (%2520?) when viewed in the lldb logs: 112%2520Nc%252054%2520Apt%2520(192)%2520Carrboro%2520NC%252027510 returns 200 with null result ⚠️

ben-p-commits commented 2 years ago

I think this is the commit which caused the issue?

https://github.com/smartystreets/smartystreets-ios-sdk/commit/979feb20464f802d740b252cc81f8655151a4c62

EDIT:

woops- i mean the commit following that one!

DuncanBeutler commented 2 years ago

Great catch! I guess none of our tests flushed this one out. It looks like there's just a redundant URL Encoding happening somewhere which is encoding the % in %20. We're working on it now.

ben-p-commits commented 2 years ago

(* ゚∀゚)ノシ

DuncanBeutler commented 2 years ago

Fix implemented on version 8.10.3