Replies: 8 comments 5 replies
-
Thank you @cbaker6 We reviewed that conversation previously and were not fully clear on the intention or code. It was also not clear if For example, the conversation mentions the following
but in practice we're not sure of the implementation:
We did review Examples of using ParseSwift with Local Storage section, but it requires an abstraction layer between whatever the local storage is (CoreData, Postgres or even json flat files) and the server. We were hoping to utilize ParseSwift's elegance to perform queries etc against local data (like Parse used to do) and also have sync and not have to support two different databases/storage mechanisms. Again, we are migrating from Realm and Atlas sync and were hoping ParseSwift with Back4App would fill the requirements. Bummer if not as this is a great product. |
Beta Was this translation helpful? Give feedback.
-
Almost all objects in ParseSwift are structures, I elaborate more below...
ParseUser and ParseInstallation are Protocols (see the beginning of the README to learn about Protocol Oriented Programming (POP). You see the errors you mentioned because you never created an Then you will get the
This is true; it does require another level of abstraction/implementation, as #69 states. This is because "how" to synchronize data is left to the developer, as there are several complex solutions for various problems. Any structure with a
ParseSwift is a very powerful SDK and is more elegant (IMO) and functional than any/all of the Parse Client SDKs (perhaps many other SDKs outside of Parse in the BaaS space, but I haven't investigated enough to make such a claim). A limitation is that it doesn't "sync" data for you, as I haven't seen a one-size-fits-all solution that has convinced me it should be implemented in the SDK. See my previous comment in #69: |
Beta Was this translation helpful? Give feedback.
-
@cbaker6 Thank you so much for taking the time to provide some in-depth information. We have an test 'ToDo' type app running with Back4App which is providing some hands on experience. We've also looked at the Playground examples you mentioned and are considering potentially running Parse Server on the local Mac during development; but that has not gone so well. While we have successfully installed, configured and started the Parse Server as shown here
we then ran the code in the Playground 1 - Your First Object and it crashes on the last line with no clear indication as to why (see below). We then stopped the server
and upon issuing the exact same command to start it again
it error's out
Perhaps we are doing something wrong but if the server started, nothing changed, then it should start again. Playground crash error: Execution was interrupted, reason: EXC_BREAKPOINT (code=1, subcode=0x19e331f28). As a last resort, we changed the Not sure what else to do to make the Playgrounds work but we will keep working with the ToDo app we built to evaluate if ParseSwift is going to allow us to migrate from Realm. Thanks again Jay |
Beta Was this translation helpful? Give feedback.
-
Thank you. As mentioned, we have the Parse Server successfully running (we think) and we also pointed the initialization code to our Back4App server with the same result. We assume since we can access the GUI, the server is running. Is that correct? We opened XCode and in navigated to the 1 - Getting Started and ran the Playground - here's the result. 144 errors due to Optional Data -> String Conversion Violation:. However, I believe this is a fault in SwiftLint default configuration but don't want to change anything without knowing the correct path. We then thought there maybe an update available via SPM so upon checking that we receive: |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response and patience. For clarity, we don't have a manual server - we used the docker link (the same one you provided) and went through that process. Not sure how we would end up with an old version of the Parse Server though. We were trying to manually start it which was referenced above. I am not seeing a --version command to determine what version installed. Perhaps there's another way? We had also pointed the func initialize to our current Back4App server which is working and received the same error. Here's what Docker looks like - we can start and stop parse-hipaa-parse-swift container. We had quite a few issues with SwiftLint and Realm previously so it was not installed. We installed it, added the line you mentioned And then back to the same error we previously mentioned: To summarize Docker is installed and running the Parse-Server.
We can navigate around and see _Role and _User (we assume those are the Default Classes you referenced) |
Beta Was this translation helpful? Give feedback.
-
As an update: We are very familiar with XCode, Playgrounds etc and have been using those tools since they were released and have several apps in pre-production so we know to no jump to the end to run the code (not to date myself, but i've been coding for 40+ years so I kinda know my way around). One ongoing issue is that Docker Desktop is giving us a lot of trouble; once it's used and then quit, all of the background activities continue to run and must be force quit with Activity Monitor for it to be usable again. That leads to, what we guess, is the parse server not fully starting. We removed all versions of parse, parse-server as well as the quick-start hippa server and then used GitHub desktop to refresh everything. And it's almost working. Following your instructions above, up to line 35 works and outputs to console. But then, without restarting playground, it crashes before line 166 Current Swift SDK version is "5.11.3" |
Beta Was this translation helpful? Give feedback.
-
Those last steps were incredibly helpful. I believe we now have it working (finally), and the Playgrounds are behaving normally. I think the above mentioned issue with Docker Desktop processes may be part of the issue as everything as working correctly from the command line. We are working on setting this up on two employee workstations and we will see how it goes. Will report back. Again, thank you for your patience and guidance. |
Beta Was this translation helpful? Give feedback.
-
Hello
We are evaluating platforms to migrate our 6 year old project to now that MongoDB has depreciated Realm and Atlas Sync.
During the evaluation we came across Back4App which is a strong contender for our cloud storage but - our app needs sync capability as well as local storage. The local storage would need to support ParseSwift objects, queries, create, read, update and delete.
There was a prior post / attempt at moving local storage forward but it seems to have been closed over a year ago and it appears it was aimed at the community version.
Is there something we are overlooking and if so, how does one work with local storage? We see this in the feature list
Local Storage |⚠️ (Primitive)
And some discussion but the current/future status is unclear.
Is ParseSwift purely on online only approach?
Jay
Beta Was this translation helpful? Give feedback.
All reactions