import WebKit
import UIKit
class DissTrackSignUp: UIViewController {
var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
webView = WKWebView(frame: view.bounds)
view.addSubview(webView)
}
@IBAction func signInSpotifyTapped(_ sender: Any) {
let authURL = URL(string: "https://accounts.spotify.com/authorize?client_id=c36fff5175844337a4da991b6eb0436f&response_type=code&redirect_uri=myapp-spotify://&scope=user-read-email")!
let request = URLRequest(url: authURL)
webView.load(request)
webView.isHidden = false
}
}
I am trying to get the user to log in with spotify by redirection in Xcode, but the app will crash before the app is loaded and the launch screen hasnt disappeared.
Ive tried every possible thing like restarting xcode, reconnectiing and deleting outlets, and rewriting code.