File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,14 @@ struct TweetNestApp: App {
68
68
case . active, . inactive:
69
69
Self . session. resumeBackgroundTaskTimers ( )
70
70
#if canImport(CoreSpotlight)
71
+ #if DEBUG
72
+ if !Self. isPreview {
73
+ Self . session. persistentContainer. usersSpotlightDelegate. startSpotlightIndexing ( )
74
+ }
75
+ #else
71
76
Self . session. persistentContainer. usersSpotlightDelegate. startSpotlightIndexing ( )
72
77
#endif
78
+ #endif
73
79
case . background:
74
80
Self . session. pauseBackgroundTaskTimers ( )
75
81
#if (canImport(BackgroundTasks) && !os(macOS)) || canImport(WatchKit)
@@ -78,8 +84,14 @@ struct TweetNestApp: App {
78
84
}
79
85
#endif
80
86
#if canImport(CoreSpotlight)
87
+ #if DEBUG
88
+ if !Self. isPreview {
89
+ Self . session. persistentContainer. usersSpotlightDelegate. stopSpotlightIndexing ( )
90
+ }
91
+ #else
81
92
Self . session. persistentContainer. usersSpotlightDelegate. stopSpotlightIndexing ( )
82
93
#endif
94
+ #endif
83
95
@unknown default :
84
96
break
85
97
}
You can’t perform that action at this time.
0 commit comments