mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #676] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The provided scheme is not valid. A scheme should not include special characters such as ":" or "/".' #438
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#438
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @khsalman on GitHub (Sep 17, 2021).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/676
Description:
I am continuously receiving this "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The provided scheme is not valid. A scheme should not include special characters such as ":" or "/".'" error on iOS 14.5+ devices. Below iOS 14.5 everything was working perfect. It says I cannot make any callback url with using : and // But Fitbit's panel does not allow me to have a callback url without using ://
Please anyone can suggest me any solution?
OAuth Provider? (Twitter, Github, ..):
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
11.4 (Swift 5.2)
11.x (Swift 5.1)
10.x (Swift 5.0)
other: (Please fill in the version you are using.)
objective c
@phatblat commented on GitHub (Sep 23, 2021):
My team ran into this issue as well. It's a change to the Apple
ASWebAuthenticationSessionbehavior of thecallbackURLSchemeparameter; it should be a scheme and NOT a full URL. If you pass a full URL (containing a:) it will be emit a console warning about the invalid scheme on iOS 14.4 and lower, but it is a runtime exception on iOS 14.5+.This OAuthSwift library did not change this behavior but before #654 you actually couldn't get OAuth errors returned unless you did pass a URL in the
callbackURLSchemeparameter. This was fixed in 2.2.I would describe this as "expected behavior" now. Change your code to pass in only your app's custom scheme (not the full URL) in the
callbackURLSchemeparameter.