Swift 5.7 SwiftUI Documentation

I was told by my Parse host to open an issue here.

This has Swift but not SwiftUI documentation:
https://docs.parseplatform.org/ios/guide/

If you know Swift, I imagine my confusion is basic, easy and clear for you to sort out and tell me.
How do I integrate an existing Parse database built for ObjectiveC (which I don’t know) into a fresh SwiftUI App.

My vendor documentation doesn’t include Swift let alone SwiftUI.
I’d love to get a basic new SwiftUI App accessing the existing Parse database.

I think the question is more related to how to code with SwiftUI. I guess a basic SwiftUI tutorial should give you a good place to start.

I have seen some code examples in this issue, maybe that helps:

1 Like

I checked that page yourprovided (thanks) and got further along from help here and now getting two clear errors I tried searching for but can’t understand:


Error:
Cannot find ‘ParseClientConfiguration’ in scope

Fixed the second error btw just now clicking Xcode’s “fix” adding configuration.

However, in the documentation it says include import Swift however when I do that, I was getting error that it can’t find that, now it is not showing an error.

Today when I opened the project in Xcode, I have a new error:

Error Domain=NSCocoaErrorDomain Code=513 "“Parse-Swift” couldn’t be removed because you don’t have permission to access it." UserInfo={NSUserStringVariant=(

That may be because I used CleanMyMac yesterday which maybe deleted cache/those contents?

Or is could this all be because I used the Package Manager to get Parse in here instead of cocoa pods?

update:
just to clarify, the second error in the image above is gone after including import Parse at the start.
(new user here can’t embed pic to show you)

All I’ve done is try to update package and clean build etc


Hope I’m not too late to the party and hope this helps you out.

From what I gather you’re mixing 2 separate libraries namely “Parse” and “ParseSwift”

I see here that you’re still using the Parse library which means you need to use the Parse-IOS-SDK library. ( which is why you got the “Cannot find ‘Parse’ in scope”) error.

I would suggest you start from scratch and use Parse-Swift instead.

The installation and documentation can be found here: GitHub - parse-community/Parse-Swift: The Swift SDK for Parse Platform (iOS, macOS, watchOS, tvOS, Linux, Android, Windows)

this is what you have by adding the code “import ParseSwift”

your setup would look like this

ParseSwift.initialize(applicationId: "xxxxxxxxxx", clientKey: "xxxxxxxxxx", serverURL: URL(string: "https://example.com")!)

When you mentioned earlier “How do I integrate an existing Parse database built for ObjectiveC (which I don’t know) into a fresh SwiftUI App.” - this doesn’t matter as a Parse Database is a stand alone database that can be accessed by any Parse SDK (like javascript, ios, parse-swift). So this doesn’t matter.

What’s important is you understand how to set your database up (from the sound of it is that you have that ready from a 3rd party vendor) and setup your swiftUI app using the Parse-Swfit libary.

hope this helps