Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
4.2
2 changes: 1 addition & 1 deletion Simplicity.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Pod::Spec.new do |s|
s.name = "Simplicity"
s.version = "2.0.3"
s.version = "2.0.4"
s.summary = "A simple way to login with Facebook or Google on iOS"

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion Simplicity/LoginProviders/Facebook.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class Facebook: OAuth2 {
let range = urlScheme.range(of: "\\d+", options: .regularExpression) else {
preconditionFailure("You must configure your Facebook URL Scheme to use Facebook login.")
}
let clientId = urlScheme.substring(with: range)
let clientId = String(urlScheme[range])
let authorizationEndpoint = URL(string: "https://www.facebook.com/dialog/oauth")!
let redirectEndpoint = URL(string: urlScheme + "://authorize")!

Expand Down
2 changes: 1 addition & 1 deletion Simplicity/LoginProviders/VKontakte.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class VKontakte: OAuth2 {
let range = urlScheme.range(of: "\\d+", options: .regularExpression) else {
preconditionFailure("You must configure your VK URL Scheme to use VK login.")
}
let clientId = urlScheme.substring(with: range)
let clientId = String(urlScheme[range])
let authorizationEndpoint = URL(string: "https://oauth.vk.com/authorize")!
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have error about undeclared URL? because Foundation is not imported here.

let redirectEndpoint = URL(string: urlScheme + "://authorize")!

Expand Down