Hi folks,
I'm tearing my hair out trying to load a feature service table in a background thread, as below. This works fine on the main iOS thread. But in a background thread no network activity occurs. I confirmed using Charles proxy server.
Hard to understand why, as it appears to block the main thread. My app locks up while these calls are occurring. Have I missed something?
Thanks,
Simon
dispatch_queue_t backgroundLoadThread = dispatch_queue_create("com.xxx.loadservicethread", NULL);
dispatch_async(backgroundLoadThread, ^(void) {
AGSGDBFeatureServiceTable* fst = [[AGSGDBFeatureServiceTable alloc]initWithServiceURL:url
credential:myCredentials
spatialReference:mapView.spatialReference];
...
Yeah, instruments is not the easiest to use. I gives you a lot of information but sometime you just don't know how to put all of that information together into something actionable.
AGSGDBFeatureServiceTable, apart from making network requests to the feature service, create a local geodatabase in which to temporarily store the features. I suspect some of that work to create and initialize a local GDB is happening on the main thread. We'll have to look into that.
Hi Divesh,
Just checking in to see if there was any progress on this one?
Cheers
Simon