Posted on Leave a comment

How to master multitasking and multiple windows for your iPad app

Multitasking is one of the many great features of iPadOS and gives people options and flexibility in how they want to interact with your app and others on iPad. They can browse your app in full screen, put it next to another app in Split View, pull it up in Slide Over, or even view multiple instances of your app side by side. Here are a few ways you can improve the look and feel of your iPad app for multitasking and multiple windows.

Make your app a multitasking master

Whether your app is running by itself, in a Slide Over pane, or side by side in Split View, it should always support a great multitasking experience. People expect apps on iPad to seamlessly adjust between size classes as they add or remove apps on their screen. When you design an adaptive UI, you can ensure that your controls and views remain visible and useable, whether your app is full screen or displaying in a compact view.

To make your view controllers and views responsive to changes in the iOS interface environment, override the traitCollectionDidChange(_:) method from the trait environment protocol. To customize view controller animations in response to interface environment changes, override the willTransition(to:with:) method of the UIContentContainer protocol.

Learn more about UI trait collections >

You can further guarantee people a flexible, adaptive experience by using tools like Auto Layout and safe area insets to ensure your app looks great no matter how it’s being used.

Read more about how you can make your app look great on every screen >

Multiply your windows

Starting with iPadOS 13, you can add support for creating multiple instances of your app. When you support multiple windows, your app gains additional versatility, allowing people to use it alongside itself or multiple other applications. For example, someone using a to-do app could view two lists from that app side by side in Split View; they could also create multiple Split View instances that pair one of their to-do lists alongside a Safari window, while another to-do list sits next to Mail.

To add multiple windows to your app, you create scenes for each instance of your user interface using UIScene. When you add support for UIScene, consider also implementing modern state restoration, which lets people come right back to what they were working on in your app rather than resetting to the main screen.

Learn more about modern state restoration >

Additionally, if you add multiple windows to iPad, that paves the way for multiple window support on Mac Catalyst if you’re also building a Mac app.

Learn more about designing for multiple windows >

Learn more about implementing multiple windows in your app >


Resources

Get started with multitasking >

Learn more about scenes >

Explore a sample project for supporting multiple windows on iPad >

Watch “Window Management in Your Multitasking App” >

Watch “Introducing Multiple Windows on iPad” >

Watch “Architecting Your App for Multiple Windows” >

Posted on Leave a comment

How to make your app look great on every screen

Imagine, for a moment: You’ve just spotted the perfect pair of shoes online. They’re the right color, they’re designed impeccably, and you can’t wait to get them delivered and on your feet. Except, wait — they’re only made in size 7. And sadly, while you might be able to cram your feet in and wear them on occasion, they won’t be comfortable enough for daily use.

Now, most shoe manufacturers don’t offer their shoes in just one size. Instead, when they create a new shoe model, they offer a range of sizes with the same design and functionality so that the customer can enjoy the one that fits best.

It’s the same for really great apps: When developing, you want to create an interface that adapts to a range of screen sizes with the same design and functionality for all. That way, whether someone uses iPhone SE or iPad Pro to view your app, they still get to have an enjoyable and comfortable experience.

Below, we’ve collected some of the best ways you can adapt your app’s interface so that it looks great, regardless of device.

Universal design

While you can design solely for specific platforms like iPhone, iPad, or Mac, consider creating a universal version of your app that supports multiple devices. This lets your customer choose how your app fits into their life, and it’s the most adaptive experience you can provide. Whether you’re creating apps designed for a single platform or multiple devices, however, they should support all available screen sizes and size classes for those devices.

Ready to launch

A great app experience starts with a universal launch screen: Designing the right one can make a world of difference in how quickly you can immerse people into your user interface. Use Xcode to create a launch screen storyboard — they’re flexible and support all device screen sizes, allowing you to use a single storyboard to manage your launch screens on every platform you support.

Learn more about designing launch screens for seamless starts >

Get into Auto Layout

When crafting your interface, Auto Layout can help you adapt to any screen size. It provides guidelines for your app that relate the positioning of one piece of content to any other content or views. This lets your content scale and reflow in the manner you intend it. Avoid using absolute screen coordinates, as those may result in off-center buttons or awkward content flow on different screen sizes.

Learn more about Auto Layout in the Developer Library >

Explore SwiftUI

If your app is built for iOS 13, iPadOS 13, watchOS 6, tvOS 13, or macOS Catalina, you may want to also consider implementing SwiftUI. The declarative nature of SwiftUI ensures that your content is adaptable out of the box, and that code is also often reusable when building apps for other Apple platforms.

Master multitasking

If you’re developing an app that supports iPad, remember that people can use it in a variety of ways: They can browse the app in full screen, put it next to another app in Split View, pull it up in Slide Over, or (if your app supports it) even view multiple windows side by side. Consider each of these size classes and how your interface can successfully adapt to provide the best experience.

Get started with multitasking >

Keep your content readable

It can be challenging to design for a great reading experience on all devices if you have text- or image-heavy content in your app. Let the Readable Content Guide do the heavy lifting for you: The layout guide defines an area that can easily be read without extra effort.

Learn more about the Readable Content Guide >

Additionally, make sure your reading experience is accessible. Many people prefer to change their text size to something other than the default. Supporting Dynamic Type ensures your text scales to what your customer has indicated they want. It also ensures that as the text gets larger or smaller, other on-screen elements dynamically move to accommodate these changes.

Learn more about designing with text weight and size in mind >

Learn more about scaling text set in a custom font >

Use safe areas when designing your interface to ensure your views will never over or underlap other content or hardware elements, regardless of device.

Learn more about safe areas and safeAreaLayoutGuide >

Craft your queries effectively

While it’s helpful — and often critical — to know the device capabilities on which your app is currently running, be mindful to avoid checking for a known set of devices and collating behaviors based on those results. Instead, query for feature availability and provide conditional paths based on the results of that check.

For example, when building an AR app, you can use the isSupported property of the appropriate ARConfiguration subclass to see whether a device supports a given configuration.

class var isSupported: Bool { get }

Preview your work

In Xcode 11, you can do a lot of your basic interface testing directly in Previews. This allows you to see how your interface handles different conditions, devices, and use cases. You can automatically see how Dynamic Type might render if your app is running on iPhone SE, for example, or view different localization options.

While Previews are designed to work with SwiftUI, you can also use them with your existing Swift or Obj-C views to make sure your UI remains adaptable as you change your code.


Resources

Watch “Mastering Xcode Previews” >

Learn more about SwiftUI >

Learn more about designing for adaptive interfaces >

Learn more about using typography on all screen sizes >

Posted on Leave a comment

Meet the developer: Panic

How Panic manages to find beauty in FTP and SSH.

It may be cool to be a developer these days, but that wasn’t always the case—especially not in 1998, when Cabel Sasser and Steven Frank started Panic. Running a fledgling software company was daunting and exhausting, but the duo was having so much fun they didn’t care.

“Steven once compared our relationship to that of R2-D2 and C-3PO,” Sasser says. “I roll around making strange noises and interfacing with things, while he stays the course, flapping his arms and fretting about protocol. But they need each other to succeed, right?”

Yes, even an FTP client can look great and be easy to use.

When Panic started, developers had to worry about more than coding a great app; they also had to figure out how and where they were going to sell it. The internet wasn’t the e-commerce juggernaut it is now. Developers needed to hit the streets.

“It’s almost impossible to comprehend now, but back in the day, if you wanted to sell an app, you had to manufacture boxes, sign up with an expensive distributor, try to get your boxed app onto the shelves at the computer store, and pay extra for placement on the endcap,” Sasser says.

With Transmit, the elegant FTP app Panic debuted in 1998, the company established what’s become a core principle: “Take a complicated thing and make it easy, beautiful, and powerful,” Sasser says.

Acknowledging that file-transfer apps aren’t exactly the most exciting, Sasser says he’s well aware that a lot of customers would be satisfied if Transmit simply did the bare minimum. An FTP app doesn’t have to wow you. Nor do Panic’s other apps, like Prompt, an SSH client, or Coda, a file manager and text editor.

But Sasser expects more. He wants Panic’s apps to appeal to your design sensibility as well.

Take a complicated thing and make it easy, beautiful, and powerful.

Panic cofounder Cabel Sasser

“The matrix is really simple: Too much design and you can alienate power users. Not enough and you’ll intimidate new users,” Sasser says. Striking the right balance applies to functionality as well. “Balancing design and functionality is one of the most difficult parts of our job.”

After decades spent developing software for the Mac, Sasser and Frank have earned the respect of customers and other developers alike. Sasser chalks this up to Panic’s core tenets: honesty, personality, and responsibility.

“As humans, we always know when a company is selling us some PR flimflam. It never works,” he says. “So we are always absolutely honest and up-front.”


Originally published on the App Store and Mac App Store.

Posted on Leave a comment

Ready. Set. Code.

On June 22, WWDC20 takes off. Get ready for the first global, all-online WWDC by downloading the Apple Developer app to stay notified on all the latest news, with updates for events and sessions. More announcements to come in early June.

And now through May 17, student developers from around the world can showcase their love of coding by submitting their own Swift playground to the Swift Student Challenge. Winners will receive an exclusive WWDC20 jacket and pin set.

Learn about the challenge

Posted on Leave a comment

Billing Grace Period Data Now Available in App Store Connect

The Sales and Trends section of App Store Connect now provides details about the number of subscribers in Billing Grace Period — a feature that lets subscribers with unsuccessful auto-renewals continue accessing your app’s paid content while Apple attempts to collect payment, allowing them time to fix the issue. New subscription events in Sales and Trends indicate the number of renewals and cancelations during Billing Grace Period, and the Subscription Report includes a new column with the total number of subscriptions in Billing Grace Period.

Get details on viewing subscriptions data

Posted on Leave a comment

Meet the developer: Shelley Taylor

RefAid supports migrants around the world.

In 2015, a 3-year-old Syrian boy named Aylan Kurdi drowned in the Mediterranean Sea trying to reach Europe with his family. The image of his body washed up on a beach in Lebanon devastated American startup veteran Shelley Taylor.

“These migrants are coming into Europe, they get here, and they don’t know how to find the basic things—the supermarket, shelter, the doctor,” says Taylor, CEO of Trellyz, which creates software for cities and nonprofits. “And I thought, they all have smartphones, maybe I can create something that will let them find what they need when they need it.”

Over a weekend she built RefAid—Refugee Aid App and launched it in the UK and Italy in February 2016. The app catalogs aid organizations’ services for migrants and refugees seeking to build a new life in Europe and, increasingly, the United States.

The app reduces its language barrier with icons in addition to words.

These days, the app is evolving from one designed to meet the basic daily survival needs of refugees to one able to tackle the many challenges of the mounting migrant crisis at the U.S. border and provide information during COVID-19.

Services have been added to address family separation, offering constantly updated intel about legal aid as well as geo-targeted push notifications with crucial on-the-ground information. For example, RefAid might send an alert with a phone number for free legal help in an area where migrants are being rounded up.

The app (which is now available in 25 countries, with some 5,000 aid organizations contributing) will soon include services in most U.S. states. Taylor and her team are constantly reaching out to more nonprofits and public service providers to include them in the app. Through a web-based content management system, they can manage and update their offerings and communicate directly with people.

These migrants are coming into Europe, they get here, and they don’t know how to find the basic things—the supermarket, shelter, the doctor.

Available in English, Arabic, Farsi, Spanish, and soon French, the app directs refugees (using geolocation) to aid within a 100-mile radius. The services are sorted by categories like legal, food, education, work, media, faith groups, psychological, and more.

Solving one problem at a time

Before launching RefAid, Taylor—who was raised in Palo Alto, California, but lives in Europe—needed to contact aid organizations and have them provide a list of services that could help migrants in need. She started with the United Nations High Commission for Refugees and the British Red Cross but quickly ran into a roadblock: Most of them didn’t readily know all of the services they provided.

The worldwide refugee crisis broke Shelley Taylor’s heart—so she made an app to help.

Taylor waited weeks for aid groups to get back to her. “We called them and said, ‘Did you change your mind? Where are your services? We just need a little spreadsheet.’” And they said, uniformly, ‘Oh, we have to call each of the offices to ask them because nothing is written down.”

Eventually, Taylor created what may be the first global database of nonprofit services. She doesn’t charge the organizations to use the app, covering the development and operating costs herself. “We didn’t want anyone to have an excuse to say no to putting their services on the app, because it’s such a huge problem and people really need help.”

Help finding help

Although RefAid doesn’t have the capacity to respond to real-time updates from refugees and migrants, Taylor has anticipated the needs of people arriving by either land or sea.

“When you come into Greece, for example, the organizations don’t have the right to go to the beach directly. They have to stay in their offices — that’s the law. But, if somebody has told migrants to look at the app, those migrants can discover that around the corner there’s a Red Cross office and food vouchers, which they couldn’t have found otherwise.”

Taylor in the French town of Calais, home to the notorious Calais Jungle refugee encampment where some 10,000 refugees sought shelter from 2015 to 2016.

The app is used primarily in the U.S., the UK, Belgium, France, Italy, and Greece. After the first attempted U.S. travel ban in January 2017, RefAid quickly deployed in 19 American cities, cataloging legal services nearby for those trapped at U.S. airports. In May 2018, 40 other cities—including Oslo, Athens, and Amsterdam—began listing their services.

During the current U.S. migrant crisis, new services from different aid organizations are being added daily. Some large resettlement organizations in the U.S., such as the International Refugee Committee, have actually started preloading cell phones with the RefAid app and giving them to migrants.

“It’s exciting to see how it’s growing,” Taylor says, “but we still haven’t mapped the whole world. And that’s our goal: to map all of the services available to refugees and everyone else in the whole world. It’s just a step at a time.”

Originally published on the App Store.

Posted on Leave a comment

How to support per-app language settings in your app

When you localize your app, people all over the world can view your content in the language they feel most comfortable reading. And with the latest versions of iOS and macOS, people can have even more control by choosing languages on a per-app basis. For example, someone may set their iPhone’s language to English, but want to use a social media app in Arabic.

Good news: If your project is built with iOS 13 or macOS Catalina and localized into more than one language, you won’t have to add any additional code to your app. Simply build and deploy your app to test.

Here’s how someone might check per-app language switching for a specific app, using AllTrails as an example.

  1. Open the Settings app.
  2. Navigate to AllTrails > Preferred Language > Language.
  3. Change the preferred language to Spanish.
  4. Launch AllTrails from your home screen (or from the App Switcher, if the app is already open).

Once someone has set their preferred languages for an app in Settings, it will then render accordingly in your app.

AllTrails will now render in Spanish, while the rest of the device continues to display the system language.

Restore your state after a change in the language setting

If someone decides mid-activity that they’d like to view your app in a different language, you can make the experience even smoother for them by restoring their previous state when they return. For example, say you’re living abroad and looking for food using a restaurant delivery app. By default, you use English, but might want to switch the app’s language when viewing a certain restaurant’s menu so that you can better understand its native dishes.

If that app supports state restoration, you can exit to the Settings app and return to the restaurant you were viewing — now in the new language. If not, you’ll have to start from the app’s main screen and find that restaurant again.

If your app supports scene-based state restoration, you can implement stateRestorationActivity(for scene) and return an NSUserActivity that encodes the scene state. (And if you still support view controller state restoration, you can enable state restoration on your app delegate.)


Learn more about implementing state restoration >


How to load custom content in the correct language

If you need to load content from other sources, such as a server, you can do so and ensure that you match the app’s language with a few bundle APIs.

Bundle.main.preferredLocalizations.first will get the system’s current language in priority order.

If you need to check against a custom set of available languages (say, from a server or other source), you can do so with a simple modification to the previous API call. First, find out what available languages there are:

let availableLanguages = Server.requestAvailableLanguages()

Then, use the preferredLocalization API with those languages:

Bundle.preferredLocalizations(from: availableLanguages).first.

If it’s not possible to have ongoing communication with the server due to connectivity or other constraints, you can also send the output of Bundle.main.preferredLocalizations.first to the server; that way, it will know which language the app has been launched in and deliver content accordingly.

How to transition away from a custom language selector in your app

With systemwide support for in-app language selectors, you no longer need to provide a way to select languages within your app if you support iOS 13 or macOS Catalina or later. If you currently offer such a UI, you should remove it to avoid customer confusion and potential conflict with the system.

If you’d like to guide people to the system settings for language selection, you can replace your app’s custom UI with a flow that launches directly into the Settings app on iOS.

On iOS, add the following:

UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)

On macOS, direct people to System Preferences > Language & Region to add a per-language setting for your app.


Resources

Watch “Creating Great Localized Experiences with Xcode 11” >

Learn more about expanding your app to new markets >

Get more resources for localization >

Posted on Leave a comment

Ready your app for a localized launch

Once you’ve localized your app, it’s time to get ready for an international and localized launch. Here’s how you can localize your App Store product page, set international pricing, and adapt your marketing strategy.

Localize your product page

Localize your App Store metadata, such as your app description, keywords, and screenshots, for each of the countries or territories in which you offer your app. You can also translate your app’s name and tailor your keywords to reflect the values of each market so your app might better resonate with the local audience.


Learn more about localizing your App Store information >

Learn more about optimizing your product page >


Learn about international payment methods and pricing

The App Store handles payment processing, so it’s easy to offer your content to users around the world. Users pay for your apps and in-app purchases with credit or debit cards, carrier billing, digital wallets, or App Store and iTunes gift cards, depending on regional availability.

When pricing your apps and in-app purchases, you’ll choose a price tier in App Store Connect that contains prices already adjusted appropriately for the market in each country or region. For auto-renewable subscriptions, you can choose from 200 price points across all available currencies and price tiers to offer appropriate pricing for each location.


Learn more about setting in-app purchase pricing >

Learn more about pricing subscriptions for each territory >


Adapt your marketing strategy

When launching your app in a new market, adapt your marketing strategy to the region to help your audience easily learn about your app and the value it provides. Research which social networks or other channels are most popular with local audiences, as these may vary significantly across markets, and use them to spread the word about your app. Localize any materials you use in your marketing and user acquisition efforts, such as screenshots, banners, and advertisements.

App Store Badges

Use the Download on the App Store badge in your communications as a clear call to action to download your app. Localized badges are available to let your international audience know that your app is tailored for them. Download badges from the App Store Marketing Guidelines.

Search Ads

In addition, you can drive discovery of your app with Apple Search Ads, which lets you promote your app at the top of relevant App Store search results in more than 59 countries and regions. See Search Ads to learn more and read developer success stories.


Resources

Learn more about expanding your app to new markets >

Get more resources for localization >

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 >