Skip to content

Fix encoding Error in iOS#84

Open
WooSeongg wants to merge 1 commit intodiefferson:masterfrom
WooSeongg:fix/ios_encoding
Open

Fix encoding Error in iOS#84
WooSeongg wants to merge 1 commit intodiefferson:masterfrom
WooSeongg:fix/ios_encoding

Conversation

@WooSeongg
Copy link

Fixed an issue where URL(string:) returns nil when the query contains unencoded characters like quotes or non-ASCII text.

  • iOS 17 updated URL(string:) to enforce RFC 3986 compliance automatically percent-encoding invalid characters during initialization
// example
// iOS 16
URL(string: "my string")
// ➜ nil (invalid URL due to unencoded space)

// iOS 17
URL(string: "my string")
// ➜ URL("my%20string") — automatically percent-encoded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant