Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AppmethodCode SnippetDelphiFiremonkeyIOSOSX

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.

Related posts
AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

C++BuilderDelphiIDEWindows

Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

AndroidC++BuilderDelphiFiremonkeyIOSLiveBindingsOSXWindows

Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

Sign up for our Newsletter and
stay informed

Leave a Reply