Skip to content

Conversation

@dplewis
Copy link
Member

@dplewis dplewis commented Jan 11, 2025

New Pull Request Checklist

Issue Description

There is no way easy way to convert a dictionary to a PFObject. This is useful if you return a json server side and want to decode it client side. Analogous to Parse.Object.fromJSON in the JS SDK

Approach

Add a wrapper around the private method _objectFromDictionary

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 11, 2025

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Closes: #123 in the PR description, so I can recognize it.

@dplewis
Copy link
Member Author

dplewis commented Jan 11, 2025

@mtrezza Looks like the CI is broken 8 Watch Series 8 got removed from Xcode 15/16

@mtrezza
Copy link
Member

mtrezza commented Jan 11, 2025

What do you suggest regarding the CI?

@dplewis
Copy link
Member Author

dplewis commented Jan 11, 2025

Finding a common Watch Series against all toolchains. I’ll try watch 7 or 9, if they don’t work we might have to remove Xcode 14 support

@mtrezza
Copy link
Member

mtrezza commented Jan 12, 2025

Wouldn't it be enough to only support the latest Xcode version? I believe the latest Xcode version is usually required to run a simulator with the latest iOS version. So developers are very likely to adopt new Xcode releases quickly.

@codecov
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.66%. Comparing base (dd05d41) to head (b14d63d).
Report is 43 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1834       +/-   ##
===========================================
+ Coverage   64.24%   82.66%   +18.42%     
===========================================
  Files         201      282       +81     
  Lines       23233    30734     +7501     
===========================================
+ Hits        14926    25407    +10481     
+ Misses       8307     5327     -2980     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dplewis
Copy link
Member Author

dplewis commented Jan 13, 2025

@mtrezza I'll create a separate PR to remove Xcode 14 support

@mtrezza mtrezza mentioned this pull request Jan 13, 2025
5 tasks
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the method name could be shortened to PFObject.fromDictionary, since it's clear that as a constructor method of PFObject it instantiates an object. Analogous to Parse JS SDK's Parse.Object.fromJSON.

@dplewis dplewis changed the title feat: Add support for PFObject.objectFromDictionary feat: Add support for PFObject.fromDictionary Jan 28, 2025
@mtrezza mtrezza changed the title feat: Add support for PFObject.fromDictionary feat: Add PFObject.fromDictionary to create an object from dictionary Jan 28, 2025
@mtrezza mtrezza merged commit e197cfa into parse-community:master Jan 28, 2025
19 checks passed
parseplatformorg pushed a commit that referenced this pull request Jan 28, 2025
# [5.1.0](5.0.0...5.1.0) (2025-01-28)

### Features

* Add `PFObject.fromDictionary` to create an object from dictionary ([#1834](#1834)) ([e197cfa](e197cfa))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.1.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Jan 28, 2025
@dplewis dplewis deleted the objectFromDictionary branch January 28, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released Released as stable version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants