Home/Code tips

Adding Firebase Cloud Messaging to your mobile apps – part 1

By |2020-05-12T06:46:21+10:30May 9, 2017 10:11 pm|Code tips, General tips, Resources, Using APIs|

NOTE: This article has been revisited, here. Please read that article as the code has now been updated to use that method. Firebase Services from Google are becoming very popular, and Firebase Cloud Messaging (FCM) is just one part of it. In this article I show how you can incorporate support for FCM in your [...]

Handling the new iOS 10 privacy settings

By |2018-11-01T18:54:39+10:30September 21, 2016 5:14 pm|Code tips|

With the introduction of iOS 10, a number of privacy settings need to be handled in your Delphi apps. You may have arrived at this post because you've installed Delphi 10.1 Berlin Update 1, installed Xcode 8 on your Mac, added the iOS 10 SDK to Delphi, recompiled your app that uses the camera [...]

Checking if wifi is enabled on iOS

By |2017-05-09T21:09:18+10:30July 25, 2016 7:29 pm|Code tips|

Here I present some simple code to check if wifi is enabled on iOS, which could be used to alert the user if your application uses location services. One of my most visited posts is from 3 years ago, which has some demo code for checking whether the internet is accessible from the device. The [...]

Region monitoring, including background on iOS

By |2016-07-13T18:17:30+10:30July 13, 2016 6:17 pm|Code tips, Patches|

Get started with region monitoring (including in the background) on iOS with some how-to's on fixing the Delphi RTL source for the LocationSensor. In an earlier article, I described some changes you'd need to make in order to make monitoring of location changes work in the background with Delphi 10 Seattle. This article is aimed [...]

Performing background fetches on iOS

By |2017-02-16T18:02:35+10:30June 18, 2016 5:46 pm|Code tips, Patches|

This article relates to any version of Delphi (or at least it should work) that can target iOS 7 or greater. The demo project was created using Delphi 10.1 Berlin. There's been the odd post to the Embarcadero forums as well as on StackOverflow about how to implement background fetches on iOS. Partly because it's [...]

Allowing an iOS app to run in the background

By |2016-05-26T17:31:37+10:30May 26, 2016 5:24 pm|Code tips, Patches|

NOTE: This article is about allowing your iOS app to run when it goes into the background (i.e. another app becomes active) for a short period (up to 3 minutes on iOS 9, at least). It does not relate to having the UIBackgroundModes option, an example of which is here. As some of you will [...]

Debugging from Delphi in a VM using an emulator on the host

By |2017-02-16T18:02:35+10:30May 19, 2016 12:06 am|Code tips, IDE tweaks, Resources|

Note: These instructions work for me, where I am using VirtualBox on OSX, using a standard emulator from the Android SDK, and a Windows 10 VM with Delphi 10.1 Berlin installed. Way back in 2013, Jim McKeeth from Embarcadero blogged about debugging against a remote Android emulator. His method uses PuTTY and remote login via [...]

Go to Top