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

AppmethodDelphiFiremonkeyIOSUtility

Use The Iphone Configuration Utility And NSLog To Debug Delphi XE5 Firemonkey Apps For IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE5 Firemonkey IOS Log Debug Windows | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSIf you are looking for an easy way to debug your Delphi XE5 Firemonkey apps for IOS on Windows you might want to take a look at the Iphone Configuration Utility. The Iphone Configuration Utility for Windows provides an easy way for installing and removing IPA files from your IOS devices (faster than using Itunes). However, it also provides you access to the Console output of the IOS device where debug data from IOS itself and the apps running on the device is displayed. Brian Long has a blog post up with 15 different tips about building IOS apps with Delphi Firemonkey and one of those tips is the NSLog() function. The NSLog() function is the function that will write out text strings to the Console log which shows up in the Iphone Configuration Utility. Brian created a wrapper function called Log() which does the conversion from a Delphi string to the IOS string. Here is that function:
uses
iOSapi.Foundation, Macapi.ObjectiveC;
...
function PNSStr(const AStr: String): PNSString;
begin
Result := (NSStr(AStr) as ILocalObject).GetObjectID
end;

procedure Log(const AStr: String); overload;
...
procedure Log(const AStr: String);
begin
{$IFDEF IOS}
NSLog(PNSStr(AStr));
{$ELSE}
{$MESSAGE WARN 'Only currently implemented for iOS'}
{$ENDIF}
end;

If you are using MacInCloud or are unable to debug directly on your IOS device plugged into a Mac this can be a good way to do it. This should also work for Delphi XE6 and AppMethod. Download the Iphone Configuration Utility from Apple.

Check out the full blog post with all 15 of the tips and tricks for developing Delphi Firemonkey apps for IOS.

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

Related posts
DelphiDemoFiremonkeyLinuxOSXShowcaseWindows

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging

DelphiFiremonkeyShowcaseUtilityWindows

Unleashing Creativity With Song Writer AI: A Deep Dive

DelphiFiremonkeyShowcaseWindows

How To Build Stable Diffusion Text To Image Prompts

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

Leave a Reply