This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DetentSheet.swift | |
// StarLardKit | |
// | |
// Created by Caleb Friden on 9/28/21. | |
// | |
import SwiftUI | |
// MARK: - Public |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SafariServices | |
func logInWithBlizzard() { | |
//Blizzard OAuth URL | |
if let authURL = URL(string: "https://myRegioncode.battle.net/oauth/authorize?access_type=online&client_id=myClientID&redirect_uri=myRedirectURI&response_type=code&state=") { | |
let safariVC = SFSafariViewController(url: authURL, entersReaderIfAvailable: true) | |
safariVC.delegate = self | |
self.present(safariVC, animated: true) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SafariServices | |
var authSession: SFAuthenticationSession? | |
func logInWithBlizzard() { | |
//Blizzard OAuth URL | |
let authURL = URL(string: "https://myRegioncode.battle.net/oauth/authorize?access_type=online&client_id=myClientID&redirect_uri=myRedirectURI&response_type=code&state=") | |
let loginUrlScheme = "myAppName" | |
//Initialize auth session |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AuthenticationServices | |
var webAuthSession: ASWebAuthenticationSession? | |
@available(iOS 12.0, *) | |
func logInWithBlizzard() { | |
//Blizzard OAuth URL | |
let authURL = URL(string: "https://myRegioncode.battle.net/oauth/authorize?access_type=online&client_id=myClientID&redirect_uri=myRedirectURI&response_type=code&state=") | |
let loginUrlScheme = "myAppName" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import Nuke | |
@available(watchOS 7.0, *) | |
@available(tvOS 14.0, *) | |
@available(iOS 14.0, *) | |
@available(OSX 11.0, *) | |
public struct FetchImageView<Placeholder>: View where Placeholder: View { | |
public var body: some View { | |
content |