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

feat: add become installation method & fix loginUsingObjCKeychain #407

Merged
merged 13 commits into from Sep 12, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Sep 11, 2022

New Pull Request Checklist

Issue Description

#391 added some migration methods but they currently have some issues:

  • There's no method that easily allows the current ParseInstallation to become another ParseInstallation. Adding a method like this allows developers to use their own ways to get a particular objectId and use it to migrate to the Swift SDK.
  • ParseUser.loginUsingObjCKeychain does not properly get the session token from an Objective-C Keychain.

Related issue: #n/a

Approach

  • Add the become method which allows the current installation to become any installation based on the objectId.
  • Search the Objective-C Keychain for currentUser->sessionToken to get the sessionToken properly.

TODOs before merging

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

@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 11, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Sep 11, 2022

Codecov Report

Merging #407 (2dc94c7) into main (a5dbff4) will decrease coverage by 0.01%.
The diff coverage is 92.38%.

@@            Coverage Diff             @@
##             main     #407      +/-   ##
==========================================
- Coverage   89.94%   89.92%   -0.02%     
==========================================
  Files         158      158              
  Lines       15175    15266      +91     
==========================================
+ Hits        13649    13728      +79     
- Misses       1526     1538      +12     
Impacted Files Coverage Δ
Sources/ParseSwift/Objects/ParseInstallation.swift 85.72% <88.88%> (+0.07%) ⬆️
Sources/ParseSwift/Storage/KeychainStore.swift 96.58% <92.59%> (-1.29%) ⬇️
...s/ParseSwift/Objects/ParseInstallation+async.swift 100.00% <100.00%> (ø)
...ParseSwift/Objects/ParseInstallation+combine.swift 94.28% <100.00%> (+0.47%) ⬆️
Sources/ParseSwift/Objects/ParseUser.swift 87.09% <100.00%> (-0.18%) ⬇️
Sources/ParseSwift/Parse.swift 99.01% <100.00%> (ø)
Sources/ParseSwift/Coding/ParseEncoder.swift 77.57% <0.00%> (-0.47%) ⬇️
Sources/ParseSwift/Objects/ParseObject.swift 89.45% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cbaker6 cbaker6 changed the title fix: login with ObjC keychain feat: add a copy installation method and fix loginUsingObjCKeychain Sep 11, 2022
@cbaker6 cbaker6 merged commit 62553bc into parse-community:main Sep 12, 2022
@cbaker6 cbaker6 deleted the fixObjC branch September 12, 2022 04:35
@cbaker6 cbaker6 changed the title feat: add a copy installation method and fix loginUsingObjCKeychain feat: add become installation method & fix loginUsingObjCKeychain Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant