hungio / route-me

Automatically exported from code.google.com/p/route-me
0 stars 0 forks source link

framework requires application to copy images into main bundle #79

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In present implementation, both the background image displayed during tile 
loading and the 
default marker images are loaded from [NSBundle mainBundle], rather than from 
Route-me's 
bundle. This requires app developers to copy these images into their project.

Original issue reported on code.google.com by halmuel...@gmail.com on 10 Mar 2009 at 10:15

GoogleCodeExporter commented 8 years ago
Fixed in r280

Original comment by Quazie on 10 Mar 2009 at 11:18

GoogleCodeExporter commented 8 years ago
Eeep, not fixed.  Seems like the way we have the library, it isn't its own 
bundle, or
something weird like that.  I thought I had this fixed, but my fixes didn't fix.

Original comment by Quazie on 11 Mar 2009 at 1:16

GoogleCodeExporter commented 8 years ago
I just ran some trials and I don't think this can be fixed the way we want it 
to within the limitations of the 
Apple SDK.

The nice way, which is what Quazie implemented in r280, would be for the 
MapView framework's methods to 
search within the framework and find these images. We would use a 
pathForResource:ofType:inDirectory:
 instead of pathForResource:ofType:. This doesn't seem to work on Cocoa Touch though. The following code 
shows nothing usable:

    NSLog(@"Frameworks");
    NSArray *frameworks = [NSBundle allFrameworks];
    for ( id oneFramework in frameworks ) {
        NSLog ( @"%@", oneFramework );
    }
    NSLog(@"Bundles");
    NSArray *bundles = [NSBundle allBundles];
    for ( id oneBundle in bundles ) {
        NSLog ( @"%@", oneBundle );
    }
    NSLog(@" [NSBundle bundleForClass:[mapContents class]] %@", [NSBundle bundleForClass:[mapContents 
class]]);

It's not good design to have the framework advertising that it can do things 
with internal data, when that 
behavior is actually contingent on the app programmer providing that data. I 
intend to deprecate all the 
methods that initialize markers or other graphics with "internal" images. 
Instead, we'll have methods to allow 
the app developer to control the marker images, background image, etc directly. 
This will happen after 
Version 0.5 is tagged.

Original comment by halmuel...@gmail.com on 11 Mar 2009 at 7:02

GoogleCodeExporter commented 8 years ago
Issue 80 has been merged into this issue.

Original comment by halmuel...@gmail.com on 11 Mar 2009 at 7:03

GoogleCodeExporter commented 8 years ago

Original comment by Quazie on 11 Mar 2009 at 2:44

GoogleCodeExporter commented 8 years ago
The big issue here is that a Static Library (which is what we have) does NOT 
include
resources at all.  Thus, I don't think we CAN ever get to the images in the 
MapView
project.

Original comment by Quazie on 13 Mar 2009 at 1:54

GoogleCodeExporter commented 8 years ago
Keyword-named marker images are now gone from API (r504).

Original comment by halmuel...@gmail.com on 26 Apr 2009 at 2:37