Skip to content

Commit a2f362f

Browse files
committed
version 0.4.0
1 parent ddc081c commit a2f362f

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

Package.resolved

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/iOSSignIn/SignInManager.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,15 @@ public class SignInManager : NSObject, ObservableObject {
209209
return false
210210
}
211211

212+
public func application(changes state: AppState) {
213+
if state == .foreground {
214+
refreshCredentials()
215+
}
216+
}
217+
212218
// Starts an auto-refresh mechanism, to refresh credentials periodically while the app is in the foreground.
213219
// Solution to this problem: https://github.com/SyncServerII/iOSBasics/issues/3
214-
func startPeriodicCredentialsRefresh() {
220+
private func startPeriodicCredentialsRefresh() {
215221
if let _ = refreshTimer {
216222
return
217223
}

VERSIONS.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
iOSSignIn
22

3+
Version 0.4.0 (4/3/21)
4+
* Added application change state method. So that credentials can be refreshed when (a) app comes into foreground, and (b) when app starts.
5+
36
Version 0.3.2 (3/19/21)
47
* Removed unuseful error logging.
58

0 commit comments

Comments
 (0)