Skip to content
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

Featue request: Add an example of usage with swiftui #68

Open
arcrx opened this issue Oct 8, 2020 · 6 comments
Open

Featue request: Add an example of usage with swiftui #68

arcrx opened this issue Oct 8, 2020 · 6 comments

Comments

@arcrx
Copy link

arcrx commented Oct 8, 2020

How could I use proton in a swiftui based macos app? It would be great if there's such an example.

@rajdeep
Copy link
Owner

rajdeep commented Oct 9, 2020

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.

@vox-humana
Copy link
Collaborator

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.

@writing-shed
Copy link

I've got it working with SwiftUI using UIViewRepresentable. It's quite straightforward.

@alexwchh
Copy link

alexwchh commented Dec 1, 2023

how can I use Commands and TextProcessor in swiftui

@rajdeep
Copy link
Owner

rajdeep commented Dec 1, 2023

@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.

@easiwriter
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants