Whilst updating this demo project, and compiling for the device (in my case iOS 8.0, as I have Xcode 6.0.1), I received an error as outlined in this post on the Embarcadero community website.

As per the response from Stefan D on October 4th, a solution has been posted, here. To save wading through that, I thought I’d post the changes required, here. These steps might also work for earlier versions of Delphi (e.g XE6 and XE5). The steps I carried out are:

  1. Copy Macapi.Dispatch.pas from the XE7 source/rtl/osx folder into another directory. In my case I have a folder called Patches/Mobile/XE7. I’m likely to add other files to this path later.
  2. Modify the code in the copied file thus:
    const
      // libdispatch = '/usr/lib/system/libdispatch.dylib';
      libdispatch = '/usr/lib/libSystem.dylib';
    
  3. Make sure the path to this file is in the Delphi Library options, by selecting Tools|Options, select Library under Environment Options/Delphi Options, and add the path to the Library Path.
  4. Remember to do a Build (instead of compile) when recompiling.

This has the demo project compiling for the device, however there is a warning regarding libReachability.a, so I suspect that may need addressing. I’ll know when I have a working  iOS 8.0 device to deploy to (my phone is currently not working).