Closed pinarol closed 1 month ago
App Name | Gravatar SwiftUI Prototype Build | |
Build Number | 1492 | |
Version | 1.0 | |
Bundle ID | com.automattic.gravatar-sdk-demo-swiftui.prototype-build | |
Commit | 87ea511d88a07c216711fc36b2bdc9fe0503c612 | |
App Center Build | Gravatar SDK Demo - SwiftUI #267 |
App Name | Gravatar UIKit Prototype Build | |
Build Number | 1492 | |
Version | 1.0 | |
Bundle ID | com.automattic.gravatar-sdk-demo-uikit.prototype-build | |
Commit | 87ea511d88a07c216711fc36b2bdc9fe0503c612 | |
App Center Build | Gravatar SDK Demo - UIKit #267 |
Closes #
Description
This fixes a bug i detected during the Jetpack integration. Because of the way we initialize the
@State
variable, the token was not being set successfully. This article does a good job explaining why: https://www.swiftcraft.io/articles/how-to-initialize-state-inside-the-views-init-So I am separating the local
@State
token from the one passed from outside. Also removing the@State
from thescope
variable as well, it doesn't need to be a@State
. This is not directly related with the bug, but it's the same wrong usage as well thus needs fixing.I also rearranged the lines a bit.
Testing Steps
Go to UIKit Demo app > QE Enter
email
Entertoken
<-- importantTap Logout if the button is present
Open the QE, verify it does NOT go through OAuth and goes directly to QE.