Is it possible to have iOS4 specific code (ie the MKMapView overlays) in an application, build using 4.0, set the Deployment Target to 3.0, and still have it work so long as the iOS4 code isn't called on a 3.x device?
I am trying to do that now, and only calling the iOS4 code if the device supports it, but I can't get it installed. GDB is freaking out. Here's what I get when I build for an iOS3 device:
dyld: Symbol not found: _OBJC_CLASS_$_MKOverlayView
Referenced from: /var/mobile/Applications/1EE8EC13-FA01-43CB-A617-9B5D268ECD13/maps.app/maps
Expected in: /System/Library/Frameworks/MapKit.framework/MapKit
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Not safe to call dlopen at this time.)
mi_cmd_stack_list_frames: Not enough frames in stack.
mi_cmd_stack_list_frames: Not enough frames in stack.
I want this application to run on 3.0 and up, and use the new MKMapView overlay on 4.0 devices.
Specifically, I am implementing the tiled image overlay code demonstrated at WWDC, which uses a custom TileOverlay
that implements the MKOverlay
protocol, and a custom TileOverlayView
which is a subclass of MKOverlayView
.