Four Fundamental Ways To Interface With Objective-C In Delphi XE5 Firemonkey On OSX And IOS

Delphi XE6 Firemonkey OSX APIsJacob from TwoDesk Software Company has a blog post up about how to access Objective-C objects on OSX from Delphi XE5 & XE6 Firemonkey. It should also work in AppMethod and I believe these same methods that apply to OSX also apply to IOS. It covers how to access four different fundamental elements of Objective-C from Delphi. Those elements are static methods of an Objective-C class, an interface to a instance of an Objective-C class, an Objective-C object ID, and finally Delphi strings as NSStringObjects. The sample function that is demonstrated in the blog entry is a how to do a synchronous HTTP request using the native OSX TNSURLConnection object and return the results into a TMemo. The purpose being to use the native operating system object instead of using something like the TIdHTTP component which is the Indy HTTP request component. I think it does a really good job of explaining each type of object and how to access that object. Be sure to read the Recap section at the bottom of the post as it specifically tells you in a few lines exactly how to access the fundamental elements of the OSX API. Here is the final sample function for making an HTTP request:

Head over and read the full blog post about accessing the OSX API with Object Pascal from Delphi Firemonkey.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Four Fundamental Ways To Interface With Objective-C In Delphi XE5 Firemonkey On OSX And IOS by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE6 Firemonkey Animation Lab Timeline Component
Animate Properties Using A Timeline With AnimationLab For Delphi XE5 Firemonkey On Android And Windows

Boian Mitov from Mitov Software has recently released a new component suite called AnimationLab for Delphi XE5 and XE6 Firemonkey....

Close