We are proud to announce the release of our new Action Utilities suite for iOS, tvOS, watchOS and macOS mobile and desktop development. Action Utilities are collection of time saving functions and utilities to solve common tasks across a wide range of mobile and desktop apps written in Swift and Xcode.

When writing modern apps, there are so many common tasks that the developer ends up repeating across all their app projects. While most are not difficult, they can become tedious and time consuming to implement and maintain.

That’s why we created Action Utilities, so we could group all of these common tasks and functions into one, easy to consume and maintain place. As a result, Action Utilities form the basis that several of our other component suites are built off of.

Because of the basic nature of the functions and utilities provided by Actions Utilities, Appracatappra is offering them 100% free to use in any app project of your choosing. Additionally, we intent to keep expanding Action Utilities with new features which will also be provided free of charge.

Action Utilities include the following:

Action Extensions

Action Extensions provide several useful features to common, built-in Cocoa, Cocoa Touch and Swift data types such as converting UIColor/NSColor to/from hex strings (for example #FF0000), creating UIImage/NSImage instances from Base64 encoded strings stored in Data or NSData objects and encoding UIImages/NSImages as Base64 strings or Data objects.

iOS Examples:

<span class="token comment" spellcheck="true">// Assign a color from a string</span>
<span class="token keyword">let</span> color<span class="token punctuation">:</span> <span class="token builtin">UIColor</span> <span class="token operator">~</span><span class="token operator">=</span> <span class="token string">"#FF0000"</span>

<span class="token comment" spellcheck="true">// Initialize a color from a hex string</span>
<span class="token keyword">let</span> green <span class="token operator">=</span> <span class="token function">UIColor</span><span class="token punctuation">(</span>fromHex<span class="token punctuation">:</span> <span class="token string">"00FF00"</span><span class="token punctuation">)</span>

<span class="token comment" spellcheck="true">// Convert color to a hex string</span>
<span class="token keyword">let</span> white <span class="token operator">=</span> <span class="token builtin">UIColor</span><span class="token punctuation">.</span>white<span class="token punctuation">.</span><span class="token function">toHex</span><span class="token punctuation">(</span><span class="token punctuation">)</span>

macOS Examples:

<span class="token comment" spellcheck="true">// Assign a color from a string</span>
<span class="token keyword">let</span> color<span class="token punctuation">:</span> <span class="token builtin">NSColor</span> <span class="token operator">~</span><span class="token operator">=</span> <span class="token string">"#FF0000"</span>

<span class="token comment" spellcheck="true">// Initialize a color from a hex string</span>
<span class="token keyword">let</span> green <span class="token operator">=</span> <span class="token function">NSColor</span><span class="token punctuation">(</span>fromHex<span class="token punctuation">:</span> <span class="token string">"00FF00"</span><span class="token punctuation">)</span>

<span class="token comment" spellcheck="true">// Convert color to a hex string</span>
<span class="token keyword">let</span> white <span class="token operator">=</span> <span class="token builtin">NSColor</span><span class="token punctuation">.</span>white<span class="token punctuation">.</span><span class="token function">toHex</span><span class="token punctuation">(</span><span class="token punctuation">)</span>

Learn more about Action Extensions here.

General Utilities

General Utilities provide several, general utility classes to handle things such as simple popup notifications.

Examples:

<span class="token comment" spellcheck="true">// Display popup message at the bottom of the screen</span>
<span class="token builtin">ACNotify</span><span class="token punctuation">.</span><span class="token function">showMessage</span><span class="token punctuation">(</span>text<span class="token punctuation">:</span> <span class="token string">"Hello World!"</span><span class="token punctuation">)</span>

Lean more about General Utilities here.

Hardware Utilities

Hardware Utilities provide commonly used information about the device an app is running on such as the device type (for example iPhoneX), the OS version (for example iOS 11.1) and if the app can connect to the internet.

Examples:

<span class="token keyword">if</span> <span class="token builtin">HardwareInformation</span><span class="token punctuation">.</span>deviceType <span class="token operator">==</span> <span class="token punctuation">.</span>iPhoneX <span class="token punctuation">{</span>
    <span class="token comment" spellcheck="true">// The app is running on an iPhone X</span>
    <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token punctuation">}</span>

<span class="token keyword">if</span> <span class="token builtin">HardwareInformation</span><span class="token punctuation">.</span>isConnectedToNetwork <span class="token punctuation">{</span>
    <span class="token comment" spellcheck="true">// The device has an internet connection</span>
    <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token punctuation">}</span> 

Learn more about Hardware Utilities here.

Fully Documented API

That’s why each Appracatappra Developer Tool has a fully documented API, with instructions for every element included. Created by developers, for developers. Our tools were designed to be quickly added to your app project with a minimum of code, making it easy to high-quality, professional features and functionality to your app.