File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3131
3232
3333
34+ // MARK: - AppDelegate Methods
35+
3436 func application( _ application: UIApplication , willFinishLaunchingWithOptions launchOptions: [ UIApplicationLaunchOptionsKey : Any ] ? = nil ) -> Bool {
3537
3638 // Setup the Interface!
@@ -44,6 +46,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4446 // Display the Authentication UI
4547 displayAuthenticatorIfNeeded ( )
4648
49+ // Yosemite Initialization
50+ synchronizeEntitiesIfPossible ( )
51+
4752 return true
4853 }
4954
@@ -181,4 +186,14 @@ extension AppDelegate {
181186
182187 authenticationManager. displayAuthentication ( from: rootViewController)
183188 }
189+
190+ /// Whenever we're in an Authenticated state, let's Sync all of the WC-Y entities.
191+ ///
192+ func synchronizeEntitiesIfPossible( ) {
193+ guard StoresManager . shared. isAuthenticated == false else {
194+ return
195+ }
196+
197+ StoresManager . shared. synchronizeEntities ( )
198+ }
184199}
You can’t perform that action at this time.
0 commit comments