Reader small image

You're reading from  Building Apple Watch Projects

Product typeBook
Published inFeb 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781785887369
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Stuart Grimshaw
Stuart Grimshaw
author image
Stuart Grimshaw

Stuart Grimshaw has programmed for Apple computers since the days before OS X and has been involved with developing for the Apple Watch since its release. Born in the UK and having lived in Germany and the Netherlands, he is currently a Senior iOS developer in London, England, United Kingdom. He has around 10 years of end-to-end development of projects experience in, iOS, iPadOS, watchOS (Apple Watch), tvOS (AppleTV), and macOS. He is passionate about the potential of the Apple Watch and Apple TV, as well as Apple's Swift programming language, and is a keen proponent of beach coding.
Read more about Stuart Grimshaw

Right arrow

Chapter 10. This Is Only the Beginning

That was nine chapters of pretty intense material. You will probably (and quite rightly) be proud of your achievements so far. From now on, everything you learn will be built upon a solid foundation that has already enabled you to get an app submitted to Apple's App Store.

This chapter is concerned with the many possible avenues that are available to you to deepen and broaden your programming skills, to make the most of the valuable time you spend coding, and to give your app the best possible chance of achieving its potential once it has been released to the world at large.

In this final chapter we will cover the following topics:

  • Advanced custom navigation

  • Onboarding

  • Using the Code Snippets Library

  • Post release improvement and maintenance

  • Analytics frameworks

  • Program design and programming paradigms

  • Using the command line

  • Using Xcode's tools

  • Git and version control

  • Useful utility apps and essential resources

  • Open sourcing

Using animation to the fullest


We have seen how animation can be used to produce a more vibrant, engaging user interface, but this is only scratching the surface of what can be done by animating the changes in the property values of UI elements. Despite the relatively modest number of properties we can animate, with a little imagination we can create effects that are simple, but which fundamentally alter the way we engage with the Apple Watch.

We have already seen in Chapter 2, Hello Watch, how simple it is to overcome the lack of a completion handler in calls to WKInterfaceController class's animateWithDuration method by extending the class with a method that chains together sequentially an arbitrary number of animation blocks. By combining concurrent and sequential animations we have at our disposal an unlimited number of ways to add complex (although often subtle) movement to our interface without having to deal with masses of complex code. The key here is to think about what we can do...

Making use of code snippets


Lots of code that you write gets written over and over again. A very convenient place to store frequently used code is in the Code Snippet Library (Command-Option-Control-2).The image below shows the details of a snippet that has been assigned a keyboard shortcut. When this snippet is inserted, the cursor is placed at the text, ready for typing.

To create a new snippet, select the relevant code in the source code editor and then drag it onto the Code Snippet Library.

After a while, you'll find that you have a substantial number of keyboard shortcuts at your command for typing code that you use frequently. Although the example shown above is very short (and trivial), there is no reason not to create much larger snippets, which, for example, could stub a set of the WKInterfaceTable callback methods.

Post release maintenance


Your app may be in the Apple's App Store, but there is still plenty you can do to improve your users' experience, as well as the app itself.

Support

Good after sales support is as important as good code to the success of your app, never more so than in the period immediately following its initial release. Try to make as much use as possible of the resources at your disposal, including your support website and social media. The exact way in which you do this will vary hugely according to the nature of your app and the type of user you expect to be engaging with it.

Think twice, however, about making your site or social media pages open to comments from users. One disgruntled user can do a huge amount of damage, even while a thousand contented customers quietly use your app every day.

Direct feedback can, however, prove extremely useful in identifying the areas of your app that could use improvement, or that are not working as you intended them to. It is worth considering...

Expanding your skills


One of the great things about programming is that we will forever be able to expand our skills. New platforms (like watchOS) arrive, new programming languages are released while the old ones evolve, programming patterns change, and some practices inevitably lose their relevance.

Software engineering, like engineering in general, is too broad a field to master completely. Gone are the days when a skilled programmer would know most of what all the other skilled programmers know, and to a certain extent, we must all choose what we will learn and what we will not. It is probably wise to keep up to date on a core set of topics and technologies that pertain to your interests and activities as a programmer, however, given our common position as WatchKit developers, I'd like to suggest a couple of pointers.

HTTP

Being mobile means talking to the internet and talking to the internet means mastering at least the basics of the hypertext transfer protocol, better known as HTTP. While...

Tools


Typing code into Xcode and hitting the Run button to see if it works is only a part of the story (though undoubtedly the most central part). There are a number of other tools that you should consider an essential part of your toolbox and countless others that may be of immeasurable help to you, once you have found them (often easier said than done) and learned what they can do for you.

What follows is a brief look at some of the most important tools already at your disposal (in that they are already installed on your machine), some further utilities that are free to use, and one or two paid apps that are at least worth checking out and are not expensive to license should you find them useful.

Terminal

In case you have not met it before, Terminal is a Unix console (Unix is the basis of OS X) and is installed along with the operating system. It is an important tool in many ways, though its value really first becomes apparent after you have become familiar with using it.

The Unix commands...

Sites to be aware of


In this section I am casting objectivity to the wind to list the dozen sites that I visit most frequently as a developer. It is likely that at least half of them would be in any developer's Top Ten, but that's not the point here. This is just to introduce you to a small number of sites that I personally find useful, or entertaining, or both I suppose. Some of them have been mentioned earlier in the book.

Swift

Swift must be one of the fastest evolving programming languages out there and it pays to keep abreast of the latest developments and additions to the language.

Open source Swift

This is the site that was set up at the same time as Swift was open sourced and is as fascinating as it is essential. There is a lot of stuff here, much of which is perfectly readable for less experienced developers, as well as material for the most advanced of software engineers:

https://swift.org

Swift blog

The blog site run by Apple has been around since the language was released and, although...

Stay in touch


Expanding your skills means keeping up with what's going on in the software development world, both in relation to iOS/watchOS coding and to broader development topics. It is essential to take time away from coding in order to prevent your knowledge from becoming out of date, but the spike in motivation you get from learning what's going on may prove just as valuable.

Follow the buzz

Read the blogs, subscribe to the newsletters. Not all of them perhaps, but those that seem most relevant or interesting (a list that will evolve with time, of course). Many of the ideas that will shape your growth as a developer are out there, just waiting to be discovered, but you won't find them by exclusively writing code; you need to proactively seek out new topics of value to you.

Use the many internet forums out there not just for problem solving, but also as a way to keep up with issues that are affecting developers of all platforms, in all locations. Many concepts of which you are not yet...

Summary


In working through this book, you have learned to plan an app from both a conceptual and technical perspective, taking into account the needs of the user, the desired functionality of the app, and the limitations of what is undeniably a challenging platform, due to its size and memory restrictions. You have then used that plan as a road map to identify and implement the classes and structures that you need to create efficient and robust code that is easy to understand and therefore maintain, and which is easy to reuse in other projects.

This chapter has provided you with some guidance as to which direction to take from this point onwards and which resources are of value to most developers. We have mentioned a few ways in which you can improve your users' initial experience with your apps and add custom navigation, should it be considered appropriate.

We have looked at some of the tools you are likely to need as well as a few tricks that will save you some time. Further, we have briefly...

One last word from the author


We are, I think we can say, all at the beginning of our watchOS development careers. And it's also the case that both Swift and the Apple Watch itself are very young contenders for the attentions of the world's next generation of app developers.

You, as much as anyone, have the potential to shape the new genre of mobile and wearable devices, a genre that is still finding its feet in the glare of media hype, commercial speculation, and, one hopes, some genuine pioneering spirit among users and developers alike.

As watchOS moves forward and matures, alongside its sibling, iOS, and its distant cousin, tvOS, we should consider ourselves extremely lucky to be in the game, so early in the story.

However important hard work, discipline, a cool head, and even a little financial investment may be to the success of your coding career, whether professional or purely as an occasional past-time, there is one small, obvious piece of advice that will add wings to everything you...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Building Apple Watch Projects
Published in: Feb 2016Publisher: PacktISBN-13: 9781785887369
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Stuart Grimshaw

Stuart Grimshaw has programmed for Apple computers since the days before OS X and has been involved with developing for the Apple Watch since its release. Born in the UK and having lived in Germany and the Netherlands, he is currently a Senior iOS developer in London, England, United Kingdom. He has around 10 years of end-to-end development of projects experience in, iOS, iPadOS, watchOS (Apple Watch), tvOS (AppleTV), and macOS. He is passionate about the potential of the Apple Watch and Apple TV, as well as Apple's Swift programming language, and is a keen proponent of beach coding.
Read more about Stuart Grimshaw