Posted on Leave a comment

How to localize your app

When you deliver great localization in your app, you can support your customers in their native language and provide a better overall experience. Here’s how you can get started localizing your content quickly and effectively inside Xcode.

Translate your app’s content

Use the Xcode Export For Localization feature to automatically extract all localizable content, including strings referenced from code, stringsdict files, and Interface Builder files, as well as any localized assets. This process shouldn’t require modifications to your source code, making it easy to work on translations in-house or with an external localization service. Be sure to also localize purpose strings for a consistent app experience, and consider localizing your privacy policy so that all users have a clear understanding of how their data may be handled.

Apple Services

Use Apple APIs to automatically present localized buttons, payment sheets, errors, and more for Apple Pay, Apple Wallet, and Sign in with Apple.

Audiovisual Media

You can also provide localized support for audiovisual media in your app using AVKit and AVFoundation. These frameworks provide built-in support for easily presenting subtitles and closed captions, and for selecting alternative audio and video tracks.

Localization Services

If choosing an external localization service to help translate content, find out if they specialize in localizing for particular languages, cultures, or categories, and confirm the levels of quality assurance they provide. Providing the service with context about your app and content can help increase efficiency and minimize translation errors. Consider creating a guide with important details — for example, a playbook with character names and personalities, explanations of jokes or humor, a glossary of frequently used terms, and screenshots that show where the translations will be used. Avoid machine translation as your only translation method, since this can lead to inaccurate and low-quality translation because it does not account for context, cultural sensitivities or language nuances. For example, the “book” button in a hotel app might be incorrectly translated to be “novel” rather than “reserve”.


Learn more about localizing your app in Xcode >


Test your localization

Configure test plans in Xcode to easily run tests with different settings and define your testing variants in one place. This helps flag any instances of clipping, truncation, layout overlapping, or issues with right-to-left formatting for the devices and languages you support.

You can use the Localization Screenshots feature to generate localized screenshots from successful tests and export these screenshots for use in tutorials, marketing materials, or your App Store product page. Once your app is localized, use TestFlight to share your app with a group of users in the market to get feedback and gather opportunities for improvement.


Resources

Watch “Testing in Xcode” >

Learn more about testing your app in Xcode

Learn more about expanding your app to new markets >

Get more resources for localization >

Posted on Leave a comment

How to prepare your app for a global audience

The App Store is available in 175 countries and regions and 40 languages to make it easy for people around the world to discover and download your app. This week, we’re showing you how localizing your app can help make it more relevant to local cultures and languages and help you grow your business — and that starts with preparing your app for a global audience.

Structure your app for localization

Internationalization, the process of structuring your app’s code and UI for localization, is a fundamental first step in building apps for a global audience. With Apple’s powerful tools and technologies, including Xcode 11, Apple APIs, Auto Layout, and Unicode support, it’s easy to prepare your apps to support multiple languages and regions, even before you know which languages you’d like to add.

In Xcode, make sure your user-visible text and images are separate from your executable code. When you translate these elements into other languages, you can integrate the content back into your app as separate localized resource files stored within the app bundle.

Images — including image sets, Apple Watch complications, Apple TV image stacks, Sprite Atlases, and symbol sets — can be localized directly in your Asset Catalog. You can also use localized SF system symbols and set the directionality for custom symbols — for example, for right-to-left languages like Arabic and Hebrew.

Use Apple APIs to correctly express user-visible or dynamically-generated values, such as dates, lengths, weights, prices, and currency symbols, across different locales. Ensure your app accepts user-generated text in any language and in multiple languages at once, independent of the user interface language. This allows app content to appear in someone’s preferred language and format.

You can also take advantage of Auto Layout to automatically adjust the dimensions and layouts of views, extensive Unicode support to work with text from any language, the powerful text handling technologies of Cocoa and Cocoa Touch to display, lay out, and edit text in many languages, and much more.


Watch “Create great localized experiences with Xcode 11” >

Learn more about localizing your app in Xcode >


Investigate market factors

Market-specific demographics, such as population, language, and purchasing power, can help you better understand areas that might have an affinity or need for your app. Every market has its own preferences for the types of apps or categories customers most enjoy. For example, games are popular worldwide, however strategy games may be more popular in a particular region.

Consider selecting markets with similar attributes to those in which you have already established success, such as strong app downloads, sales, usage, or retention metrics, as this may make for easier growth. When selecting a market, assess how your app might fit in and how its value and functionality aligns with that market’s needs. You may even identify a need in the market that is not yet filled, allowing you to bring unique value to people with your app.

Use App Analytics to determine potential markets

If you offer your app worldwide but haven’t localized for particular regions, you can look at key performance metrics, such as Product Page Views, App Units, Sales, and Active Devices, filtered by territory. This can help you determine if your app is attracting people in a particular territory that might benefit from localization. For example, if your app is primarily in English and you see lower than average retention or Sessions per Active Device in Germany, you might consider adding German language support. Keep in mind that some markets may have greater proficiency with your app’s primary language, while others may require more significant localization work. Usage data such as active devices, sessions, and retention include only users who have agreed to share their diagnostics and usage information with you.


Learn more about gaining insights with App Analytics >


Consider local culture and customs

While your app and product page should each provide a consistent experience across all markets, it’s sometimes valuable to refine certain elements for cultural relevance. For example, you might try incorporating market-specific content or cultural moments, such as special holiday content or regional art styles. You may want to consider any local policies and market regulations, as well as any political or religious sensitivities, to increase the likelihood that your app is well received.


Resources

Learn more about expanding your app to new markets >

Get more resources for localization >

Posted on Leave a comment

Meet the developer: Philip Lam

The A.I.-powered app has revolutionized basketball practice.

HomeCourt is quite possibly the biggest thing to happen to basketball practice since the invention of the sneaker.

The app uses artificial intelligence (A.I.) and augmented reality (AR) to create and shape on-court basketball drills. It can tell whether you’re shooting off the dribble, catching and shooting, or just practicing free throws. It will measure your release time and the angle of your shot. It knows how fast you’re moving before you shoot. It calculates your vertical leap. And after your workout, you can see performance charts and a video breakdown right away. It’s a metrics fan’s dream.

HomeCourt lets you watch your dribbling skills in real time.

HomeCourt offers real-time coaching as well. With the help of your iPhone or iPad’s front-facing camera, you can get real-time feedback from coaches across town or on the other side of the globe.

As people shelter in place around the world, HomeCourt has made its services free to everyone through May 31. A recent feature update also lets coaches create a virtual team roster in the app, so players, coaches, and parents can participate in remote workouts, drills, and competitions. The company is also working on other ways it can support basketball players and coaches while school activities, practices, and tournaments are being cancelled or postponed.

Cofounder Philip Lam says the company’s shot-tracking prototype kicked everything off. “Even though it could only track shots in a few specific situations,” he says, “it made us believe it was possible to use a single smartphone camera to track complex basketball activities.”

Get instant feedback right on the court.

Today the company has 22 employees in Hong Kong and San Jose, California, and players across the globe.

Here Lam explains how HomeCourt got into the game:

”Before we launched, we played pickup basketball every week, and we started talking about how great it would be if we could get our stats — who hit the most shots, who got the most rebounds, all that stuff. And the idea just came up: Can we actually use the camera on the phone to do that for us? That’s how it started.

We built HomeCourt on mobile to make it affordable to players around the world. We came up with the idea of simulating the Stephen Curry tennis-ball drill with an interactive AR experience. That turned out to be the foundation of HomeCourt’s dribble workout. Everyone on the team was really excited to try it and compete with each other.”

Yes, the app keeps track of this many stats.

”Most other basketball training applications are content-based — no other mobile solution provides this system of proven training techniques combined with real-time A.I.-powered analysis.

In mid-2018, we built a prototype that could track advanced metrics, like release angle, release time, and vertical jump. We named this feature Shot Science. At that time, the iPhone X was the latest iOS device. It was powerful, but it still wasn’t fast enough to run Shot Science in real time and enable players to hear audio shot analysis during a live practice.

The new iPhone series came in September 2018, and it was a much more powerful device for running machine-learning algorithms. We found our algorithm [ran] six times faster in the iPhone series with the A12 Bionic chip. With the optimization in our algorithm, we could finally offer Real-Time Shot Science. The opportunity to demonstrate that at the 2018 Apple iPhone event [was] definitely one of the most special days in our journey so far.”

A sketch of the design that eventually became HomeCourt.

”We’ve had parents tell us that it becomes a competition with videogames: “Oh, they really do practice more, and they play fewer videogames, and I’m really happy about it!” And I’m really happy about it too!

And, yes, we still definitely play every week.”


Originally published on the App Store.

Posted on Leave a comment

Design launch screens for seamless starts

Instantaneous app launches are a big part of providing a great experience on iPhone or iPad. Whether someone is tapping on your app icon for the first time or returning from elsewhere, they should be able to get started immediately. A launch screen lets you provide that seamless and adaptive experience while your app loads any pertinent information in the background, and you can create it directly in Xcode.

Designing the right storyboard for your launch screen can make a world of difference in how quickly you can immerse people into your user interface. Here are a few recommendations and tips to help you create great launch screens for your app.

Support all device screen sizes by creating launch screen storyboards in Xcode

Although people won’t be able to interact with your launch screen, you should always build your screen using an Xcode storyboard. Storyboards are flexible and adaptable and support all device screen sizes, which allows you to use a single storyboard to manage your launch screens for every platform you support.

Note: Don’t use a static image for your launch screen. Static images have been deprecated and all App Store apps must use an Xcode storyboard to provide an app’s launch screen by June 30, 2020. Learn more here.

Mirror your main screen

The fastest way to convince someone your app is responsive and ready to go is to show them the same interface in your launch screen that they expect on your app’s main screen.

When an app first starts up, it shows its launch screen before transitioning to the main interface. When someone switches away, the app automatically saves an App Snapshot of its interface so that it can return to where they left off; if an app can’t restore its state in this way, however, it will display the launch screen instead.

As such, you want to make sure your launch screen storyboard looks close to identical to your main interface. If you include elements that look dramatically different, it may be confusing or jarring when your app shifts to the main screen. If you have an app that might take a bit longer to load, like a game, and you’d like to provide any kind of animated experience during that time, we recommend using a solid color background; from there, the app can move gracefully to the game’s first screen.

Consider the light and the dark

When someone launches your app, you want them to feel immersed — no matter their appearance settings. We’ve already addressed how to create adaptive launch screen storyboards, but it’s also important to think about a device’s appearance. If your app supports Dark Mode, your launch screen storyboard should as well. Make sure that your storyboard uses adaptive colors, and set the background of the view to the System Background Color.

Assess your assets

Anything you add to your launch screen storyboard should be optimized appropriately. If you want to add an asset to your storyboard, such as a static image that normally appears as part of your app’s user interface, make sure that its image dimensions are no larger than the view it’s going to be placed in. Your storyboard may not display if you use assets at larger resolutions.

Launch with a global audience in mind

Unlike your app’s interface, your app’s launch screen can’t be localized into other languages: Any text you display in your storyboard will remain in the original language you select. As such, it’s best to avoid including any text at all.


Resources

Watch “Optimizing app launch”

Learn more about designing with storyboards in the Developer Library

Learn more about launch screens in the Human Interface Guidelines

Learn how to create a Storyboard using Interface Builder

Learn more about responding to app launches in the Developer Library

Learn more about storyboards, scenes, and connections in the Xcode guide

Learn more about supporting Dark Mode in your interface in the Developer Library

Posted on Leave a comment

How to implement UI state restoration

People naturally multitask on their devices. Whether they’re switching from app to app, bringing together apps on iPad using Slide Over or Split View, or creating multiple windows of the same app, they should be able to pick up right where they left off — and UI state restoration is a core part of making that experience seamless.

When your app goes out of view, the app’s process is typically put on pause; it’s not given any more CPU time, which keeps the processor free for other tasks. If your app has background processes that are running, the system can even terminate those if an active app needs more resources than currently available.

Restoring the state of your UI is a crucial part of making your app feel responsive — and it’s especially important if you plan to support multiple windows in your iPadOS app. If you have a note-taking app that has four different notes open in different Split View pairings, for example, state restoration helps preserve each note, rather than returning someone to the main screen when they open one of the windows.

Two different types of scenes can be backgrounded and processes halted. These scenes’ states should be saved to restore later.

Meet NSUserActivity

NSUserActivity is a core part of modern state restoration with UIScene and UISceneDelegate: It provides a lightweight way to capture the state of your app and put it to use later, holding key information for both view controllers and important view states — information that can also be used when constructing view controllers for Handoff and Universal Linking.

While what you store in NSUserActivity is up to you, we recommend collecting only the bare minimum so that your app can quickly restore itself. Think of the most unique and simple way you can identify your view controller, like a clear identifier or URL. Include that information, and make sure you can identify where the view controller lives in your navigation and how content should appear within it. For example, when using an Xcode storyboard you may want to store and retrieve view controllers using restoration IDs.

Get started with UI state restoration

The best way to implement UI state restoration is to make your app scene-based, which requires iOS 13, iPadOS 13, Mac Catalyst 10.13, or tvOS 13 or later. (For more information on working with scenes in your app, check out the Developer Library.) Here’s how to get started with scene-based state restoration:

  1. Create a NSUserActivity object to save the app’s state. This can be created in your scene delegate.
  2. In this NSUserActivity, store relevant information (like the current navigation’s state, and view controllers that have been presented or pushed) along with your user’s intent.
  3. Return this NSUserActivity within stateRestorationActivity(for:) in the scene delegate.

You need to collect the right information in each UIScene to pick up where someone left off.

This NSUserActivity will now be stored inside the scene’s stateRestorationActivity property. When your app needs to restore its state, it should do so by looking for this saved NSUserActivity under scene(_:willConnectTo:options:) in the scene delegate.

What about the older view controller-based state restoration APIs?

If you need to support older versions of iOS, macOS, or tvOS, you can use older view controller-based APIs for state restoration via restoration classes and the app delegate. This also means if you want to update your app to adopt UIScene as well as implement UI state restoration across multiple versions of iOS, you will need to implement both scene-based and view-controller based APIs. However, we highly recommend building scene-based UI state restoration.

Compared to the older APIs, modern state restoration requires a different approach to how you define, save, and restore your UI state and your user’s intent. With a scene-based app, you have to separate events in an application’s life cycle and the scene’s life cycle, which means tracking changes also differs. Having multiple scenes means there are many more windows to track, each with unique user actions and navigation history. For some of those windows, you may choose not to restore state depending on their function, requiring state restoration to be more flexible and dependent on how you define the user’s intent.

Prior to the introduction of UIScene, each app had a singular life cycle.

If you can update your app to scene-based restoration and take advantage of NSUserActivity, you’ll also unlock easier pathways to implementing features like Spotlight search, Handoff, enabling Universal Links, and creating new scenes as primary or auxiliary windows. And you’ll provide a smoother and frictionless experience for people using your app, too.


Resources

Watch “Architecting your app for multiple windows”

Watch “Targeting content with multiple windows”

Watch “Window management in your multitasking app”

Learn more about restoring state in non-scene based apps

Explore sample code for restoring your app’s state

Posted on Leave a comment

The App Store Expands to 20 New Countries

You can now distribute your apps in 175 countries and regions on the App Store, allowing you to increase your impact and grow your business. As you deliver great experiences to an even more diverse audience, learn how you can localize your apps, product pages, and marketing materials to better connect with customers in different locations.

As a reminder, to allow your app to appear in these new countries, your membership Account Holder first needs to accept the updated Program License Agreement by signing in to their account on the Apple Developer website. If you have a Paid Applications Agreement, the Account Holder will also need to accept this updated agreement in App Store Connect. To make your app automatically available in all new countries, select the “New Countries or Regions” checkbox.

View your account

Learn about expanding to new markets

Posted on Leave a comment

Updated Guidelines for HealthKit

HealthKit allows your app to provide valuable health-related insights to users by working with the Apple Health app. The updated HealthKit Human Interface Guidelines include guidance on using the Apple Health icon in your app, enhanced editorial guidance on using Apple Health-related terms, and clarified privacy and data-usage guidelines.

View Human Interface Guidelines

Works with Apple Health badge now available. You can also now use the Works with Apple Health badge to promote your HealthKit-enabled apps. Download the badge and review the guidelines for using the badge on marketing communications.

Learn about the badge

Posted on Leave a comment

Meet the developer: Brian Mueller

Brian Mueller can make anything hilarious. Even the weather.

Brian Mueller is something of a Renaissance man. He single-handedly codes, designs, illustrates, and writes all of the dialogue for his wisecracking Carrot apps, which fall into categories that typically don’t have a lot of personality: to-do lists, alarm clocks, calorie counters.

To call his style droll would be an understatement. The exercise app Carrot Fit, for instance, implores you to “jump flabby human, jump for freedom!” in a deadpan robotic voice.


For more about Brian Mueller and his approach, check out this video interview where he details Carrot Weather’s evolution on Apple Watch.


Each Carrot app delivers surprising punch lines.

Carrot To-Do is equally sardonic — “It’s been 18 hours since you did anything useful” — while Carrot Weather takes liberties with its forecasts. “It’s a beautiful day! Ha ha, just kidding. It’s raining.”

A smack-talking to-do list app might not seem like the big idea that would let you quit your day job. In fact, Carrot’s success caught even Mueller off guard. “For some reason, people have responded to this. I still can’t believe sometimes any of this caught on,” he says.

Working out of a spare room in his Philadelphia-area home, the former aspiring screenwriter has penned thousands of lines of dialogue for his apps, which he constantly updates to nod to current events. (A recent one-liner from Carrot Weather: “Don’t tell anyone, but I regularly send bad weather to areas with high concentrations of stay-at-home order protesters.”)

Mueller is a one-man team, making half a dozen apps from home.

As for the inspiration for Carrot, Mueller credits those closest to him: his mom, sister, and wife — all of whom tease one another relentlessly.

“A lot of the dialogue for Carrot is drawn out of stuff that we’ve actually said to each other,” he says. “Every time my wife says something funny, I write it down for the apps. Sometimes she gets annoyed by that, but she’s a lot funnier than I am.”

Brian Mueller’s wife, Greta, is one of Carrot’s biggest inspirations.

When Mueller dreamed up the idea to create a character-driven app, he had zero coding experience. “I’m an English major with a creative-writing minor. I love to write and create characters and tell stories, but I had no real idea of what I would do with my life.”

Mueller’s first instinct was to hire a developer to realize his vision. “I didn’t want to sound like a jerk when talking to a programmer, so I bought a book on iOS programming for beginners, just to know what terms to use,” he says. As he read iOS Programming: The Big Nerd Ranch Guide, Mueller was surprised by how easy it is to make an app. By January 2013, Carrot To-Do had launched on the App Store. It took him about a month to create.

I love to write and create characters and tell stories, but I had no real idea of what I would do with my life.

Brian Mueller, Carrot creator

Initially, sales were tepid. It took a couple of years, and a few more apps, before Carrot found a broad-enough audience for Mueller to quit his day job and become a full-time developer.

The Carrot universe continues to expand. Mueller has built seven iOS apps and an iOS sticker pack, as well as Apple Watch, Apple TV, and Mac versions of Carrot Weather. With the arrival of AR (augmented reality) technologies on iOS, Mueller taught himself how to add an AR component to Carrot Weather. Now you can see the surly character Carrot as a spherical “ocular sensor” hovering in your surroundings. She turns red if you annoy her.

Watch Carrot float around your world in Carrot Weather’s AR mode.

Although being a one-man app shop isn’t easy, Mueller enjoys wearing all the hats. “When I hit a road block with coding, I can take a break and switch to writing or doing some design work,” he says. “I’m not stuck doing the same thing over and over.

“It’s a weird way to work, but I’m a bit of a perfectionist and it allows me to make exactly what I want.”

Originally published on the App Store.

Posted on Leave a comment

Upcoming price and tax changes in Barbados, Malaysia, Moldova, and Uzbekistan

When taxes or foreign exchange rates change, we sometimes need to update prices on the App Store. In the next few days, prices of apps on the App Store and in-app purchases (excluding auto-renewable subscriptions) will change in Barbados, Moldova, and Uzbekistan due to new value-added taxes. Your proceeds will be adjusted accordingly and will be calculated based on the tax-exclusive price.

A low value-added tax was also introduced in Malaysia. Prices on the App Store in Malaysia will not change and proceeds will be adjusted accordingly.

You can download the updated price tier charts now. Once these changes go into effect, the Pricing and Availability section of My Apps will be updated. You can change the price of your apps and in-app purchases (including auto-renewable subscriptions) at any time in App Store Connect. If you offer subscriptions, you can choose to preserve prices for existing subscribers.

View updated price tiers