Special Events • iOS, OS X • 1:18:02
WWDC 2012 Platforms Kickoff
Speakers: Eric Albert, Max Drukman, Ken Kocienda, Henri Lamiraux, Geoff Stahl, Andreas Wendker
Unlisted on Apple Developer site
Downloads from Apple
Transcript
This transcript was generated using Whisper, it has known transcription errors. We are working on an improved version.
Hello everybody and welcome to WWDC 2012. I'm very happy to be here and see you all here. It's a big room. So I hope you like what you saw this morning in the keynote. There was a lot of new announcements, lots of new hardware and the new MacBook Pro. Wow, those are great machines.
We also announced a lot of new features in OS X. There was like 200 new features in OS X. And I'm not going to go through again this afternoon, but lots of new features in Mountain Lion, the new OS X. Same thing with iOS, a lot of new features, I think we have 200 new features. And here again, I'm not going to go through again to all those features, but those are very great announcements and I'm sure you're going to love those two OSes.
So for you developers, and I went through last time, I counted them one by one, and there were more than 3,000 new APIs. I stopped at 3,000. But there are like 3,000 new APIs for you to discover. This is what this week is about, to dive into those new APIs and learn and see what you can use for your new product or when you update your current application.
So with iOS and OS X, we have two huge ecosystems. Ecosystems built on top of the two leading platforms in the industry. At Apple, we care about the complete experience from hand to hand. So we care about the hardware, the software, the services, the content, and even the accessories. We want the user to experience the complete experience, have the complete experience from hand to hand.
You developers are also part of this ecosystem. You're taking advantage of this huge ecosystem to be able to sell your application to lots of customers. And so you are improving our ecosystem and you are helping us to be so successful. Some numbers were shown this morning. 650,000 apps, that's huge. I've been at Apple for more than 20 years, and believe me, this is huge. 30 billion downloads, that's also a humongous number. And 400 million store accounts. That's 400 million potential customers for your application. So a lot of customers.
So what we want to do this afternoon is step back a little bit and we want to give you 10 action items. 10 things that you should be doing in your next application or when you upgrade your current application. 10 things that we really care about because we're spending a lot of resources, a lot of time, a lot of effort on. And our customers too want those things in your application. So we're going to go through those 10 action items, take notes, there's going to be a quiz at the end. So let's start.
Number one: Design. So design is something we deeply care about at Apple in our hardware, in our software. Design is part of our DNA. We spend a lot of time designing our application, designing our hardware. This is what we are all about. So for you developers, how does it start? It starts with this big idea. "Oh my god, this huge idea is going to be fantastic." And woof, you go and start typing code and writing code. And there is a big missing step here.
It is that you need to look at the design for your application. There is a famous quote that says, "Genius is 1% inspiration and 99% perspiration." So your idea is really the 1% here. The rest is how you're going to deliver your idea to your customers. And this is what's important.
Design. What is this about? We can define three types of design. There is the interaction design, the implementation design, and the visual design. And there are not three steps you can do, one, two, three, and you're done, and you move on. This is something that is going to evolve during the lifetime, during your development cycle.
And they are all interacting with each other. You change the interaction design, it's going to change your implementation, obviously, it may change your visual. So they are all working dependent on each other, and you have to constantly make them evolve. So let's briefly describe what I mean here.
The interaction design is all about shaping your application for people use. It means making it efficient, engaging, intuitive. If you know the expression "look and feel", it's a feel in look and feel. You don't want your user to have to read 300 pages manual. It's obvious, but we see examples of that.
We have great documentation at Apple with the human interface guidelines. There is one for OS X and one for iOS because the interaction is obviously not exactly the same. So read those documents. It's almost mandatory for you to read those documents. Spend time understanding how you can implement the best interaction possible.
The second type of design, the second aspect of design is the implementation design. And here, I'm sure there are a lot of engineers in this room today, this is probably where you're going to be spending most of your time. This is about finding the right technology for your idea, the right architecture, figuring out the feature set, looking at performance, plan for your resources, the people, the time, all those things that are key to be successful.
It's also the time to make the right trade-offs. You may have this grandiose idea, but it turns out that the technology is not there, or you won't have time to do it, so this is the time to figure out what you can do in the time you have to go to market.
Finally, the visual design. This is about making your application beautiful and unique, giving the perfect experience to your customers. This is about choosing the visual elements that are going to make your application unique. The right typography, the right color, the right patterns. Everything is going to make a memorable experience.
So, it may sound obvious, but you need to think about those things and figure out if you are going through this whole cycle for your application. Skimping on design, you won't get what you want at the end. You may have this great idea, but you won't have any success. So this is about design, your first action item. Don't skimp on design.
The number two action item is about iCloud. So iCloud is Apple Cloud Service. The idea is very simple. We want a customer to have all their documents, all their stuff up in the cloud, and they can access it wirelessly anywhere on any devices. That's the goal of iCloud.
iCloud was introduced last year. It's integrated in OS X and iOS. It's a free service, and it's simple and easy for our user to use. As I said, we are integrating iCloud in all our applications and services. On iOS, it's in the mail, calendar, address book, it's in backup, it's in the store, in the music store, we announced the new shared photo stream, it's in iMessage. So we are including iCloud everywhere. We are integrating iCloud everywhere.
And on both iOS and OS X. As of March 2012, we had 125 million iCloud users. That's 125 million reasons for you to include iCloud in your application. Because you want our customers to experience the same thing when they use our apps than when they use your app. They're going to expect your app to integrate with iCloud. It's a free service, they see it available on our apps. Why not in your apps? So you need to... You need to integrate iCloud into your app. So what does that mean practically for you? It means one thing. Integrate with iCloud storage.
and we have three kinds of iCloud storage for you to choose depending on how your application is architecture. We have document storage, core data storage and key value storage. Three aspects of the same feature depending on what kind of data your application manipulates. So let's go through them quickly.
iCloud document storage. This is for user visible documents. If you are manipulating documents, this is probably where you should start. The idea is to have all your documents, every edit that a user makes to one of his documents available everywhere. Typical example of application that use iCloud document storage is iWork. And we had a demo this morning of Pages using iCloud document storage. This is a great example of an application that's the typical example of an application that can use iCloud document storage.
We have another type of iCloud storage, it's Core Data Storage. As the name indicates, this is for applications that implement Core Data. If you have a need for a database in your application, I really encourage you to go look at Core Data. So if you have a Core Data application, you should look at iCloud Core Data Storage. This makes using iCloud Storage very, very, very easy. Here we don't push the entire database to the cloud, but we sync records and changes to the database. It's very efficient and very, very easy to integrate into your application.
Key-value storage Key-value storage is a great example of a game. You start playing your game on your iPad and you have to leave, you have to go somewhere and you want to continue at the same place on your iPhone or your iPod touch. Key-value storage is a great example. You can use key-value storage for that. It's very easy to do and your state will be transferred to all your devices immediately. It's a lightweight, simple, and very fast solution to integrate iCloud storage into your application.
So, three types: Document, Core Data, Key Value. If you support one of those three, your application will be ready to use iCloud. So what's new in iCloud because iCloud storage? So on top of improving the ability and performance, we've also listened to your feedback. You told us that you wanted to be able to store a lot more data in this key value. So we increased the key value storage quota so now you can store a lot more data.
You told us also that you wanted the sync to be faster. It was too slow, you wanted it to be faster, so you make a change and the change probably gets to another device immediately. So we shortened the key value storage sync interval. So sync now are happening much faster.
You told us also that you wanted to be able to check the state or be notified of state changes for documents, data, or even accounts. So we've added new API in Foundation, so you can do that. We've also, as you've seen this morning, integrated iCloud Storage in the open panel.
So we have a new open panel for iCloud Storage, so you don't have to roll your own solution like we had to do before. It's all built in. Also for AppKit, we've added support for NSDocument autosave in AppKit. This is the integration of iCloud Storage in the open panel. Here also, you don't have to roll your own solution. It's ready for you to use.
You also told us that you wanted to be able to see what was in the cloud because debugging iCloud was not easy, easy, easy enough for you. So we've added these web tools at developer.icloud.com and it allows you to go see what's in the cloud. So you make a change on one device and the change doesn't get to the other device, what happened. So you can go see in iCloud what exactly is there.
So this is iCloud. Adopt iCloud storage in your application, or action item number two. Number three is about internationalization. We deeply care at Apple about having our products available everywhere, worldwide. In fact, we've been investing for a long, long time on international support. Our OSs are localized in more than 30 languages. The first iPhone shipped with one keyboard in English. Now we have 44 languages supported by our keyboard on iOS.
Our app store also is worldwide. In fact, you saw the number this morning. Our store is in 123 countries and even more in the few months ahead. We are supporting 41 languages in our app store. We are really a worldwide company and we want our product to be usable and accessible all over the world. And we are continuing investing in international support. You saw this morning about our big push for China. We have a lot of new features for the Chinese market and for all the other markets. So let me go through a couple of them.
We've improved the Chinese keyboard. We've improved the auto-correction. We have a better prediction accuracy. We've added something that's critical for the Chinese market because the Chinese language changes very, very quickly. New words are being added all the time. So waiting for a new release of the OS to update the word list for auto-correction is not very practical.
So we are now updating the word list over the air. So as new changes appear in the language, we are pushing a new word list. We've also enhanced the speed keyboard for Chinese. And now it's a lot easier to use when you're typing Chinese. We've also added 10 new fonts for China and also for Japan and Korea. Makes readability much better and makes the whole experience a lot better.
We've doubled the number of emoji that's supported in -- We've doubled the number of emojis supporting iOS and OS X. And we have now full support for Unicode 6.1. So as you can see, a lot of features, a lot of new features for both you developers, with, for example, the linguistic APIs have been beefed up and are much better. We are putting features for both our users and for you developers.
So how does that translate into how an app localizes in the App Store? So if you look at the US App Store, 85% of the applications are in English. That's great for us here in the US, we speak English. But let me give you a personal experience. My mother is French, you probably have guessed that.
and she lives in France and she has an iPad. She loves playing games. She's 82 years old. It's her first computer. Never used a computer before. She loves her iPad and loves playing games. The problem, she doesn't speak or read English. I'm just a little bit better than her. So she cannot use any games, anything that's in English. She won't touch them.
So it's been very hard to find good games. She likes puzzle games also. So it's even narrower, the scope here. So it's very hard to find games that she can play. We find a lot of games that would be great, but they are in English and she cannot play them. So you can say, "Oh, maybe that's..." If you look at the number in the French store, you'll see that only 9% of the applications in the French app store are in French. That's very, very small.
And you could say, "Okay, maybe that's France." And everywhere else is fine. But no. If you look at the Chinese app store, only 8% of these applications are in Chinese. It's very, very small. And there is a huge opportunity for you developers to have your application in the store localized in the language of the store. And my mother will buy a lot more games, believe me. So a huge opportunity for you there. So that's action item number three. Localize your application. Make it available all over the world.
Our next action item is about accessibility. This is something we deeply care about at Apple. We have a very dedicated team at Apple that absolutely works very, very hard on accessibility because they love this accessibility. This is something that we are really spending a lot of effort and for a long time.
So we've been adding during those many years a lot of new features for accessibility. And the good news for you developers is that except for one, I will talk about that in a few minutes, except for one feature, all the other features are usable out of the box. You don't have to do anything. They just work.
So that's great. And I'll talk in a little while about the only one that you need to do something about. So last year, we introduced with iOS 5, we've introduced Assistive Touch. This opens iOS to millions of mobility impaired users. It's been a great success. And you've seen this morning in a keynote Scott Forsall talking about guided access. And what I'm going to do, I'm going to have Ken Kocienda, iOS principal engineer, coming on stage and doing a demo of guided access. So, let's get started. Again.
Thank you Henri. Guided access is a great new feature for iOS 6 and I'd love to show you how it works. So let's go over to the iPad. Okay, and here I have an app called ABA Flashcards and Games Emotions made by Alligator Apps. Really, really great content in this app. Once we get into it, you'll see there's a series of flashcards where people are displaying different emotions. Really, really great content, particularly maybe for young children or special needs students who could maybe really use some help with their sensibility.
How do people express their emotions by their expressions on their face? So really, really great content. So now, if you're a parent or an educator, you might want to take this iPad, get into this app, and hand it over to that child, to that student, so that they can have the iPad right in front of them. Really, really get immersed in the content.
But there are a couple of problems if you do that. You hand the app over, and maybe the kid immediately will press the hardware home button now. They're out of the app, and now you've got to get it back and get them back in the activity, get them back on track. Okay, of course, there's another potential issue, which is the navigation bar pressing the home button again. They're out of the activity. So now this is where Guided Access can help.
Go into settings, turn on Guided Access, and now you triple tap the home button, and you get into the Guided Access configuration screen. So now you see at the bottom of the screen, once you enter Guided Access, the home buttons are turned off. So that takes care of the problem of hitting the hardware home button to get out of the app. Pressing the hardware home button will not leave the app.
But there's still the issue at the top of the screen of the navigation bar. So now Guided Access has this really, really cool feature for then going in and turning that button off. All you do is you go over, and you touch, and you circle the button. And Guided Access is now turned off. So now you can go in and turn that button off.
All you do is you go over, and you touch, and you circle the button. And Guided Access has this really, really cool feature for then going in and turning that button off. All you do is you go over, and you touch, and you circle the button. And Guided Access goes and introspects the UI, finds that button, and disables it.
So now I enter Guided Access, and now I can take the iPad, hand it over to a student, and now they can tap through the content. The app still works just like you expect, only now the home button will not leave the app. And of course, I can press up in that area, the top of the screen, the navigation button is also now not working.
Not working. So now the student, the kid, can stay focused on your content, so that they can get the most out of it. Now as Henri said, the best part about this feature is that you don't need to do anything. It just works with your apps, right out of the box. It's a great new feature for iOS 6. So I'd like to turn it back to Henri now.
So this was Guided Access. So as I said earlier, a lot, I mean all those features except one, they don't require any support from you guys. There is one, and this is VoiceOver. VoiceOver is a screen reader technology. This is for people who are blind. And it's been characterized as a game changer in the industry on iOS.
In fact, there is a wonderful quote that says, "The iPhone has turned out to be one of the most revolutionary developments since the invention of Braille." It cannot get better than that. So you need to do a little bit of work to adopt VoiceOver. And I'm going to guide you through that this afternoon.
So how do you adopt VoiceOver? How do you do that? First of all, you have to try it with your application. So on OS X, you go to the accessibility preference and you turn on VoiceOver. On iOS, we have a similar setting in Settings, Accessibility. And turn on VoiceOver. You can turn it on. You can turn it off. You on voice over and try your app.
It may turn out that you don't have to do a lot of things because if you only use standard controls, we do all the heavy lifting for you. And if your application is a standard UI with no custom control, it may turn out that you may be very -- almost done.
If you use custom control, then you have to go look at two protocols, one in iOS, one in app kit, one in iOS, one in OS X, UI accessibility on iOS and accessibility in OS X. So look at those protocols and, you know, make your application ready for voice over. So why do you have to do that? What's the incentive for you? The goal is to increase your user base. You want everybody to use your app. You want to differentiate your app.
You want to -- you want to have a user base that is not just a user base. You want to have a user base that is not just a user base. You want to have a user base that is not just a user base. You want to have a user base that is not just a user base.
You want to have a user base that is not just a user base. You want to have a user base that is not just a user base. You want the voice over community can really make a big deal of your application if it's really, really good. They're going to generate a lot of bots for your application. And that's good.
Also, in the U.S. and some countries, if you try to sell your application in the government or school, your application has to be accessible. It's a requirement. So you're not going to sell any apps in school or government without supporting accessibility and specifically voice over. So make sure that your apps are accessible. And if you're not, you're not going to be able to sell your apps in school or government without supporting accessibility and specifically voice over. So make sure that your app can be used by everybody and add up voice over and make your app accessible.
The next action item is about sharing. Sharing is what people do a lot -- more than a lot. People love sharing today with all the social network. That's what people do almost all the time. On their iPhone, their iPad, their computer, sharing is part of our life nowadays.
So last year, we introduced Twitter's integration with iOS 5, and it had huge success. You saw the number this morning in the keynote. We've done a single sign-on and a posting UI. Huge success. People loved it. Users and developers. We're doing it again this year with Facebook. And we have a deep integration of Facebook in iOS 6 and Mountain Lion.
So what does that mean? It means single sign-on. You saw it this morning. The user can go and sign in once into our settings and be signing for all the application. Facebook will be releasing a new application and a new Facebook connect that will integrate with our single sign-on.
So your application will be ready to use our single sign-on. We have a new posting UI, standard posting UI on OS X and iOS. We're integrating with contacts. So now you can get all your friends in your contacts. And on iOS, we're also integrating with calendar. So you can get your events, your birthday, all those things.
Facebook and Twitter are two great examples, but there are a lot of other ways people can share. They can use posting pictures to Flickr, or using Sina Weibo in China, or Youku, or using iMessage or Mail, or shared photo streams. So a lot of different ways people can share.
And for you developers, it means figuring out all the different APIs that need to be called, sometimes figuring out a new UI you have to create. And also figuring out if the services are available. Some services are not available everywhere in the world. So you have to figure out all those things.
It's not... it could become complicated. So we've decided to do all that for you. And we have introduced new sharing APIs in iOS and OS X. And this is going to be... it is a standard system. It's a new service. It means that as we are adding new services, they will automatically show up in your application. You won't have to do anything. The user can use them directly.
So we're going to have a unified API for all the services. You only have to learn one API, and you're done. A consistent UI across all your applications. We're going to filter the services depending on what kind of data the user wants to share. If it's a picture or just text, we'll do the right thing. We only show the sharing services that make sense. We're going to filter on location. As I said, some services are available everywhere.
And we want this API to be extensible. You may have a sharing service that we don't support, or we don't use your own in your application. So you'll be able to extend the API for your own service and integrate in the same UI, integrate your service into the same UI. So the user doesn't have to go figuring out another UI.
On iOS, the main class is UI Activity View Controller. This is a standard view controller that you can use and it displays in a grid all the services that are available at the current time, depending on the user selection and its location. Notice here that we have more than sharing services like Facebook and Twitter. We also have options like print and copy. This is why this class is called Activity. It's in fact more general than just sharing services. Thank you.
On OS X, there is a similar class because the API, in fact, are very, very similar. It's called NSSharingServiceSpeaker. Same thing here. Shows a list of sharing services that are available to your application. If the user selects Facebook, for example, you will get the standard Facebook UI to post to Facebook.
In this case, the user is posting a web page. So you see the little clip of the web page and the string. So to show you how easy it is to include the UI activity view controller into an iOS app, I'd like to bring on stage Ken Kocienda again.
Thank you Henri. So the new UI activity view controller and the new sharing API that we're making available for iOS 6 is really, really great and it's really easy to use. So what I'd like to do though is go back and show you an app that used the Twitter integration that we built into iOS 5 and show you how to move that app to use the new API that we're making available in iOS 6. Really, really easy. Love to show you. So if we can go to the iPhone.
What I did here is I wrote a little demo app here and it shows a picture of this extremely handsome guy. And what I did was the app is called Doodles and any Giants fans out there maybe perhaps. So what I did was made a couple of little doodles. So now, of course, I've made something like this, made content in my app immediately. Of course, I want to go and share it out on the Internet.
So what I did was I go and press the action button in the bottom right corner of the screen and I get the standard iOS 5 tweet sheet. Okay? Really pretty easy to get. Right? Now, what I'd like to do is show you the code that you need to write to present that. So if we can go over to the So, here, this method, very, very simple, few lines of code.
This is what you need to do to show that standard iOS 5 style tweet sheet, right? You just go and create the view controller, set the initial text and the picture that I generated in the app, and then just basically go and present the view controller. Just a few lines of code, really easy to do. But, of course, all this does is integrate with Twitter.
Now, since we've added Facebook and we're adding new services all the time, like CineWebo and other services available on iOS, right? Maybe you need to write more code to do that, but no, we made it really, really simple with UIActivityViewController. So, now, all I need to do is delete that code, and I've written a few lines that you need here to now use the new API.
As you can see, also very, very simple. All I do is I take my text and my image that I want to share with the user, create the view controller, and present it. Now, the UIActivityViewController looks at the data that you set and makes the services available in the view controller that are appropriate for the data that you set.
So, in this case, I've set that text and that image. So, I'm just going to build that and now go back over to the iPhone and show you this new code running. Okay. So, now, same, same good-looking guy as before. Or at least my wife thinks so. And then, right, so now I go over and I want to share this image, and now I press the activity, the action button, and now I get access to all of these additional activities, right? Twitter is there, just like before, but then also Facebook. Now you get the standard Facebook view and, you know, you can also, you know, you can Right.
Get the standard Facebook view, but of course that's not all. You also get access to mail and message other apps on the system that can handle text and pictures, contacts, and then also printing and copying. So with just this one simple API, just a few lines of code, you get access to all of these services and we've abstracted away all of the complexity of dealing with these services. And then additionally as we add new services in the future, you'll get access to those without having to change your code. So UI Activity View Controller, new sharing API for IOS 6, really, really great, really, really easy to use. Go and add sharing to your app.
Henri? So this was about integrating UI Activity View Controller into your application. Very, very simple. So this was the action item number five. I hope you're keeping track. Number five, this is about adopting our new sharing APIs. And to talk about our next action item, I would like to bring on stage Geoff Staahl, Director of Graphic and Media. Thank you, Henry.
So the next action item is making your game social. So we're going to talk about two great technologies that allow you to establish those social connections to your games, Game Center and AirPlay. So why is this important? What we saw from this morning was there's 130 million players playing your games on AirPlay. And even more astounding is they're posting 5 billion scores per week. That's an amazing number.
And so what we want to talk about is how you can use Game Center to establish that backbone of your social gaming networks. So you're building a new game. Before using Game Center, before you adopt Game Center, your players are like on an island. They can't see other players. They can't communicate. They can't share anything they're doing. Game Center changes this.
We add, for example, friends games. This allows people to look at the friends, see what they're playing, see what's really interesting to them, and download your games that they might see. We also add real-time and turn-based multiplayer. And that makes the games even more sticky. That makes players give a good replay value, makes them come back to your games, and, for example, enhances your in-app purchase kind of thing.
Also in Game Center we allow game ratings from right inside of Game Center. It may seem like a small thing, but it allows players to rate your game and tell the world what they think right inside of Game Center without having to go to the app store. So that's Game Center before today. Today we're adding a bunch of new social features to Game Center.
The first is, of course, sharing. So sharing allows players to take scores and achievements, allows them via Facebook, Twitter, messages, or even email, and share them with their friends. Also with our Facebook integration allows players to like your game. This means that you'll see posted on that player's wall a link directly back to the app store so other people can see and buy your game. Really a fantastic feature. Local multiplayer. You want to play with people around you. Local multiplayer allows you to do this. Whether you're in the back of a car or at a conference, you can find people nearby you to play multiplayer games.
Challenges. Challenges are awesome. Challenges make almost every game a multiplayer experience. So you're allowed to, players can take scores and achievements and they can challenge their friends to beat those scores and achievements. They can even challenge people who may not have the game. So when you're really good at a game, you can find someone who may not have the game and challenge those guys. You're sure they'll take them a while to catch up to you.
Finally, game groups. What we're doing is you can take your free, your paid, your HD, or even your OS X game and group them all into the same ecosystem. You can share leaderboards, achievements, and even send multiplayer invites across these platforms. This is really great to building that social network around your set of games and attracting more players. Game groups.
So those are the social features for the new Game Center. Here are some other features we've added. We've added, that's not just what we, we didn't stop with just the social aspects. For example, we have turn timeouts. This keeps your turn-based games going, make sure they don't stall when a player doesn't, doesn't want to post a turn. Or, for example, multiplayer rematch. Multiplayer rematch makes it easy for you to programmatically do a quick rematch for players. Game Center is available today for iOS and OS X Mountain Lion. The new Game Center is coming to iOS 6 and OS X Mountain Lion this fall.
Game Center If you're one of the minority who have not already adopted Game Center now is the time to start. I want to talk about another technology that really allows you to create unique social gaming experiences and that's AirPlay. So as you know AirPlay has some things it does.
It streams audio and streams video. It can do mirror displays and it can do second display. From a gaming standpoint we want to talk about those last two. So for example, you have an iPad, and you can mirror to a TV. With OS X Mountain Lion, you can take your Mac and you can mirror to an AirPlay device.
And with iOS you can do second display, like a great example here of Sky Gamblers. What's great about second display is it allows some unique paradigms for you to adopt for your game. So let's take a look at some of those. So in this case you have an action game.
In this case the players eyes are all focused on the screen. You have, they're playing using the iPad, using the accelerometers and gyros. And the iPad's going to provide them with that kind of HUD information, that quick information they can glance down at while they're playing. So there's great use of two screens here.
Now if we slow things down a little bit, you move into the living room and you have a shared experience kind of game. In this case the player's turn it is has the iPad. They can look at the secret word and they can start doodling and everyone else is focused on the screen. And allows them to guess the word they're drawing. This is a great example of using that airplay capability to create a social game.
A derivation of this could be for example a family game night. Where every player has their own device. It's an iPod touch, iPhone, iPad. They have their own tiles on the device and they are focused on the main screen when they take their turn. So again, created using the iPad. using AirPlay.
Finally, a great example from Real Racing here is multiplayer action game where you have a four-up display. Everyone has their own device that's controlling it, and they're focused on the display doing that integrated racing game. These are some great examples of how you can take a game using AirPlay and expand that social network, add to the replayability, really make it memorable for your players.
So, action item number six, make your game social. We have AirPlay, Game Center would help you do that. We want to see what kind of fantastically creative and brilliant games you can come up with. Action Item #7: Move to Modern Graphics and Media API. So we provide a fantastic set of graphics and media API across both iOS and OS X. And the call to action here is to move to this modern API. So let's talk about some highlights of that.
First, Retina displays. As you saw this morning, we've introduced Retina displays across the product line with the addition of the new MacBook Pro with Retina display. Stunning graphics. It allows you developers to create graphics such as these from Diablo that really make the player think they're playing inside of a movie. It's a fantastic, brilliant display.
Previously we've talked about iOS and how you can adopt Retina displays. Today we're going to tell you how to adopt Retina displays for Mac OS X. So it's ten steps. No, not ten steps. It's only four steps. So the first step is simply provide high-resolution artwork. We do the heavy lifting for you.
We ensure that the system text is going to be crisp and sharp and when you provide the high-resolution artwork, it completes your app. So here, for example, is a reminders app that may not have high-resolution artwork. When you're adding high-resolution artwork, it's amazingly sharp. We'll take care of the text, take care of the system artwork. All you have to do is do your own artwork.
The next thing to do is if you're an OpenGL game, you want to opt in to high resolution OpenGL. First you set your surface to be for best resolution. That allows you to get pixel perfect graphics. And then you make sure you pass the correct bounds into your viewport and you're off and running. And you'll be able to access that full resolution of that retina display. Next, avoid the use of deprecated API. NSMovieView, Quickdraw may have been great graphics APIs in their time, but they know little about high resolution retina graphics. So avoid the use of these deprecated API.
Finally, the fourth step of our four steps is correctly code using points and pixels. So we've given you some great routines to convert between points and pixels. In this case what you see is you see you're setting some bounds that come first in pixels, you're converting them to points and using them in the correct APIs and points. So ensuring your code where you're converting between points and pixels, you're doing the right thing. So, four simple steps to making your apps, to having your apps adopt retina level graphics for Mac OS X. We can't wait to see what kind of stunning things you can do.
So I'm going to change the pace a little bit here. We're going to talk about media APIs right now. We're going to talk about AV Foundation. AV Foundation really is the foundation of our media APIs in both iOS and OS X. We've added some new things to it. One thing that stands out for me here is the ability for you to access the decoded video frames in real time.
Yeah, it's amazing because what you can do is you can take the real-time decoded video frame, pass it in as an OpenGL texture and manipulate it that way. You could create a movie introspection app where you have a loop that magnifies your video and do that in real-time using this API. Another key facet of our media story is our amazing camera on the iPhone.
And this year we're going to allow you deeper access to the phone and more control with things like accelerated face detection that you can use in your application, focus exposure and ROI. And the last one on this list is actually pretty darn amazing. It is real-time video stabilization that you guys have access to in your applications.
So what we've created here is a state-of-the-art, fully integrated video stabilization solution that uses the gyro and the camera. And we're going to use the gyro, ISP, GPU and CPU to allow this kind of results with your application. So, how hard is it to get this? It's really, really easy. Video stabilization is two lines of code.
First... First, check to make sure it's there, and then turn it on. Absolutely stunning, amazing, real-time video stabilization. And to finish up our tour through the modern kind of graphics and media APIs is OpenGL and GLKit. GLKit for OpenGL is really the doorway or the gateway to modern OpenGL from legacy OpenGL. We provide you a lot of great utility routines and we ask, and it's both on iOS and OS X.
And if you're using OpenGL and you're not using GLKit, I really suggest you move forward onto it because it allows you to really unlock the power of programmable GPUs and shaders which are across our entire product line. It's actually a fantastic way to get jump started on OpenGL. So, let's do a demo.
[Transcript missing]
I think you saw this earlier today in the keynote in the movie, but we're going to do it in real time here.
So this is 3D for medicals, Knee Pro 3. And you can see it uses a great mashup of graphics, technology and APIs and input to provide a replacement for that old, dusty, plastic knee that the physician had in the corner of their office. So what you would do with the scenario here would be a doctor's in their office and a patient's contacting them.
They want to have a knee procedure. They're going to have a knee procedure and they have some questions about it, like exactly what they're going to do. So the doctor can take this application and you can slice the knee that way. Well, that's not exactly what I was looking for.
So I'm actually going to do it this way. And I think that's kind of what I'm looking for. I'm going to remove some layers here. And yeah, that's right, we're doing an ACL procedure. So that's this area. My hand's a little shaky here, so you probably don't want me working on your knee.
and there it is. So the great thing about this, it also allows us integration with share sheets and allows the doctor to send this to, via email, their patient. So they can say the patient didn't wonder where it was and they can ask some questions about it and the doctor can do that.
So that's a great thing and we can turn off the pen and as you can see now it's interactive. We can remove some more layers and as a student you can definitely look at the knee, learn about it and that's great. But there's another piece to it. The fact that they built this application using the eight graphics APIs we have on iOS and OS X, there's also an iPhone and iPad application. So let's bring up the iPad.
And so here you have the same application running on the iPad. So if the patient comes into the office and they still have further questions, they couldn't figure out exactly what the physician was talking about and they want to see what happened when they ruptured their Achilles, they can bring up an integrated video here for an ACL tear. And this video is integrated directly into the application seamlessly and it will show the patient what goes on with it.
So it's great because they've taken this great design where everything is completely seamless and so you don't feel like you're moving in and out of different modes in the application. Okay, well now we're back to our knee and that's fantastic. A fantastic use of graphics technology for this application.
So that was Neapro 3 by 3D for Medical. The idea here is not to take apart the needs, but the idea here is to think about your application, your design, and look at how our graphics APIs can really solve those problems for you across our entire platform, entire ecosystem, both iOS and OS X. In many cases, the graphic APIs are identical or nearly identical across the platform.
So we provide you with a ton of great graphics APIs, and the call to action here is to adopt these modern graphics APIs in your application. We can't wait to see what you do with them. So with that, I'd like to invite Eric Albert, Director of Security and Privacy, up on stage to talk about our next action item.
Jeff Zients, and Jeff Zients, the foundation of security is trust. And trust starts with distributing your application from a trusted source. Of course, as you all know, the best trusted source out there is the App Store. We have great App Stores for the Mac and for iOS. And all applications that are distributed through those App Stores have a minimum -- have at least a minimal level of security assurance.
But on the Mac, not all applications can be distributed through the App Store. And so as Craig mentioned this morning, when we introduced Mountain Lion, we also introduced Gatekeeper. That gives all of our users a way to protect themselves against malware by ensuring that all of their applications come from a trusted source. So if you distribute your applications for the Mac outside of the App Store, then you should be able to distribute your applications from a trusted source. And that's the key. You should sign your applications with Gatekeeper today.
How do you do that? We've worked really hard to make it as simple as possible. It's three easy steps. First, sign up for the Mac Developer Program. Second, sign up for a developer ID through the Mac Developer Program. And third, sign your application with Xcode. Each of these is really simple. You should go and do this today if you distribute your applications outside of the App Store.
Now, once you're distributing your application through a trusted source, then you should make sure that you protect your users' data. And the very first thing to do for that is if you send data off of the device to other systems over the Internet, you should use HTTPS. We have great support for HTTPS throughout all of our networking APIs. If you can create a secured server on the other side, then HTTPS allows you to have a secure channel to send that data over.
You should go and use that today if you can. But what if you can't? What if you're talking to an untrusted destination? Or what if you're writing out a large amount of information on the local system, and that is sensitive information that you want to ensure starts securely? In that case, the right thing to do is to use cryptography.
Now, cryptography is complicated. That's why we have a number of dedicated engineers who spend a lot of time making sure that our cryptography solutions are secure and are performant and are mathematically correct. We have two great cryptography APIs for you on OS X, and we have two of them. On iOS 10, use the security transforms API. On iOS, use the certificate key and trust services APIs.
Now, as I mentioned, cryptography is complicated. And if you have a small amount of information that you want to store on the local system and you want that information to be stored securely, then the right thing to do is to go use the keychain. We've had keychain support for a number of years now. It's built into both iOS and OS X. Go read the keychain On iOS, we've got one extra technology that I wanted to call out specifically today, and that's data protection.
We have specially engineered our iOS hardware to ensure that we can store user data on our local systems in a way that's encrypted such that it cannot be accessed unless the user types in their passcode. There is simply no way for the operating system to access that data or for anyone else to access that data unless the user types in their passcode.
If you are writing out any documents at all, any data at all on an iOS system, then you should go use data protection to write that out today. We've tried to make it really simple to adopt. There are attributes for NSFileManager and NSData. If you use these to write out your data, go use these attributes and go do that now.
Data protection is just one example of the world-class security technologies that we've built into our mobile products. And we're so excited about all of those, and it's a much larger number than I can tell you about today, that we published a paper about them last month. It's accessible at apple.com/ipad/business. It's called iOS Security May 2012. We do security. We don't do marketing, so that is the name. Go and read that today if you want to know all about our iOS security technologies.
So that's action item number eight, making your application secure. Action item number nine is respect your user's privacy. This is something we really believe strongly in here at Apple, and we hope all of you do as well. Privacy is all about transparency and control. And transparency is all about telling the user what information you're collecting and why you're collecting it.
That starts with providing a privacy check. And then you have to make sure that you're not just checking your phone, but you're checking your phone. And then you have to make sure that you're not just checking your phone. And then you have to make sure that you're not just checking your phone. And then you have to make sure that you're not just checking your phone. And that's a privacy statement.
We have support for this through iTunes Connect. You can give us a link to a privacy statement that describes what information your application collects, what you do with that information, why you collect that information. If you go and provide those links to us today, those links will show up next to your application on the App Store later this year.
Within your own application, though, again, you should say what information you're collecting and why. And also, you should strive to collect as little as possible. In general, if your application doesn't need a particular piece of information to operate, then ideally you wouldn't collect it. If you want to collect more information beyond that, then for each piece of data, again, say what you're collecting, why you're collecting it, and try to minimize all of that.
And for any of that data, you should, of course, provide control to the user. So if a piece of information isn't specifically required, then you should ask the user's permission before your application actually collects it. When you're asking for permission, ask for that in context and provide a purpose.
So, for example, it makes far more sense if you're trying to collect the user's email address, say for the purpose of notifying them about product updates or new products that you're developing, to do that. So, if you're asking for permission to do so in a sheet that says, "Hey, I'd like to tell you about new products or new services. Would you like to receive email about this?" As opposed to asking for their email address in some other part of your application.
Whenever you're asking for data like this, you should allow the user to change their mind. The first time someone downloads their application, they may not be familiar with you. They may not trust you or your company. They may not be comfortable giving you extra bits of information. So they may initially say no. You should always then, of course, allow them to go back afterwards and decide later that they are more comfortable and that they do want to share that information with you.
But, of course, on the other side, someone may decide that they're comfortable sharing information with you today and that they're not comfortable later. And they should be able to go back and tell you no, at which point you should then delete the information that's stored on your systems. And, of course, whenever the user says no, your application should fail gracefully. If you don't specifically need a piece of information to be able to have your application function, then it should continue to work just fine if the user doesn't provide that data to you.
So I'd like to talk about the application function. I'd like to talk about one feature in iOS 6 and in Mountain Lion that Scott touched on briefly this morning where we've tried to bring transparency and control to more of our users. And that is data isolation. Of course, you're all familiar with the alert shown here. We've shown this for location services for a while now, including both iOS 5 and in OS X Lion. And this alert appears whenever your application tries to request the user's current location.
And of course, they can say yes or they can say no. And now in iOS 6 and in Mountain Lion, we are extending this to contacts. So whenever your application tries to access the user's list of contacts, the operating system will automatically display an alert that will request permission to do so.
And also in iOS 6, we're extending this to calendars, photos, and reminders. So if your application uses any of these APIs, then the operating system will automatically display alerts like the ones you've seen. So that explains the context, but what about purpose? Because you do want to be able to explain why your application is trying to access this information.
So we're giving you the ability in all of your applications to modify those alerts to display the purpose. There's a support for a purpose string for each of these data classes in your Info.plist. Xcode has a great UI for that. And with the developer previews that you're getting today, you can go and create that for your applications now.
I do want to reiterate, of course, as you've always had to do with location services, and as I mentioned earlier, your application should fail gracefully if the user says no. If they decide not to share their contacts with you, then you will get an empty contacts list back or empty calendars, an empty list of photos, et cetera. Your application should continue to work properly in those cases.
And of course, we're going to allow users to change their minds. So we have new privacy settings in both iOS and in OS X, very similar to what we've always had for location services, which allow all of these data classes to be turned off and on. And that is action item number nine, privacy. And to talk about the next action item, I'd like to introduce Andreas Wendker, our senior director of tools and services.
Thank you, Eric. Most of our customers use our latest and greatest hardware and software, and they expect your apps to make the best possible use of our latest APIs and our latest hardware capabilities. And so your Action Item #10 is to always upgrade to the latest release of our Xcode Developer Tools, because that's how you get access to these APIs.
Let's look at that in a little more detail. Apple's hardware sales have simply exploded over the last several years. In each of the last two quarters, we sold more than 50 million iPhones, iPads, and Macs. Simply based on these huge sales numbers, most of our users actually use our latest generation devices.
And at the same time, because of the electronic software distribution mechanisms that we use, our updates to iOS and OS X reach our customers very quickly. Lion has seen the fastest customer adoption rate of any OS X release to date. And we expect that to continue when we ship Mountain Lion later this year.
and astonishing 80% of our Mac users are either online or on Snow Leopard. And the picture is even better on iOS, where custom adoption has already far progressed just days after we made an update available to our end users. So with our users living on the latest OSs and having the latest devices in their hands, the best thing you can do for your apps is to bring them fully up to date on our latest APIs and tuning them for our latest hardware.
You just simply expect that you support features like iCloud, Game Center, or AirPlay, and they expect that you optimize your apps for high-resolution retina displays, mighty core processors, and our newest cameras. and why it might be a little bit of work for you to keep your applications fully modern, it actually also makes your work a lot simpler because it allows you to stay focused.
What you can see from these charts is that you can reach the majority of customers if you focus on the latest release of our OSs and maybe the previous one. So use this to your advantage and don't worry about older versions of our OSs. You're far better off staying focused on innovation, keeping your applications fresh and modern, and from bringing them up on these latest APIs. And for that, you need the latest version of Xcode. Xcode always ships with our newest SDKs.
Now there's a common misunderstanding about our SDKs. Some developers believe that they have to use the version of the tools that shipped with the oldest OS version that they still want to support. So sometimes you see developers staying on an older version of Xcode because, for example, they still want to support iOS 4. But the reality is that all our SDKs support developing for older deployment targets. And the best way to develop on our platforms is to use the latest Xcode and simply set the minimum deployment target in your project settings.
So later this year, we are planning to ship two new releases of Xcode. Xcode 4.4 is going to ship together with Mountain Lion, and it's going to contain the 10.8 SDK. And Xcode 4.5 is going to ship with iOS 6. And in addition to the 10.8 SDK, it's going to contain the iOS 6 SDK.
Aside from these SDK differences, these Xcode releases are actually going to be mostly identical. And I'm very happy to let you know that later this afternoon, you'll be able to download a developer preview of Xcode 4.5, again with both of these new SDKs, from the WWDC attendee website. So go download that later this evening and let us know what you think about it.
In addition to some very significant improvements to stability and performance, these exercises actually contain a rather large number of very useful features. We've made a very big push to really focus on the bugs that you told us are most problematic, and we added specifically the features that you asked for. And one of these features is Auto Layout for iOS.
And to show you, I'm going to ask Max Drukmann, our senior AI designer for Xcode, to come up on stage for our demo. Thank you, Andreas. So last year we introduced Auto Layout with OS X Lion, and it's been a huge success. Auto Layout allows you to easily and expressively control the positioning and sizing of your user interface elements, both at design time and runtime. Let's have a look at that as well as some improvements we've made for localization. Let's go to the iPad.
Where I have a travel app I'm working on. This app allows my users to explore some of the sites that San Francisco has to offer visitors, as well as to add them to an itinerary they build up and find sites that are nearby. Now, speaking of sites that are nearby, I want to add one of those great new Apple map views to my interface.
And while I'm at it, there's an area in the bottom left corner of my interface that, I don't know, I'm not liking it very much. The data is all kind of running together. So let's go to the Mac and I'll show you in Xcode how Auto Layout helps me get my job done.
So here's my storyboard in Xcode. Let's dive right in to the area in the bottom left. I'm calling it the facts and figures section. So there are a number of labels down here, these bold ones, year built, length, height, et cetera. They all appear to be left aligned. But what I'd really like them to be is right aligned with their data next to them left aligned, sort of a two-column layout. That would be much more readable.
Now, the trick here is that the text in these labels is actually set to be right aligned. But the behavior of label objects is to size to fit their contents. That's what's making them appear to be left aligned. So what I need to do is I need to make all of these elements be the same width.
Now, I can do that by just dragging them around on the canvas or entering the same width value in the inspector. But what I'd really like to do is I'd like to tell these objects that their widths should be pinned to the data. So I'm going to do that by just dragging them around on the canvas or entering the same width value in the inspector.
But what I'd really like to do is I'd like to tell these objects that their widths should be pinned to the data. So I'm going to do that by just dragging them around on the canvas or entering the same width value in the inspector. But what I'd really like to do is I'd like to tell these objects that their widths should be pinned to the data.
So I'm going to do that by just dragging them around on the canvas or entering the same width value in the inspector. But what I'd really want to do is I'd like to tell these objects that their widths should be pinned to one another. Basically, what I want is that each of these elements should know that it should grow in response to the others.
And that's where Auto Layout comes in. So if I go in here and I select all these labels, I can, using the Auto Layout menu that's down here in the bottom right corner of the storyboard canvas, I can tell Auto Layout that I want to pin their widths equally. Now, what that does is it tells Auto Layout that my intent here is to go and find the widest of these objects and make all the others just as wide. And it will keep doing that at runtime as well, even when the content inside the labels changes.
Now let's go ahead and add a map. I'm going to put it under this photo view. I'll simply drag in a map view from Xcode's object library. I'll place it there and I'll I'll size it to match the width of the photo. Now, believe me when I tell you, you don't want to watch me write code. So I'm going to wire this map view up to an outlet that I created earlier. I'll do that with the Assistant Editor. I'll simply drag from the outlet to my view.
All set. Now, I'd also like to make the heights of the map and the image the same. Again, AutoLayout does the trick for me. Select them both and say pin heights equally. And AutoLayout makes them the same height no matter what. Now, the buttons across the top of my interface, Sites, Add to itinerary, and Nearby, those already have their widths pinned. So, Auto Layout is making them all the same width.
So, if I were to change Add to itinerary to... Itinerary, Auto Layout does the right thing, figures out which is the widest, and makes all three buttons the same. Now, manipulating objects on the canvas at design time is one way my objects can change. But another way is at run time when my app is localized. And now new different length strings come in and my objects need to react to that. Now, of course I want to localize my app because I want Henri's mother to be able to use it. I know she likes to play games, but maybe she'll come visit.
So now in OS X Mountain Lion and iOS 6, we're introducing a great new way to do localizations. So gone are the days of needing a separate ZIP or storyboard file per language. Now you can work with a single base ZIP or storyboard file and do all of your textual localizations with strings files.
Yep. It really streamlines the whole process. You can keep all of your text in strings files and the OSs will pick them up at runtime and provide the right content in the right language that your users expect. In Xcode 4.4, we've even added a localizations category to the assistant. So now you can work with your interfaces and your strings side by side. Here you can see my German strings because I also want Andreas' mother to be able to use my app. And with that, I've developed quite a little niche market.
Let's go ahead and see what Andreas' mom will see when she runs my app. I'm going to run my app in the simulator, which I've already set up to run in German. Here's my app. You can see my beautiful new map. And you can see that it's sized the same as my photo. So even when I change orientation, Auto Layout does the right thing and keeps them both pinned together.
And you can see my facts and figures section now has that great two column layout and it keeps it even as I load in new content with different length strings. All of this thanks to Auto Layout. There's just one word for it. It's ausgesichnet. Back to you, Andreas.
Thanks, Max. Now, a lot of the power of Xcode comes from our low-level tools, which are based on our LLVM technology. In fact, we are getting very close to the end of a transition away from the old and outdated GCC compiler and GDB debugger to our new, fast and modern LLVM and LLDB.
And while we are still shipping a version of GCC and GDB in our tools right now, we are planning to drop them entirely next year. So if you are one of the few developers still utilizing these old dinosaurs, now is the time for you to move off of them.
So LLVM does not only give you better compile times and faster generated code, it also gives you access to new programming language features that we have been adding over the last several years. Let's review those starting with C++. We actually significantly increased our support for C++ last year with Xcode 4, and we shipped the first version of our LLVM frontend for C++. And since then, we've been busy adding features to support C++ 11. Some of these features are listed here on the slide. We even added a new C++ runtime library, which removed the last dependencies on GCC that we have.
And later this year, with Xcode 4.4-- oops-- With Xcode 4.4, we're going to get a lot closer to completing our support for C++ 11 with the addition of several more features, most importantly, Lambda functions, which I know a lot of your C++ developers have been waiting for. So with Xcode 4.4, LLVM is going to be one of the most complete C++ 11 compilers available on the market. But our language of choice is, of course, Objective-C. Objective-C, that's right.
Objective-C is a highly dynamic programming language that drives almost all our system APIs. For the last few years, we've been on a path to make the language simpler, faster, and safer. We started this a couple years back with Objective-C 2.0, which added features like properties and fast enumerators. And since then, we've added several more very powerful features to the language, most importantly blocks, and lastly, of course, also automatic reference counting, or ARC.
With Arc, you let the compiler handle and optimize memory management for you so that you don't have to type, retain, and release anymore. With Arc, the compiler performs an analysis of your code and will choose the right memory management technique for each situation. That gives you the robustness comparable to a garbage collected language, but also gives you the performance and the lower memory usage of an application where you manage memory yourself.
And Arc has been a very strong success for us. There are already tens of thousands of applications in the App Store that you guys submitted utilizing Arc. And if you haven't given it a try yet, we recommend that you check it out and consider it for the next version of your app. In fact, we feel so strong about Arc being the right approach to memory management that we have decided to deprecate garbage collection in OS X.
So if you're currently shipping an application using GC, then you need to move it over to ARC in the near future. And to make that a little bit easier for you, we're adding a translator into Xcode that will translate your GC code to ARC code. And if you want to start on that early, come see us in the labs this week. We'll make sure that you're set up for this transition.
So with all these features in Objective-C that I've described, you've not only made your code more compact and faster, you've also made it a lot more concise. You can see a few examples here on the screen, where you see kind of on the left side, code how you would have written it several years ago, and code how you would write it nowadays.
As you can see, there's a lot less boilerplate code, it's a lot more compact nowadays. We're going to make this even better for you. First of all, we're adding number literals and expression boxing. This is-- This is very similar to string literals. Instead of this kind of code, you can also type this code.
Next, we'll make it much easier for you to access collection classes with the new subscripting syntax. So instead of this kind of code, you can simply type this kind of code. And also to reduce redundancy in your code, we are turning on automatic property synthesis, which means that in most cases... Which means in most cases you don't have to type at synthesizer anymore in your implementation files.
So all these features are implemented in the LLVM compiler without the need for any kind of runtime changes. So that means that they not only work on mountain line and iOS 6, but also on older versions of our OS. So this is really a great example for where it pays off for you to be on the latest version of Xcode while preserving the ability to deploy your apps on the previous version of our OSes. So action item number 10 is to always upgrade to the latest version of Xcode. And with that, I'm going to hand it back to Henri. Thank you.
10 Action Items for Today 10 Things We Care About Let me recap: Don't skimp on design. Integrate with iCloud. Specifically, adopt iCloud storage. Make your app localize your app. Make it available worldwide. Make your application usable by everybody. Adopt VoiceOver and make your application accessible. Adopting or sharing APIs. Make your game social by adopting Game Center or AirPlay. Adopt modern API for graphics and media. Make your app secure.
[Transcript missing]