Menu

#317 DPFMapView broken after Delphi/XCode Update

fixed
nobody
None
Bug
2014-12-19
2014-11-21
Paul
No

I just installed Delphi XE7 Update 1. At the same time I updated XCode to 6.1/8.1 SDK.

Now, when I run the map demo application on a device or the iOS simulator I get the following error:

Project iOSMapView raised exception class SIGABRT (6).

The error originates in DPF.iOS.MKMapView at line 718 (Loaded):

FMKMapView.setFrame( CGRectMake( Position.X, Position.Y, Width, Height ) );

The actual exception is thrown in the imported setFrame function. As far as I can tell, setFrame works fine for all the other DFP components.

Anybody got a fix?

Cheers,
Paul

Discussion

  • Paul

    Paul - 2014-11-21

    I stumbled across a possible fix. In the TDPFMapView constructor change:

    FMKMapView := TMKMapView.Wrap( FDPFMKMapView.Super.init );

    to

    FMKMapView := TMKMapView.Wrap( TMKMapView.alloc.initWithFrame( CGRectMake( 0, 0, 100, 100 ) ) );

    After this everything seems to work as expected.

    Babak: The working line is commented out in the latest revision. Any reason why you changed it? Is it safe to go with the older code?

     
  • Sebastian Zierer

    Babak changed it so that TDPFMKMapView will be created instead of TMKMapView.

    But TMKMapView.Wrap( FDPFMKMapView.Super.init ) does not look right. It should be FMKMapView := TMKMapView.Wrap((FDPFMKMapView as ILocalObject).GetObjectID); Please take a look at my changes in SVN and let me know if that fixes it.

     
  • Paul

    Paul - 2014-11-22

    Thanks Sebastian, I'll try it out on Monday.

     
  • Paul

    Paul - 2014-11-26

    Hi Sebastian,

    Unfortunately, your update re-introduces the error.

    Let me know if you need any more info.

    /Paul

     
  • Sebastian Zierer

    Please give me more info. The "MapView User Location" demo works fine for me. Can you provide a demo project?

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-12-19
    • status: open --> fixed
     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-12-19

    Hi Paul
    Thank you for your feedback.

    Solved.

    Regards

     

Log in to post a comment.

MongoDB Logo MongoDB