Crash loading TPK file

Discussion created by tjmorgan0 on Jun 14, 2012
Latest reply on Jun 16, 2012 by tjmorgan0
I'm loading a TPK file which crashes in the method [AGSZipFile initWithFileName:mode:]. The crash is 4 methods into the method called by my code [AGSLocalTiledLayer localTiledLayerWithPath:locallayerpath].

The TPK loads OK in a Flex app but not in the SDK. I've unzipped successfully so it doesn't appear to be a corruption problem. Here's the section of code that I'm using:

    // Local aerial photography
    NSString *locallayerpath = [[NSBundle mainBundle] pathForResource:@"ClarksvilleAerials2010" ofType:@"tpk"];
    AGSLocalTiledLayer* localtiledlayer = [AGSLocalTiledLayer localTiledLayerWithPath:locallayerpath];
    if (localtiledlayer != Nil)
        [self.mapView addMapLayer:localtiledlayer withName:@"Local Tiled Layer"];