Xcode 7 for iOS App Developers: What’s New?

By | October 27, 2015
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Best features of xcode 7

 

Within a month of its release, the latest iteration of Apple’s integrated development environment – Xcode 7 – has received the thumbs-up from mobile software and app developers worldwide. Last week, Xcode 7.1 was made available (after 6 beta releases), with extended support for tvOS. In what follows, we will highlight some of the best new features in Xcode 7 for iPhone app development professionals:

 

  1. More robust support for Swift programming – Xcode 7 has a built-in ‘Swift 1.2 to 2.0’ migrator – making the task of upgrading source codes and programs a breeze for developers. The need for making all internal routines public for testing has also been done away with, thanks to the superior testability features of the framework (writing tests in Swift 2 for iOS apps can be done with ‘@testable import {ModuleName}’. Code reusability also gets a boost in Xcode 7, with developers being provided the option to add methods and properties to any particular protocol in their source codes.
  2. Smarter app testing – The all-new ‘Code Coverage’ feature in the latest Xcode version is a really handy addition for iOS app development experts. Small icons are displayed next to the blocks of code that are being tested, which helps coders to write tests for the blocks that have not been checked yet. The entire process of testing apps becomes more systematic, and chances of bugs remaining undetected get minimized.
  3. Testing apps on own devices – Staying with the topic of app testing for the moment – mobile app developers are surely liking this new option that Xcode 7 offers. No longer do they have to shell out an annual fee of $99 to test their applications on their own devices. In Xcode 7, all that developers have to do is sign in with their valid Apple IDs – and create, tweak around, and test their apps (that’s right, the paid Program Membership is no longer required). More power to iOS developers!
  4. Storyboarding gets a lot simpler – The new Xcode 7 framework allows professionals making iOS apps to create one main storyboard file, and store all the separate storyboards and view controller layouts directly linked to it. This, in essence, means allowing developers to work on only the relevant layout(s) at any time – without any chance of getting confused by other layouts (which can be the case in big storyboard files). What’s more, storyboarding in Xcode 7 also supports live rendering, offering coders a useful early preview of the visual features they wish to bake into their apps.
  5. Optimized for multiple platforms – As any Apple app developer would agree, one size definitely does not fit all – when it comes to making applications with Xcode. Xcode 7 includes SDKs for iOS 9, watchOS 2 and OS X 10.11 (El Capitan), and thankfully, the framework has several built-in ‘App Thinning’ tools to help developers churn out apps optimized for the different platforms. The ‘Slicing’ feature is worth a separate mention here – since it allows automated tagging of apps at the App Store, according to the targeted devices for each application. The new ‘Bitcode’ feature in Xcode 7, which allows prompt compilation of app codes into immediate representations, is yet another interesting addition. For applications that require additional content/resources after download, Xcode 7 also has a repository of ‘On Demand Resources’. The downloading and installation process of such resources is asynchronous.
  6. Stack Views in Interface Builder – Interface Builder, or IB, is a smart way of giving greater real-time control to iOS app developers than ever before. By adding Stack Views on the IB in Xcode 7, app developers can get two major advantages – firstly, collections of views can be seamlessly grouped together, resulting in greater code consistency and lesser error risks; and secondly, including all the required constraints also becomes considerably simpler. Since Interface Builder creates a single interface for all orientations and has cross-device support (including Storyboard referencing and the new iPad multitasking), the actual development cycle becomes shorter too.
  7. Test Navigator – As is already pretty much clear, Xcode 7 takes up the level of test-driven development by a couple of notches. The built-in ‘Test Navigator’ in this version of Apple’s IDE is a further proof of this. In the paired editors, the app codes and the written tests can be aligned side-by-side, allowing coders to work on them simultaneously. User Interface Testing (UI Testing) has also been made more comprehensive in the new Xcode version, with the help of the bots that are present on the Xcode server.
  8. Energy usage insights – Although slightly underrated, this feature, when used smartly, can offer valuable information to iOS developers. The ‘Energy Gauge’ for apps in Xcode 7 is a powerful addition in the overall code debugging setup in the framework. With the gauge, developers can monitor and detect how their apps are likely to affect the battery life of the devices they would be installed in. Abnormal spikes in the energy consumption of an app indicate that it would be a battery/bandwidth hog – and coders get an early chance to resolve this issue. In the Xcode build scheme, the ‘Address Sanitizer’ is also a debugging tool that deserves a mention.
  9. Newer, better Playgrounds – The ‘Playgrounds’ in Xcode 7 have a less cluttered feel than the ones in its predecessors. All the markups added to comments are displayed nicely, while the in-line placement of results makes for easier, quicker interpretation. Adding separate playgrounds to app projects is a breeze too – and it serves a range of functions, right from demonstrating the features of app codes, to showcasing how the APIs have been utilized in programs. The revamped Playgrounds also support all .swift files, and are ideal for creating and maintaining documentation while making an app.
  10. Updated support for Objective-C – Even as Swift has taken flight, professional iOS developers have maintained that it is not going to replace Objective-C anytime soon. Xcode 7, in fact, makes it easier to integrate Obj-C and Xcode, while working on app projects. With the ‘Nullability Annotation’ functionality, values (nil or otherwise) can be indicated directly from the source of the Objective-C code. Special ‘type information’ (particularly important when an app developer is migrating code from Obj-C to Swift) can be added to many classes, like NSDictionary, NSArray and NSSet. In place of the hard-coded explicit classes, coders can now work with more flexible constraints – by specifying objects as ‘_kindof’ types.
  11. Metal comes to Xcode – Xcode 7 is geared to be an absolute delight for developers of iOS games. New debugging tools have been built into the IDE, to support Metal – which is now supported on the Mac OS X platform. Rich and immersive scene editing is made possible (on a 3D immersive level), with the help of the impressive ‘Level Editor’ in SceneKit. Add the SpriteKit editors that allow developers to define and edit animations with events and timelines – and you get a perfect framework for mobile game development indeed. Xcode 7 focuses on creativity, and does a good job of it.
  12. More informative crash logs – And what’s more, these crash logs can be downloaded directly in Xcode 7. When an iPhone app developer clicks on the ‘Crashes’ tab in the ‘Organizer’ window, (s)he can view lists of all the crashes his/her applications have generated – along with their frequencies, and the portion of the codes that is causing these crashes. This, understandably, makes problem identification and app debugging a simpler task. Xcode 7 also supports TestFlight beta testing, which lets coders share their apps with target users, and get feedback on crashes.

 

The XCTest framework of Xcode has been bolstered with the UI Testing features of Xcode 7. Specific code snippets can be moved out of a Playground, by using the new ‘Auxiliary Sources’. Xcode 7.1 has arrived with a bundle of additional features – from tvOS support and Swift 2.1 integration, to storyboarding for 3D Touch and 2-factor authentication (apart from, of course, iOS 9.1 support). Xcode 7 is probably the most developer-friendly IDE released by Apple to date, and coders are relishing the challenge of making apps in this framework with the Swift 2 programming language.

Hussain Fakhruddin
Follow me

Hussain Fakhruddin

Hussain Fakhruddin is the founder/CEO of Teknowledge mobile apps company. He heads a large team of app developers, and has overseen the creation of nearly 600 applications. Apart from app development, his interests include reading, traveling and online blogging.
Hussain Fakhruddin
Follow me

Latest posts by Hussain Fakhruddin (see all)

 

Leave a Reply

Your email address will not be published. Required fields are marked *