gjICE, my sixth iOS App, has been released on the App Store.
With the release of iOS 16.0 on September 12, 2022, Apple allowed third-party widgets to be displayed on iPhone Lock Screens.
Three types of Lock Screen widgets supported by iOS 16:
As well as limiting the size and number of Lock Screen widgets, iOS places other restrictions on their functionality such as colour vibrancy, user interaction, and the frequency with which they are refreshed.
Lock Screen widgets must be written in SwiftUI and use WidgetKit.
Although at the time of their announcement I was in the middle of updating gjLists and working on a releasable version of gjNotes, the draw of shiny new development was strong, and so I decided to create my own Lock Screen widget.
The idea for my widget was simple. I like to have ‘if found, or in case of emergency, please call’ contact details on my phone’s Lock Screen wallpaper. If someone finds my phone or I’m incapacitated in some way, my information and contact details are available even if the phone is locked. In the past, I have done this by using an app, If Found Lock Screen 2, to edit my Lock Screen wallpaper and add my contact details to it. I had to do this every time I changed my Lock Screen wallpaper, and the app was last updated in October 2019. Not ideal.
Time to develop my own Lock Screen widget that would display my emergency contact details independently of the wallpaper.
Enter gjICE. The ICE in gjICE stands for In Case of Emergency.
The initial development was a breeze. SwiftUI makes UI layout very easy, when it supports what you want to do. In my case it was just 2 rows of text with my emergency contact details hardcoded. That was it. I had a working Lock Screen widget displaying my ICE information.
I was going to leave it at that and only use the widget for my own personal use, but I decided that it shouldn’t take too much effort to turn it into app that could be used by others and released on the App Store. I amended the app to have 3 user entry text fields that would persist their data on the device, added a preview of what the Lock Screen widget would look like, and added an About section and some support screens. SwiftUI makes creating these UI layouts so easy, and within a few days I had a version of the app that I was happy to release to the App Store.
I also took the opportunity to try out implementing some anonymous data analytics. My previous apps on the App Store, gjPwd and gjLists, don’t collect any usage data, meaning I have no idea how my apps are used, what features are popular, what features are never used etc. Having this information available would be useful in planning future maintenance and enhancement releases for my apps.
I had already been looking at a free service that I could use for anonymous data analytics and decided to implement it in gjICE. If it got through App Store review and was successful in providing useful data, I could retrofit it to my existing apps and use it in future apps.
CountAPI is a free counting service with an API that allows for the creation of simple numeric counters. It advertises itself as an “IaaS, Integer as a Service”. Put simply, it allows for a counter to be created and incremented/decremented/reset when a specific action is triggered. All counters are accessible if you know the key, and there are no private counters.
In gjICE there are 6 counters that are incremented when:
Each of the counters are global and are used by ALL instances of gjICE i.e., whenever a user updates and saves their ICE details the same ‘save’ counter is incremented. When I look at the ‘save’ counter all I see is a single number, which is the total number of times ALL users of gjICE have saved their details. Similarly, whenever a user visits the Credits screen, the ‘credits’ counter is incremented, and all I can see is that the Credits screen has been visited, say, 67 times in total by all users of the app.
The counters are anonymous and aggregated. I cannot associate them with individual users.
The use of anonymous data analytics in gjICE was a bit of an experiment. Apple rightly has strict rules regarding app privacy, and I wasn’t sure exactly what I needed to do in order to get through the App Store review. In the end it was quite straightforward. I just needed to declare that usage data was collected but was not linked to a user’s identity.
UPDATE: CountAPI has since been replaced with TelemetryDeck for anonymous data analytics. See Goodbye CountAPI, Hello TelemetryDeck
With everything in place, I submitted gjICE for App Store review and v2022.1 was approved first time. Happy days!
If you want to display your emergency contact details, or up to 3 lines of any information, on your Lock Screen, give gjICE a try. It’s free and there are no ads. What’s not to like? You can download it from the App Store using the link below.