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

Improve Account, SignIn, SignOut & ISStoreAccount extension & associated code: #563

Merged
merged 9 commits into from
Oct 14, 2024

Conversation

rgoldberg
Copy link
Contributor

Improve Account, SignIn, SignOut & ISStoreAccount extension & associated code:

  • Migrate ISStoreAccount from Grand Central Dispatch to PromiseKit & improve PromiseKit usage
  • Prevent ISAccountService.signIn(with:) deprecation warning
  • Improve macOS version handling & other encapsulation
  • Improve "Already Signed In" error output
  • Output error on blank password
  • Remove unnecessary output
  • Simplify & clean code

Resolve #562

… associated code.

Prevent `ISAccountService.signIn(with:)` deprecation warning.

Improve macOS version handling encapsulation.

Output error if `StoreAccount.signin(…)` provides a `nil` `ISStoreAccount`.

Improve `signin` `"Already Signed In" error output.

Remove unnecessary output.

Simplify code.

Partial mas-cli#562

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
…`StoreAccount`.

Add `var dsID` to `StoreAccount` so functions can use `StoreAccount` without casting to `ISStoreAccount`.

Simplify code.

Partial mas-cli#562

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Move towards better purchase encapsulation: all purchase logic will eventually be in the `perform(…)` function, not in convenience constructor, to ensure the correct values are used when `perform(…)` is called, instead of values that were correct sometime before the call.

Partial mas-cli#562

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Output error for non-`nil` `ISStoreAccount.primaryAccount` only if `ISStoreAccount.primaryAccount.isSignedIn` is `true`.

Output error when no password provided to password prompt for `mas signin`.

Remove unnecessary blank lines in `MASError.swift`.

Partial mas-cli#562

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Partial mas-cli#562

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Partial mas-cli#562

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
…init`.

Partial mas-cli#562

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
…Purchase.perform(adamId:purchase:)` to encapsulate `CKPurchaseController` & its callback.

Chain `Promise`s instead of calling `Promise.wait()`.

Improve comments.

Resolve mas-cli#562

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
@rgoldberg rgoldberg added 🧽 chore Administrative task: documentation, build, test, release, git, etc. 🖨 output 🧹 cleanup Optimization of (not bug fix for) an existing feature labels Oct 11, 2024
@rgoldberg rgoldberg added this to the 1.8.7 milestone Oct 11, 2024
@rgoldberg rgoldberg merged commit 611d4a7 into mas-cli:main Oct 14, 2024
3 checks passed
@rgoldberg rgoldberg deleted the 562-apple-id branch October 14, 2024 02:40
@rgoldberg rgoldberg self-assigned this Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧽 chore Administrative task: documentation, build, test, release, git, etc. 🧹 cleanup Optimization of (not bug fix for) an existing feature 🖨 output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Account, SignIn, SignOut & ISStoreAccount extension & associated code.
1 participant