File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,9 @@ - (void) sendRequest:(__weak NSDictionary * _Nullable )options
162162
163163 // network status indicator
164164 if ([[options objectForKey: CONFIG_INDICATOR] boolValue ]) {
165- [[UIApplication sharedApplication ] setNetworkActivityIndicatorVisible: YES ];
165+ dispatch_async (dispatch_get_main_queue (), ^{
166+ [[UIApplication sharedApplication ] setNetworkActivityIndicatorVisible: YES ];
167+ });
166168 }
167169}
168170
@@ -367,7 +369,9 @@ - (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCom
367369 NSString * respStr;
368370 NSString * rnfbRespType;
369371
370- [[UIApplication sharedApplication ] setNetworkActivityIndicatorVisible: NO ];
372+ dispatch_async (dispatch_get_main_queue (), ^{
373+ [[UIApplication sharedApplication ] setNetworkActivityIndicatorVisible: NO ];
374+ });
371375
372376 if (error) {
373377 errMsg = [error localizedDescription ];
You can’t perform that action at this time.
0 commit comments