88
99#import " GPKGGeoPackageExample.h"
1010#import " GPKGTestUtils.h"
11-
1211#import " GPKGRelatedTablesUtils.h"
13-
12+ # import " GPKGBundleHelper.h "
1413
1514@import Projections;
1615@import GeoPackage;
@@ -700,7 +699,7 @@ +(void) createTilesWithGeoPackage: (GPKGGeoPackage *) geoPackage andName: (NSStr
700699
701700 GPKGTileMatrixDao *tileMatrixDao = [geoPackage tileMatrixDao ];
702701
703- NSString *resourcePath = [[ NSBundle bundleForClass: [GPKGGeoPackageExample class ]] resourcePath ];
702+ NSString *resourcePath = [GPKGBundleHelper resourcePath ];
704703
705704 GPKGTileGrid *tileGrid = totalTileGrid;
706705
@@ -1428,7 +1427,7 @@ +(void) insertRelatedTablesMediaExtensionRowsWithGeoPackage: (GPKGGeoPackage *)
14281427 GPKGUserMappingDao *userMappingDao = [relatedTables mappingDaoForRelation: relation];
14291428
14301429 GPKGMediaRow *mediaRow = [mediaDao newRow ];
1431- NSString *mediaPath = [[[ NSBundle bundleForClass: [GPKGGeoPackageExample class ]] resourcePath ] stringByAppendingPathComponent : file];
1430+ NSString *mediaPath = [GPKGBundleHelper pathForResource : file];
14321431 NSData *mediaData = [[NSFileManager defaultManager ] contentsAtPath: mediaPath];
14331432 [mediaRow setData: mediaData];
14341433 [mediaRow setContentType: contentType];
@@ -1738,7 +1737,7 @@ +(void) createFeatureStyleExtensionWithGeoPackage: (GPKGGeoPackage *) geoPackage
17381737
17391738 NSMutableArray <GPKGIconRow *> *icons = [NSMutableArray array ];
17401739
1741- NSString *buildingPath = [[[ NSBundle bundleForClass: [GPKGGeoPackageExample class ]] resourcePath ] stringByAppendingPathComponent :@" building.png" ];
1740+ NSString *buildingPath = [GPKGBundleHelper pathForResource :@" building.png" ];
17421741 GPKGIconRow *icon1 = [[GPKGIconRow alloc ] init ];
17431742 [icon1 setName: @" Building" ];
17441743 [icon1 setDescription: @" Building Icon" ];
@@ -1749,7 +1748,7 @@ +(void) createFeatureStyleExtensionWithGeoPackage: (GPKGGeoPackage *) geoPackage
17491748 [icon1 setAnchorVValue: 1.0 ];
17501749 [icons addObject: icon1];
17511750
1752- NSString *collegePath = [[[ NSBundle bundleForClass: [GPKGGeoPackageExample class ]] resourcePath ] stringByAppendingPathComponent :@" college.png" ];
1751+ NSString *collegePath = [GPKGBundleHelper pathForResource :@" college.png" ];
17531752 GPKGIconRow *icon2 = [[GPKGIconRow alloc ] init ];
17541753 [icon2 setName: @" College" ];
17551754 [icon2 setDescription: @" College Icon" ];
@@ -1759,7 +1758,7 @@ +(void) createFeatureStyleExtensionWithGeoPackage: (GPKGGeoPackage *) geoPackage
17591758 [icon2 setHeightValue: 44.0 ];
17601759 [icons addObject: icon2];
17611760
1762- NSString *tractorPath = [[[ NSBundle bundleForClass: [GPKGGeoPackageExample class ]] resourcePath ] stringByAppendingPathComponent :@" tractor.png" ];
1761+ NSString *tractorPath = [GPKGBundleHelper pathForResource :@" tractor.png" ];
17631762 GPKGIconRow *icon3 = [[GPKGIconRow alloc ] init ];
17641763 [icon3 setName: @" Tractor" ];
17651764 [icon3 setDescription: @" Tractor Icon" ];
0 commit comments