Select to view content in your preferred language

Error: reading a geodatabase on a device

4248
10
Jump to solution
03-25-2014 02:30 AM
TorstenStruck
New Contributor
Hi,

I'm coding a small application (with SDK for iOS 10.2.2) for displaying an offline geodatabase that I have created with ArcGIS for Desktop 10.2.1. I have put the geodatabase into my application bundle and everything looks good on the xcode ipad simulator.
But on my "real" ipad I'm getting the following error message when creating the AGSGDBGeodatabase object:

Error Domain=com.esri.arcgis.runtime.error Code=6 "PRAGMA journal_mode = WAL;" UserInfo=0x170264bc0 {NSLocalizedDescription=PRAGMA journal_mode = WAL;}

Here's the code snippet for loading the geodatabase file (ltg.geodatabase):

   NSString *gdbPath = [[NSBundle mainBundle] pathForResource:@"ltg" ofType:@"geodatabase"];
   NSError* myerror;
   AGSGDBGeodatabase *gdb = [[AGSGDBGeodatabase alloc] initWithPath:gdbPath  error:&myerror];

Any ideas or solutions?

Thank you!
0 Kudos
10 Replies
SuganyaBaskaran1
Esri Contributor
Nathan,
           This seems to be work for simulator, for iPad its giving error Domain=com.esri.arcgis.runtime.error code=12 "automatic extension loading failed:"


Vikrant,
At present, the SDK does not support opening geodatabase from bundle in device for those geodatabases created from REST services. (Geodatabase created as "Runtime Content" from ArcMap should work fine) Hence the error. In this case, the geo database has to be in the documents directory.
I've outlined a work around in my previous reply where you can add the geodatabase through iTunes File Sharing. Does that work for you?



Suganya
0 Kudos