dipityPix app

Wednesday, September 3, 2014

Our new Photo App Extension feature in Pic!

Earlier this year Apple announced that you would be able to use some third-party components in other apps, with keyboards getting a lot of ink.  Photo-editing app extensions caught our eye and we looked into making Pic! also operate as an app extension.  To me, Apple's app extensions are a particular kind of plugin that also must be a stand-alone app.  Also trying the new language Swift was attractive to us.  We thought the timing was tight, but we had a great programmer Andew Cobb working with us who had a month before he left for graduate school.  He actually managed to finish the app extension in Swift, some of which he will later make available as an open source project.

We now have the Swift app extenstion version working and it should be available on or soon after the day iOS8 goes live.

To run a photo app extension, you run an app that has photo editing and app extensions allowed.  Here is an example in the xcode iOS8 simulator where we run the apple app Photos, and select an image and then hit the "edit button"
Here we can use the Apple editing options at the bottom.  Instead we hit the upper left button

This brings up the available photo editors that can be used in the app, and we choose ours.

Unlike the stand-alone Pic! app, there is a bar at the top the app Photos owns.  We have no flexibility there.   Note there is a "done" button.  In our standalone app, you click three screens and then you are done.  In the app extension, if the user hits done you have to bail out with some version of the image.  We use the one the user last clicked indicated by the box around the upper left.

Still in our app extension we make two more choices and we have our final image.  Now the user can say yes they are done and exit our app extension with saved changes, or say cancel and get out with no changes.  The back button at the bottom is ours, and can return to change choices.

We say done and return to the editor.  Now our app extension is out of the picture and we are in just the Photos app.  We could still cancel.  Or we could run pic! on its own output.  Or we could run another app extension.

We say done and back to browsing in Photos with our saved changes.

All in all now that we have done one, I'm a big fan of app extensions.   There are actually more clicks here than just using our app directly for the same task.  However, the real potential is running multiple photo app extension in series.  I haven't done that yet because only ours is available to us, but I look forward to trying it when the real ecosystem is here (next week?).

No comments: