Book Image

Delphi Cookbook

By : Daniele Teti
Book Image

Delphi Cookbook

By: Daniele Teti

Overview of this book

Table of Contents (14 chapters)
Delphi Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using iOS Objective-C SDK classes


Just like we saw about Android in the previous recipe, Delphi can access the iOS SDK as well. In this section, we'll talk about the mechanisms that the compiler offers to import classes from the iOS SDK. This is not a standard recipe, but is more of a showcase of the possibilities offered by the Delphi compiler, and the process needed to fully use them when dealing with the OS built-in libraries. The mechanism is similar to the Android ones, but there are some notable differences.

Getting ready

In Objective-C, all the classes have NSObject as a common ancestor. The iOS SDK is composed of some frameworks. The iOS framework comprises of a number of classes specialized for a single purpose. For example, UIKit is the framework containing all the basic classes related to the UI; the iAd framework contains all the stuff related to advertising, and MapKit wraps up all the mapping-related classes.

Note that Objective-C uses the NSString objects while Delphi uses strings...