Open arcrx opened 4 years ago
That's an interesting question. I have not started looking into integration with SwiftUI yet. Though I do plan to try that out in future, unfortunately it's not in one of the immediate priorities.
Keep an eye out for updates on this issue. Hopefully, I'll be able to make time to at least try it out.
Proton is iOS library based on UIKit. Thus, you can't use it natively on macOS. Well, except in macCatalyst, but I assume it wasn't the question.
For using in SwiftUI on iOS (and macCatalyst) UIViewRepresentable
should help.
I've got it working with SwiftUI using UIViewRepresentable
. It's quite straightforward.
how can I use Commands and TextProcessor in swiftui
@alexwchh, Command and TextProcessor work off the EditorView. You can wrap EditorView in SwiftUI using UIViewRepresentable and use the same. These are not directly usable in SwiftUI as such.
I have been developing an app using SwiftUI with Proton since early 2021. You need to create a Multiplatform Document App, then It will work on iOS, iPadOS and MacOS. As I said in an earlier post you should interface to Proton using UIViewRepresentable. I would like to use SwiftData so I don't need Coredata, but I've hit a number of problems, so have put that on the back burner for now.
How could I use proton in a swiftui based macos app? It would be great if there's such an example.