Configuring IOS

To use this library on iOS, there are some frameworks, which Delphi should be aware of, but by default isn’t, so you need to perform the following changes in the IDE (you need to do this just once, it will apply to all projects):

  1. Go to Tools -> Options -> SDK Manager à iOS Device, for each iPhoneOS device:
  2. Click on any framework (just a click: there is a bug in IDE).
  3. Click “Add a new path item” image button (top one)
    1. Set “Path on remote machine” to “/System/Library/Frameworks” or “$(SDKROOT)/System/Library/Frameworks” (same as other frameworks).
    2. Set “Framework name” to “SystemConfiguration”.
    3. Click Ok (nothing should be selected in the radio and leave the checkbox unchecked).
  4. Repeat step 3 with Framework name “AdSupport”, “StoreKit”, “Social”, “CoreData”, “CoreTelephony”, “CoreMedia”, “SystemConfiguration”, “Security”, “EventKit”, “EventKitUI”, “AVFoundation”, “iAd”, “AudioToolbox”, “CoreBluetooth”, “SafariServices”, “CoreMotion”, “MediaPlayer”, “MobileCoreServices”, “CoreVideo”, “MessageUI”, “Metal”, “IOSurface”, “ImageIO”, “CoreAudio”, “MediaToolbox”, “CoreMIDI”, “JavaScriptCore”, “ModelIO” (no need to duplicate already existing items: Delphi XE5, for example, already includes StoreKit and iAd).
  5. Click “Update Local File Cache” button.

In each project, which is using this library, you need to perform the following changes:

  1. Go to Project -> Options -> Delphi Compiler à Linking.
  2. Choose Target “All Configurations – iOS Device platform”.
  3. Enter the following value in “Options passed to the LD linked” (this should be written as a single line):
      -lz -framework SystemConfiguration -weak_framework Social
      -weak_framework iAd -framework StoreKit -framework MessageUI
      -framework AudioToolbox -weak_framework AdSupport
      -framework Security -framework CoreData -framework EventKit
      -framework AVFoundation -framework CoreTelephony
      -framework EventKitUI -framework CoreMedia
      -framework CoreBluetooth -weak_framework SafariServices
      -weak_framework CoreMotion -framework MediaPlayer
      -framework CoreVideo -weak_framework MobileCoreServices
      -weak_framework FileProvider -weak_framework WebKit
      -weak_framework CFNetwork -weak_framework Metal
      -weak_framework IOSurface -weak_framework ImageIO
      -weak_framework CoreAudio -weak_framework MediaToolbox
      -weak_framework CoreMIDI -weak_framework JavaScriptCore
      -weak_framework ModelIO

For complete compatibility, you should use iOS SDK version 11.2 (download XCode 9.2 from Apple site and install it). After updating your Delphi local libraries, you can restore the latest XCode version (and use the newest compiler, as long as the local libraries come from 11.2.

In addition to this the Receive Push Notifications should be selected within Project Option’s entitlements list, if you want to use push notifications.