Skip to content

Important changes for ReadMe and Docs in upcoming SwiftUI changes. #1517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
noobs2ninjas opened this issue Jun 25, 2020 · 2 comments · Fixed by #1783
Closed

Important changes for ReadMe and Docs in upcoming SwiftUI changes. #1517

noobs2ninjas opened this issue Jun 25, 2020 · 2 comments · Fixed by #1783
Labels
type:docs Only change in the docs or README

Comments

@noobs2ninjas
Copy link
Member

noobs2ninjas commented Jun 25, 2020

For the upcoming Swift 5.3/XCode 12. SwiftUI applications by default will no longer have an app delegate. Instead, this is what is created by default.

@main
struct Xcode12TestApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

Since Apple is now pushing to use purely SwiftUI and move away from UIKit including storyboard and controllers. I feel we need to do some testing on how to initialize Parse, ParseFacebookUtils, and ParseTwitterUtils to work with SwiftUI. We then need to update our docs and ReadME, the later of which is way overdue for an update anyway..

@noobs2ninjas noobs2ninjas added type:docs Only change in the docs or README Needs Investigation labels Jun 25, 2020
@jbhannah
Copy link

jbhannah commented Jul 6, 2020

In my tinkering, the following works just fine for initializing Parse in a pure-SwiftUI app:

import Parse
import SwiftUI

@main
class Xcode12TestApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }

    required init() {
        let config = ParseClientConfiguration {  }
        Parse.initialize(with: config)
    }
}

@noobs2ninjas
Copy link
Member Author

Thanks @jbhannah for doing that! That is seriously helpful.

I think the most important thing is that we test facebook initialization and how it works within facebook utils. I'm betting we need to add documentation explaining that using a @main class will not work and an @UIApplicationMain app delegate will be required in order to initialize facebook and handle URI callbacks properly when being routed back to the application after logging in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:docs Only change in the docs or README
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants