Hello, I'm getting error message 'NSRangeException Reason: *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array' when I'm running Task for Offline Routing. It is fail on initializing AGSRouteTask in this section below, in the last row: SError* error = nil; NSString* docDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString* fullPath = [docDir stringByAppendingPathComponent:@"NetworkData.bundle/RuntimeSanFrancisco.geodatabase"]; _routeTask = [AGSRouteTask routeTaskWithDatabasePath:fullPath network:@"Streets_ND" error:&error];
*All required files are copied in to Document folder and before I'm initializing task I validate existence of *.geodatabase and Streets_ND. *Installed SDK Runtime version 10.2.3. *Same class has Online Routing and it is working just fine, only when I'm switching to use Offline Routing with the code above it is fail.
The issue resolved, the ArcGIS.bundle in the Xamarin project didn't updated properly. By removing it and adding it back the issue resolved. Thank you all for support!
Could you please add routing dataset to the project as described in the doc and see if it works?
Note: When adding these files to your project, make sure you choose the Create folder references for any added folders option. This will ensure that the folder hierarchy of the *.tn folder is properly maintained.
I've followed the second approach "Using network dataset copied through iTunes file sharing" and still getting same error. Info.plist contains <key>UIFileSharingEnabled</key><true/>
One more comment. If I'm implementing this with the first approach "Using network dataset included within the application", then there is no error thrown, and it is never return success or failure result.
The issue resolved, the ArcGIS.bundle in the Xamarin project didn't updated properly. By removing it and adding it back the issue resolved. Thank you all for support!