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

Missing methods in Parse .NET SDK 4.0 #397

Open
patkozlowski opened this issue Dec 19, 2024 · 9 comments · May be fixed by #404
Open

Missing methods in Parse .NET SDK 4.0 #397

patkozlowski opened this issue Dec 19, 2024 · 9 comments · May be fixed by #404
Labels

Comments

@patkozlowski
Copy link

Issue when upgrading to Parse SDK 4.0

After upgrading to Parse SDK 4.0, I've run into a few issues due to changes in the API. Here’s what I’ve encountered:

  1. user.Username is no longer accessible

    • In previous versions, I was able to access the Username field directly with user.Username, but in version 4.0, that field seems to be missing. The following code no longer works:
      var user = ParseClient.Instance.GetCurrentUser();
      if (user.Username == "Test123")
      {
          // logic
      }
  2. user.GetRelation<ParseObject>("SomeClass") is no longer available

    • The method GetRelation<ParseObject>("SomeClass") no longer works. I'm unsure how to handle relations in version 4.0 since it seems like this method was changed or removed. Here’s the code that no longer functions:
      var someClassRelation = user.GetRelation<ParseObject>("SomeClass");
  3. await user.SaveAsync() is no longer working

    • The method SaveAsync() is no longer available on ParseUser objects directly. The following code no longer works:
      await user.SaveAsync();

Environment

  • Parse SDK Version: 4.0
  • Platform: .NET 9.0 MAUI, iOS/Android (or specify your platform)

Any guidance or clarification on these issues would be greatly appreciated! Thanks in advance. Maybe @YBTopaz8 can help? Thanks!

Copy link

Thanks for opening this issue!

@YBTopaz8
Copy link
Member

Hi @patkozlowski
Thank for pointing those out.
Might've missed missed/changed them.
Also, the documentations aren't updated yet, but will be in a few.
Expect a fix today.

@mtrezza
Copy link
Member

mtrezza commented Dec 20, 2024

@YBTopaz8 could you please also add the tests for these fixes? It seems these issues were not caught by the CI because of the low test coverage. Thanks to @patkozlowski for reporting, that helps us to improve the coverage.

@mtrezza mtrezza changed the title Issue when upgrading to Parse SDK 4.0 Missing methods in Parse .NET SDK 4.0 Dec 20, 2024
@YBTopaz8
Copy link
Member

Absolutely.

I've fixed all issues pointed out (in fact, 2 of 3 were fixed by a PR I was about to do today.)

I fixed the 3 one (an oversight led to an overflow.)

@YBTopaz8
Copy link
Member

Just updating to info that I have fixed tests too so they work.
PR incoming
image

@YBTopaz8
Copy link
Member

YBTopaz8 commented Dec 21, 2024

Just submitted #402 that clears your issues and any other potential one.
Added actually over 100 tests that should significantly improve coverage.
Starting to get a hang of it.
Good stuff 👍🏾.

@patkozlowski truly appreciate your feedback
image

YBTopaz8 added a commit that referenced this issue Dec 21, 2024
Did some general enhancements on the code structure it's more consistent (Working on `object` types are cool but a pain to debug since you never know the real type until you hit an exception.)

I tried to make it so the code is more readable as well.

Closes
#397
@YBTopaz8 YBTopaz8 linked a pull request Dec 21, 2024 that will close this issue
@patkozlowski
Copy link
Author

Thanks for the quick turn around @YBTopaz8, great work!

@YBTopaz8
Copy link
Member

Thanks @patkozlowski

When it will be released, you will be able to use Relations and Pointers as intended.

This file has a full implementation of the core Parse Functionalities (login, save file, CRUD parse objects and Relations, call cloud code function, and much more!)

Plus, It shows how Parse Live Queries are implemented in .NET by myself as well, using RX.NET so when it will be available in official parse for .NET, we will all enjoy it.

I'll be using that repo as the Sample Repo when redoing the documentation anyway. Hopefully before New Year but time will tell.

Best.

@YBTopaz8
Copy link
Member

YBTopaz8 commented Jan 9, 2025

Quickly Pinging to say please expect some updates this week (Got caught up here and there)

I aim to bring some more improvements I've been working on personally

Sorry for the delay!

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