The learnings from building SignEasy iOS action extension

SignEasy
iOS App Development
5 min readMar 27, 2015

One of the most exciting features Apple released at WWDC 2014 was “App Extensions”. Extensions are a simple yet powerful way to make functionalities of apps on your mobile devices accessible in the least distracting way from any task the user is performing. This is incredible not only for the users, but for developers to think of more creative ways to enhance the functionality and visibility of their applications to billions of users, who spend their time in millions of apps available on App Store.

At SignEasy, we had been thinking for months about how the new iOS extension capability will help us get closer to our mission of enabling people to seamlessly sign and send paperwork in whatever tool, app or service they use in their professional and personal lives. The utopia of receiving an important email attachment to sign and send while you are in an idyllic vacation, right within your email app with the tap of a finger and continuing with your fun vacation, now sounded realistic and feasible to do in near future. In this post, we will talk about the technical learnings we gained while building the SignEasy iOS extension.

To set the context, there are different type of extensions for instance — Action, Today, Keyboard, Photo extensions etc and each have their own purpose and usability.

Here we will be talking about the iOS action extension developed by SignEasy.

Terminology:

Let’s familiarize with some terms that we will be referring to in this article.

  1. Host App — App from where the extension is opened.
  2. Container App — App which provides the extension.
  3. Action extension — A type of extension which allows the user to view or transform content from within the context of host app. It allows third party apps to share and transform data without ever leaving the host app.

This seems like a perfect way for the SignEasy iOS app to make its functionality accessible from other apps.

Before going through further, we need to ask ourselves 1 question — Does the extension add value for our users? I.e. — Being able to sign and fill documents without ever leaving your favorite email, file storage, productivity, business and utility apps?

Great it seems it could be of great value to our users.

One of the first things we scoped out was which core functionality of the SignEasy experience would be visible and relevant inside a host app as part of extension. Below is the summary.

Functionalities available in SignEasy action extension
a. Whichever file is opened through Action Extension is automatically imported to SignEasy so the user can find it later in the main App. b. All the options to fill documents with Signatures, Initials, Dates, Text etc., which are available to the user in the main app are available within the extension so the user does not feel he is getting access to sub-par functionality. c. The state of the user is maintained across the main app and extension. For instance, the user’s signature and settings from the main app are available in the extensions as well.

While building the SignEasy action extension, we came across many technical bottlenecks and through an iterative development process, we figured out the solutions. Following are our learnings from building the SignEasy action extension.

1. Sharing code between main app and extensions
Any extension is added as a separate target in the project so there could be multiple extension targets in our project apart from main app target (and optionally the test target). Apple has introduced “Embedded frameworks” in iOS8 which has simplified the process of sharing code, but unfortunately it doesn’t work with iOS7, so we resorted to using a Static library. Although there is a way for an app with embedded frameworks to have a deployment target of iOS7. Read section “Deploying a Containing App to Older Versions of iOShere. This is worthy of another blog post where we will explain embedded and static frameworks and migration from one to another. Stay tuned!!

2. Sharing data between main app and extensions
To enable data sharing we have to enable “App group”. Once we have enabled it, both main app and extensions have READ and WRITE access to the NSUserDefaults (where we store user preferences). Read section “Sharing Data with Your Containing Apphere, which gives detailed description of the process.

3. Action extension visibility
In general, any action extension which supports the shared data type from the host app will be visible in the share sheet, but there are multiple ways to launch share sheets and some don’t show action extensions. For instance —

Here is a share sheet opened from a document in the Dropbox app which shows both action and share extensions.

Here is a share sheet opened from a note in Evernote, which shows only share extensions.

Its details are a topic for another day, but the point to be noted is that it completely depends on how a host app has implemented its share sheet. (Although I feel that multiple ways of implementation has confused developers to a certain extent.)

Here is a sneak peek of our iOS extension.

iO8 Bugs and Limitations

iOS8 release from Apple had lots of annoying bugs, the most notable one we encountered was-

  1. Not able to show a View controller in landscape mode — Our signing interface works best in landscape mode, but unfortunately in extensions it doesn’t seem to work. We had filed a rdar — Open rdar . We have to wait and see if it is solved in the upcoming betas.

Our iOS team was really excited to utilize these new capabilities on iOS platform to make signing process effortless and seamless for our users. This marks a significant step in our journey committed towards bringing the best digital signature solution on iOS devices for consumers and businesses of all sizes.

We hope you learned something useful from our technical learnings and experience of building an extension.

If you have any queries or want to share your own experience of building an extension, shoot a mail to ios-dev@getsigneasy.com and we would be happy to chat. And if you are a mobile application developer who gets high by taking on challenging work using the latest and greatest technologies on iOS and Android, not to mention a fun and ambitious work environment, say hello to us at jobs@getsigneasy.com with a brief cover letter about your work and why you will be a great fit to our team.

Cheers
Neeraj Kumar
iOS Engineer, SignEasy

--

--

SignEasy
iOS App Development

The simplest and fastest way for businesses and individuals to get documents signed from mobile phones, tablets and web.