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


If 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:
iOSapi.Foundation, Macapi.ObjectiveC;

function PNSStr(const AStr: String): PNSString;
Result := (NSStr(AStr) as ILocalObject).GetObjectID
procedure Log(const AStr: String); overload;

procedure Log(const AStr: String);
{$MESSAGE WARN ‘Only currently implemented for iOS’}
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.

Comments are closed.