Home / IOS Development / Using Swifter (Twitter API) with SwiftUI: iOSProgramming

Using Swifter (Twitter API) with SwiftUI: iOSProgramming



I want to develop my own Twitter app, and therefore I want to use the Swifter API. If I used UIKitI had to call swifter.authorize(withCallback: url, presentingFrom: UIView?, success: ...) in viewDidLoad(). I realized I had to call it quits

struct MyApp: App {
		var body: some Scene {
			ContentView()
				.onAppear() {
				...
					swifter.authorize(...)
				}
		}
}

IN presentingFrom: I have to give one up UIView. Since I use SwiftUI, There is nobody UIView. How can I use swifter.authorize() in a SwiftUI App?


Source link