-
Notifications
You must be signed in to change notification settings - Fork 120
Adds fancy alert warning if site's WC is lower than v3.5 #473
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
Conversation
SwiftLint found issuesWarnings
Generated by 🚫 Danger |
jleandroperez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One cosmetic comment, other than that, works like a charm!!!
![]()
|
|
||
| // MARK: - Fancy Alerts | ||
| // | ||
| extension AppDelegate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Already discussed over Slack!!) Maybe move this guy over to RequirementsChecker or so?
(Feel seriously free to disregard, this is a cosmetic suggestion!!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jleandroperez ... I ended up adding RequirementsChecker :-)
This PR adds the following a fancy alert warning if the users current site is below WC v3.5 (below REST API v3). The version check and subsequent alert (if needed) is fired every time the app enters the foreground.
Breakdown of items here:
FancyAlertViewController+Upgrade.swift)displayWooUpgradeAlertIfNeeded) and FancyAlert appearanceUIViewControllerTransitioningDelegateconformance inMainTabBarControllerSiteAPImodel,SiteAPIRemote,SiteAPIMapper, newSettingStoreaction)Note: The
retrieveSiteAPIaction bypasses the Storage framework to keep things simple.Note2: This PR is an analogue to the following WCAndroid PRs:
Fixes: #398
Testing
Make sure code is square and unit tests are ✅ .
Scenario 1: Log into a WC site v3.5 or newer
Scenario 2: Log into a WC site v3.5 or older
@jleandroperez and @mindgraffiti I know this PR looks gigantic, but it's really just the testing JSON....honest! 😃
/cc @kyleaparker @aforcier @astralbodies