-
-
Notifications
You must be signed in to change notification settings - Fork 70
iOS 14 User logout does not erase session #44
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
Comments
By database do you mean still exists on the Parse server? |
Yup. When I login again, the session objectId is changed. I am not familiar enough with parse-server and Parse-Swift, so I am not sure if this is a failure in parse-server promise/callback or Parse-Swift not issuing API call. |
Thanks for filing the issue! I think this is a bug in the SDK. I believe I know where the problem is. |
Got it! Thanks @cbaker6. Your PRs are always on point. Love the rotating keys in parse-server. |
appreciate you 🙏🏾 |
@cbaker6 Thanks for the quick fix. Would have taken me a long time to figure out the updated API endpoint. Cheers! |
No problem @pmmlo thanks for reporting! How do you like using the framework so far (pros/cons)? Also, are you coming from the objective-c iOS SDK? If so, any challenges, things you like better/worse? Of course, let us know if you find any other issues and if you find something you want to tackle, open a PR and we can help. |
I actually haven't used Parse+Objective-C SDK since the pre-acquisition days and the initial transition to an open source project. I believe there wasn't an open source SDK at that time, so I wrote my own wrapper around the web API. So, I can't speak much to the comparison, but skimming through both SDKs, they look like a nearly direct port. Overall, I think Parse+Open Source is excellent. I mostly use SwiftUI with the changing times, unless I need lower-level. These are just initial thoughts from my short use.
Cons:
|
The public parts of the framework are made to look a little similar to the objective-c one, but they are only minor pieces that have been ported (Keychain and FileManager come to mind). Hopefully the similarity of the public parts makes it easier to use. Under the hood, Parse-Swift is a lot different from it’s counterpart. |
Opening this back up. The linked PR fixing the bug will close it once it’s merged |
@cbaker6 I had a little time to dig into Parse-Swift's query syntax. I think the QueryConstraint encoder methods are powerful, more explicit, manageable and extensible. On initial thought, I think QueryConstraint methods are overall better than passing arguments. It's been a number of years, but I recall constraints being passed as arguments. This really made it difficult to extend complex compound queries and arguably, readability suffered. This choice of making QueryConstraint methods wrap encoders is definitely more explicit and seems to be very extensible as new cases arise. I think one of the downsides of this new conceptual choice is a loss of parity with the other Parse SDKs, so the associated challenges have to be balanced. I did have one question: do you think we should potentially create a public init for the QueryConstraint struct, so end users can wrap their own methods around the encoder rather than having to wrap the methods? Then we could call something like this:
Just a thought to give developers another syntax option, and allow them to write their own methods that directly wrap the encoder, as needed (rather than contributors writing all permutations). I may end up thinking this is a dumb idea later but wanted to share while I'm working with Parse Swift. Not sure if you wrote it, but very well-written IMO. |
Thanks looking and taking advantage of the framework! Flo started the project and left a strong foundation. My goal has been to stick with (as much as possible) his suggestions in this comment #3 (comment) Some relevant points he made are:
Of course, this relieves this SDK of the restrictions of the other SDKs, but introduces a learning curve for experienced parse devs. As you’ve mentioned, Parse-Swift/ParseSwift.playground/Pages/7 - GeoPoint.xcplaygroundpage/Contents.swift Lines 59 to 76 in 3f1c897
Or like this: Parse-Swift/ParseSwift.playground/Pages/7 - GeoPoint.xcplaygroundpage/Contents.swift Lines 118 to 133 in 3f1c897
To your question:
I’m not sure, but maybe I don’t understand the usecases for it. How do you envision this making it easier? |
Thanks for the examples! I was looking at the source to figure out how queries work.
The reason why I asked was because I couldn't figure out how to query by Pointers. It seems like in the other SDK you can simply do an equals query, something like this:
If QueryConstraints were public, we could do something like this:
|
What happens when you try your first example? Does it not compile or is it the results from the query wrong? |
Compiles. Succeeds without issue, but cannot find the object. Always |
What about the with latest on the |
If that doesn’t work, can you submit a PR and add an example test case to https://github.com/parse-community/Parse-Swift/blob/main/Tests/ParseSwiftTests/ParseQueryTests.swift |
Sorry called away for a moment. No luck, but the update looks really good. Thanks for contributing. I'll try to dig into my issue later and see if I can contribute a fix. Cheers! |
Ok, so it turns out I needed to query the pointer by the objectId. Makes sense. Example just in case someone stumbles onto this issue.
|
Hi All - Wanted to check if I am having an implementation issue. I have tried calling logout both synchronously and asynchronously. No trouble removing the keychain object, but the session object in database persists.
Anybody having this issue in iOS 14?
The text was updated successfully, but these errors were encountered: