Posts

Developer-Focused Changes Coming in Apple iOS 9.0

Apple’s feature-rich beta release of iOS 9 arrives with many long-awaited developer-focused features. These include big improvements for app multitasking, streamlined game creation, improved security, easier cross-platform app delivery, improved app search and much more.

iPad Multitasking

Three new features allow users to view multiple apps at once: Slide Over, Split View and Picture in Picture.

Slide Over and Split View let users display a primary and secondary app together. In Slide Over, the secondary app overlays the primary app and in Split View they share the screen. Split View allows simultaneous interaction, whereas Slide Over does not. Slide Over runs on iPad Air2, iPad Air, iPad mini 3 and iPad mini 2, but Split View only works on iPad Air2.

Picture in Picture allows users to run a video on top of another app. Developers wanting to add PiP use AVKit or AV Foundation APIs. The video playback class in Media Player framework is deprecated.

App Search

Search in iOS 9 features Siri combined with deep links, which allows users to search within developer-indexed apps. Users can reach indexed app content for uninstalled apps via Spotlight, Safari search, Handoff or Siri suggestions. Content can be provided through both the iOS 9 private on-device index and Apple’s server-side index.

Gaming Improvements

iOS 9 lets game developers harness more GPU power and improve game graphics and audio:

  • The GameplayKit framework has new randomization tools plus entity-components for improved reusability. It adds state machines, common gameplay algorithms, high-level specification of movement behaviors and rule systems to support data-driven logic, fuzzy reasoning and emergent behavior.
  • Model I/O enables importing scene data from popular game authoring software. It assists in creating mesh, lighting and background textures, improving asset data loading to the GPU and exporting asset data to different file formats.
  • MetalKit framework provides utility functions and classes to facilitate Metal app creation.
  • The Metal Performance Shaders framework contains optimized computer and graphics shaders for Metal apps such as Gaussian blur, image histogram and Sobel edge detection.
  • The Metal, ScenekKit and SpriteKit frameworks have many new features including stencil textures, depth clamping, more pixel formats, rendering support, Xcode scene and action editors, positional audio and camera nodes for scrolling games.

App Thinning

App Thinning helps developers create optimized installations for a range of platforms. Artwork in the Asset Catalog can be tagged so that only artwork applicable to a specific platforms is delivered. Additional app content can be fetched on-demand by the app from the iTunes App Store repository. Apps can now be archived in intermediate formats that are compiled as either a 32-bit or 64-bit executable when delivered to a platform.

App Transport Security

ATS is now on by default in iOS 9, which allows apps to avoid accidental data disclosures. To prepare for transitioning to ATS, apps should immediately use HTTPS exclusively for back end communications while beginning migration to ATS. Furthermore, high-level API communication must be through TLS version 1.2.

Other New Frameworks

  • Contacts and Contacts UI Frameworks are object-oriented replacements for the Address Book and Address Book UI frameworks, respectively.
  • Watch Connectivity enables iOS apps to coordinate with corresponding Watch apps via immediate and background messaging.

Other Enhancements

  • Standard UIKit controls can be automatically flipped when in a right-to-left context and be optimized with UIView and a new UIImage method imageFlippedForRightToLeftLayoutDirection.
  • Extension Points define usage policies and provide APIs for app network extensions, Safari extensions, Index Maintenance and Audio Unit extensions.
  • New types of encryption keys and item protection options are provided in Keychain such as ACL constraints for Touch ID, invalidating keychain items when fingerprints change, an authentication context for SecItem and key generation within the secure enclave.
  • A new speech synthesis API in AV Foundation Framework adds voice identifiers in addition to language IDs.
  • CloudKit services can provide users web-based access to the same data provided by iOS 9 apps.
  • HealthKit Framework has added tracking of reproductive health and UV exposure plus support for bulk delete operations.
  • Additional Local Authentication Framework support allows apps to track fingerprint enrollment, cancel user prompts, evaluate keychain ACLs and reuse Touch ID matches.
  • Maps can now be launched into transit directions and a 3D flyover mode has been added. Additionally, improved annotations and time zones in search results are now supported by the MapKit Framework.
  • Apple Pay via the PassKit Framework now supports the use of Discover cards and store debit/credit cards. Payment networks and card issuers can add cards to Apple Pay directly from their apps.
  • For apps that wish to support direct access to related web content within the app, Safari Services Framework has added SFSafariViewController that displays a single page with a Done button.
  • UIKit Framework has added support for subviews stacking in both horizontal and vertical directions, new layout anchors, direct document modification, access to intermediate touches, text input in notifications plus many other enhancements.

 

This latest iOS 9 beta release is the biggest one to-date, which brings an abundance of enhancements and new capabilities for developers to enrich their apps and make them more accessible to users. From more efficient GPU usage to improved user-level multitasking to leaps forward for gaming apps, the newest iOS 9 additions should be welcomed with open arms by developers worldwide.

Apple’s Swift Programming Language is Gaining Popularity

Apple’s Successor to Objective-C

In the latter half of 2014, Apple announced a new programming language, Swift, they had been secretly developing for several years to replace the aging Objective-C used for iOS an OS X application development. Swift has since come on strong with developers worldwide thanks to the many advances this language offers.

Compared to Objective-C, programming with Swift is streamlined and concise. Language features and the interactive development tools help avoid common programming errors. The highly-optimized LVVM complier produces fast, native code. Having coalesced some of the most popular and productive language features from Ruby, Python, C#, Rust and other languages makes it a highly productive platform for even junior engineers.

Most Loved Language by Apple Platform Developers

Almost immediately following Swift’s release to the programming world, it enjoyed over 11 million downloads.

iOS and OS X programmers love it because of its productivity features, elimination of unsafe code classes, automatic memory management and streamlined syntax. Variables are automatically initialized before first use, arrays are automatically checked for overflow and three-character keywords provide an easy and consistent way for programmers to express data types.

Built-in to Swift are all the object-oriented features that make interfacing with Apple’s Cocoa and Cocoa Touch easy and powerful. The LLVM complier ensures app code stability and top, native performance on Apple platforms.

Swift’s Rapid Rise in Popularity

In the first several months after Swift’s introduction, it is enjoying a meteoric rise in popularity as it climbs the charts of programming language adoption. Already, it is in the top 20 most talked about and most used languages according to surveys by RedMonk and StackOverflow. Their lists include heavy hitters such as Java, JavaScript, C++, Go and Rust. By comparison, Google’s Go, introduced in 2009, only broke into the top 20 rankings this year.

Part of that success is due to Apple’s anointment of Swift as their replacement for Objective-C, but a great more is due to the well-engineered nature of Swift to reduce new programmers’ learning curve and increase the impact of their programming efforts.

Large Enterprises Using Swift Are Impressed

Swift is already being taken up for large, customer-facing projects from big names such as DuoLingo, LinkedIn, American Airlines and Getty Images. Their results are showing Swift’s benefits in productivity and application stability that were designed in by Apple.

The ability for junior programmers to spin-up quickly on Swift is partially due to heavy borrowing of the most popular syntax and expressivity of other popular languages. Programs in Swift do a lot more with less code thanks to its brevity. Thus, coders can concentrate more attention to interfacing with the Cocoa and Cocoa Touch APIs.

Swift has significantly reduced debug work, while increasing data type and logic checking within the IDE and compiler. For instance, DuoLingo found that 80 percent of bugs in new code were due to Objective-C libraries rather than their Swift code.

 

Creating a new programming language is not a task for the faint of heart. Supporting it with a quality IDE and educational resources is just as daunting. Swift seems to be succeeding on all counts so far. Its popularity is reflected by the number of new Swift courses being offered at major universities such as Stanford and international technical schools in Britain, Germany and Australia.

Though Swift is off to a tremendous start, it probably will not dislodge the top 5 development languages this year. However, with Apple’s penchant for quality engineering and superb customer experience, its continued ascension is likely.

Introduction to Apple’s New Swift Programming Language

Developed in secret and now perhaps the most publicly talked about programming language, Apple’s Swift is coming on strong in the mobile app development world. It replaces Objective-C, first developed in the 1980s, as the preferred language for iOS and OS X applications.

Apple promotes it as a more powerful and easier to learn language that unleashes programmer productivity. Judging by its enormous acceptance by coders and enterprises, this appears to be the case.

Furthering its adoption is that Swift plays nice with existing Objective-C libraries, so there is plenty of legacy code reuse possible. It is easy to learn thanks to streamlined syntax, strong type checking and its “playground” feature that permits learning Swift on-the-fly as you program.

What’s New and Different about Swift

Programmers with experience in C#, Python, Ruby and other modern languages may find many of Swift’s features familiar:

Type Inference

The compiler deduces data types based on value assignments:
var a = 3.5 // compiler assigns type float
var s = “I think therefore I am” // compiler assigns type string

String Operations

Dealing with strings is cumbersome in many languages. Swift streamlines string handling by using simple operators such as ‘+=’ for concatenation and ‘==’ for comparison. Swift also allows embedding other types within strings, which is known as string interpolation:

var username = “Harold”
var vacationdays = 15
var s = “\(user) has accumulated \(days) of vacation”

Note the lack of semicolons to terminate statements, which is another convenience feature of Swift.

Generics

C++ coders will recognize Generics as being very similar to C++ Templates. These are functions whose parameters are polymorphic, meaning the generic function can be passed different parameter types, which are handled appropriately internally by the function. Thus, a single Generic could sort an array of values regardless of whether the values are floating point numbers, strings or complex data types.

Many Other Features

There are other characteristics of Swift similar to the above that make coding easier and less error prone including the ability to use strings in switch statements, tuples for making compound variables, the ability to assign functions to variables and powerful enumeration features.

The Playground

The Playground feature of Swift is one of its more powerful abilities, especially for new programmers. This is an interactive tool built into the IDE that allows coders to write code on one side of the development tool window and see results instantaneously displayed on the other side without waiting for a compile cycle. It also includes a variable watch capability to track values assigned to that variable simply by typing the variable name as a line of code at any time. “Quick look” buttons can instantly display strings or any graphical display content on demand.

 

Adoption of Swift has been spectacular to date. In the first few months after its release, it moved from the 68th to the 20th most popular slot in StackOverflow of programming languages earlier this year.

Ironically, the only thing that may inhibit a similar rise in the near future is Apple’s well-known penchant for keeping tight control over its technological assets. Some observers are worried that they will modify Swift to make it harder to port iOS apps to Android, for instance.

There is hope, however, that Swift’s creator, Chris Lattner, having come from an open source background will not allow that to happen. Even if Apple keeps Swift only for its products, however, its impact will be felt beyond just iPhones, iPads and Macs as it validates many other languages that share features with it.

iOS App Deployment Options

Clients often ask ‘how can I deploy my app internally so just our staff sees it?’ Or ‘how can we sell our app to other companies without listing on the App Store?’ This article explains the different iOS app deployment options and pros/cons of each.

There are basically three ways to deploy your application. Either it goes into the public App Store where everyone can see it, a B2B deployment, or an Enterprise deployment where it is only available to your internal staff.

Option 1: Public App Store

The App Store is the huge marketplace for apps that we’ve all grown familiar with. As of this writing, there are over 1 million apps in the App Store. This is where we download all the major publicly available apps from Salesforce to Angry Birds. Every iOS user has access to the App Store and has their credit card setup with their iTunes account.

Pros

  1. Exposure to largest user base
  2. Opportunity to be ‘Featured’ or in the top rankings

Cons

  1. Competing against 1 million+ other apps
  2. Goes through Apple’s approval process prior to each release
  3. Can only filter user groups by OS version and country

Option 2: B2B Deployment

B2B deployment is where you can sell your app directly to businesses by registering their Apple IDs or providing them with redemption codes. B2B apps cannot be listed in the App Store (and vice versa) so it’s one or the other. There are opportunities to make different versions with different functionality, but B2B apps go through the same approval process as regular App Store apps.

Apps distributed via B2B have the same pricing model as the public App Store meaning they can be priced anywhere from free to $999.99. They are also created using the same Apple Developer account that is used for App Store deployment.

Pros

  1. Easy distribution directly to specific users via Apple’s Volume Purchasing Plans for Business or Education
  2. Ability to heavily customize the app for specific organizations beyond what would be suitable in the public App Store

Cons

  1. Goes through Apple’s approval process prior to each release
  2. Restricted to using public APIs and functionality

Option 3: Enterprise Deployment

If you’re looking to launch an app that is explicitly for your employees then Enterprise Deployment is ideal. This allows you to create a completely custom app that doesn’t have to go through Apple’s approval process. This means you don’t have to worry about their policies and can push the limits of your app beyond what is suitable for the public app store.

Pros

  1. Doesn’t go through Apple’s approval process meaning there are no delays and you aren’t limited to typical policies
  2. Can distribute the app internally without first registering devices
  3. Utilize advanced enterprise features for enhanced encryption, VPN, and MDM integration

Cons

  1. No exposure to users outside of your organization
  2. Requires an Apple Enterprise Developer account to publish apps internally

(image credit: florianplag)

How Facebook Field Tested Their iOS 7 Redesign

Facebook has always been known to be inventive and try new things even if it sometimes means that user experience is inconsistent or less polished than they expect. When Facebook developed the flexible Gatekeeper testing system, they were able to run thousands of variations of Facebook simultaneously and run tests collecting data about usage and performance. This data would be used to inform Facebook testers what improvements were ready to roll out.

FacebookRedesignsForIOS7 How Facebook Field Tested Their iOS 7 Redesign

Making the recent move away from the HTML5 platform and rebuilding the apps entirely on native infrastructure, the new apps are twice as fast as a result. Facebook’s app store ratings increased, and twice as many news feeds were read.

Facebook has no qualms about trying new ideas on their users and has never been afraid to see whether or not they are received well on a live environment. The “Gatekeeper” system was built to let their software testers simultaneously test thousands of variations of Facebook on the web with subsets of users, and collect data about usage and performance to inform what to roll out to everyone. Facebook software testers could test apps, upgrades, and patches, then roll back to a previous version without anyone barely noticing.

Although Facebook on the Android has a beta tester club, which launched in June 2013 that lets beta testers sign up and catch bugs, iOS still refuses to provide beta capabilities. Facebook decided to build out a new mobile app testing framework and started using it in March when they built the new and improved app, updated, and released it.

When you install the new Facebook for iOS, the app contains different versions of the user interface. You are one user in a group of a few thousand that is using one of those versions of one of the interfaces in the app. Facebook can then run multiple tests on multiple versions at once, rolling out multiple updates to see which variations benefit the user experience and Facebook.

Everyone has something they can learn from the Facebook testing team.

Checkout this unofficial video demonstrating the iOS7 Facebook App:

[youtube height=”300″ width=”600″]http://www.youtube.com/watch?v=gnXggjgWC3U[/youtube]

Apple is Back in Maps

Apple recently purchased two mapping companies, HopStop and Locationary, pushing deeper into the map market and giving Apple more power in an area where they have experienced difficulty and embarrassment in the past.

Hopstop

One of the companies, HopStop, is a software application that can be used for directions, also providing real-time traffic delays. The iOS version has been updated with new features; however, the Android version hasn’t been updated and it is no longer available for the Windows Phone.

hopstop-300x142 Apple is Back in Maps

“Apple buys smaller technology companies from time to time,” said Kristin Huguet, an Apple spokesperson, “and we generally do not discuss our purpose or plans.”

Locationary

The other company, Locationary, is a crowd sourced location data company out of Toronto, and is a start-up that specializes in maps and mapping data. Locationary ensures that a business listing data is positionally accurate, as well as temporally accurate (i.e. a business is listed in the right location, and also noted whether or not it’s closed for renovation or closed permanently).

locationary Apple is Back in Maps

Steve Downling, an Apple spokesperson, confirmed the deal, echoing Huguet’s statement, saying, “Apple buys smaller technology companies from time to time, and we generally do not discuss our purpose or plans.” (Are there Apple spokesperson rehearsals where they practice saying that over and over?)

Apple introduced Apple Maps on iOS devices last year; promoting it as a feature of the iPhone 5; however, the software had major issues and was widely panned by users. In September, CEO Tim Cook offered an apology for the “frustration” and promising to improve the program, suggesting alternative apps, and in December, he said, “we’re putting all of our energy into making it right.”

Since the announcement of these two acquisitions in late July, Apple has posted more than 80 positions on their company job site hiring for its mapping group, including a series of “Maps Ground Truth Local Experts” posts, that state, “the Maps team is looking for people with a passion for mapping, great testing skills, and deep regional knowledge to help us build better and better maps. In this position, you will be responsible for the quality assessment of Apple Maps for your region, including both data and map services. You will monitor changes to our maps, provide feedback on unique local map requirements, collect ground truth information, and evaluate competing products.”

Apple has also extended invites to iOS users to “help improve maps” by enabling a new feature called “frequent locations”, which will provide a method to verify business locations and other destinations by tracking user movements. This is entirely opt-in, which should quell any concerns of privacy from users.

Now that Apple has acquired these companies, we can only speculate (since they generally do not discuss their purpose or plans), that they’re taking another stab at the map app space, only this time with more accurate data, giving them an edge on their competition.