CINXE.COM
Detect bugs early with the static analyzer - WWDC21 - Videos - Apple Developer
<!DOCTYPE html> <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="utf-8" /> <meta name="Author" content="Apple Inc." /> <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> <link rel="shortcut icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" /> <link rel="mask-icon" href="/apple-logo.svg" color="#333333"> <link rel="stylesheet" href="/assets/styles/global.dist.css?01172423298" type="text/css" /> <link rel="stylesheet" href="/assets/styles/dark-mode.css?17182448067" type="text/css" media="(prefers-color-scheme: dark)" data-color-scheme="dark" /> <link rel="stylesheet" href="/assets/styles/localization.css?39172414191" type="text/css" /> <script src="/assets/scripts/lib/jquery/jquery-3.6.0.min.js?17182448067"></script> <script src="/assets/scripts/settings.js?17182448067"></script> <script src="/assets/scripts/language-locales.js?17182448067"></script> <script src="/assets/scripts/DeveloperBreadcrumbs.js?05182434080"></script> <script async src="/assets/scripts/lib/jquery/jquery.retinate.js?17182448067"></script> <script async src="/assets/scripts/global.js?17182448067"></script> <script async src="/assets/scripts/global-logout.js?17182448067"></script> <link rel="stylesheet" href="https://www.apple.com/wss/fonts?family=SF+Pro&v=2" type="text/css" /> <link rel="stylesheet" href="https://www.apple.com/wss/fonts?family=SF+Pro+Icons&v=1" type="text/css" /> <link rel="stylesheet" href="https://www.apple.com/wss/fonts?family=SF+Mono&v=2" type="text/css" /> <link rel="stylesheet" href="https://www.apple.com/wss/fonts?family=Apple+Icons&v=1" type="text/css" /> <title>Detect bugs early with the static analyzer - WWDC21 - Videos - Apple Developer</title> <meta name="omni_page" content="Detect bugs early with the static analyzer - WWDC21 - Videos" /> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <link type="text/css" rel="stylesheet" href="/videos/styles/videos.css?2"> <link type="text/css" rel="stylesheet" href="/videos/styles/video-overlay.css?2"> <meta name="description" content="Discover how Xcode can automatically track down infinite loops, unused code, and other issues before you even run your app. Learn how,..."> <meta property="og:url" content="https://developer.apple.com/videos/play/wwdc2021/10202/" /> <meta property="og:title" content="Detect bugs early with the static analyzer - WWDC21 - Videos - Apple Developer" /> <meta property="og:description" content="Discover how Xcode can automatically track down infinite loops, unused code, and other issues before you even run your app. Learn how,..." /> <meta property="og:site_name" content="Apple Developer" /> <meta property="og:type" content="website" /> <meta property="og:video" content="https://devstreaming-cdn.apple.com/videos/wwdc/2021/10202/3/1E0D5337-0542-423B-9775-7FB518B7707B/cmaf.m3u8" /> <meta property="og:video_secure_url" content="https://devstreaming-cdn.apple.com/videos/wwdc/2021/10202/3/1E0D5337-0542-423B-9775-7FB518B7707B/cmaf.m3u8" /> <meta property="og:video:type" content="vnd.apple.mpegURL" /> <meta property="og:video:width" content="1280" /> <meta property="og:video:height" content="720" /> <meta property="og:image" content="https://devimages-cdn.apple.com/wwdc-services/images/119/5113/5113_wide_250x141_2x.jpg" /> <meta property="og:locale" content="en_US" /> <meta itemprop="datePublished" content="2021-06-11"> <meta itemprop="uploadDate" content="2021-06-11"> <link rel="alternate" href="https://developer.apple.com/videos/play/wwdc2021/10202/" hreflang="en"> <link rel="alternate" href="https://developer.apple.com/kr/videos/play/wwdc2021/10202/" hreflang="ko-KR"> <link rel="alternate" href="https://developer.apple.com/cn/videos/play/wwdc2021/10202/" hreflang="zh-CN"> <link rel="alternate" href="https://developer.apple.com/jp/videos/play/wwdc2021/10202/" hreflang="ja-JP"> <link rel="canonical" href="https://developer.apple.com/videos/play/wwdc2021/10202/" /> </head> <body class="view-play theme-dark"> <script> const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches; if (window.Settings.preferredColorScheme) { const colorTheme = (window.Settings.preferredColorScheme === 'auto') && !prefersDark ? 'light' : (window.Settings.preferredColorScheme === 'light') ? 'light' : 'dark' document.body.setAttribute('data-color-scheme', colorTheme); } else { document.body.setAttribute('data-color-scheme', prefersDark ? 'dark' : 'light'); } </script> <style> /* footer */ html body[data-color-scheme='dark'] #main section.section.section-resources.bg-alt {background-color:var(--fill-tertiary);color:var(--glyph-gray);} html body[data-color-scheme='dark'] .developer-router-links {background-color:var(--fill-tertiary);color:var(--glyph-gray);} html body[data-color-scheme='dark'] .footer {background-color:var(--fill-tertiary);color:var(--glyph-gray-tertiary);} /* body backgrounds */ body[data-color-scheme='dark'].dmf {background-color: #000;} html body[data-color-scheme='dark'].dmf .bg-alt {background-color:var(--fill-tertiary);} html body[data-color-scheme='dark'].dmf .bg-blue {background-color:var(--fill-blue-secondary);} html body[data-color-scheme='dark'].dmf .bg-green-blue {background:linear-gradient(135deg, #65976d 0%, #588ea4 100%)} html body[data-color-scheme='dark'].dmf .bg-yellow {background: linear-gradient(to bottom, var(--fill-tertiary) 0%, var(--fill-tertiary-alt) 100%);} html body[data-color-scheme='dark'].dmf .bg-light {background-color:var(--fill-secondary-alt);} html body[data-color-scheme='dark'].dmf .bg-gradient, html body[data-color-scheme='dark'].dmf .bg-grad {background:linear-gradient(to bottom, var(--dark) 0%, var(--fill-gray-secondary-alt) 100%);} html body[data-color-scheme='dark'].dmf .bg-grad-down {background:linear-gradient(to bottom, var(--dark) 0%, var(--fill-gray-secondary-alt) 100%);} html body[data-color-scheme='dark'].dmf .bg-grad-up {background:linear-gradient(to bottom, var(--fill-gray-secondary-alt) 0%, var(--dark) 100%);} html body[data-color-scheme='dark'].dmf .bg-blue-gradient, html body[data-color-scheme='dark'].dmf .bg-gradient-blue {background:linear-gradient(to bottom, var(--fill-blue-gradient-light) 0%, var(--fill-blue-gradient-dark) 100%);} html body[data-color-scheme='dark'].dmf .bg-blue-gradient-alt {background: linear-gradient(90deg, #061830 0%, #102d48 100%);} /* globalNav */ html body[data-color-scheme='dark'] #ac-globalnav {background: var(--fill-tertiary);} /* localNav */ html body[data-color-scheme='dark'] .localnav.localnav-scrim .localnav-background, html body[data-color-scheme='dark'] .localnav-scrim.localnav.localnav-background { background-color: rgba(29, 29, 31, 0.9); } @supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)) { html body[data-color-scheme='dark'] .localnav.localnav-scrim .localnav-background, html body[data-color-scheme='dark'] .localnav-scrim.localnav.localnav-background { background-color: rgba(29, 29, 31, 0.72); } } </style> <link rel="stylesheet" href="/assets/styles/globalnav.css?55202406207" type="text/css" /> <link rel="stylesheet" href="/assets/styles/suggest-lang.css?17182448067" type="text/css" /> <div id="suggest-lang" class="ribbon hide" lang="en"> <div class="ribbon-content-wrapper"> <div class="ribbon-content row"> <div class="column large-12 large-centered"> <p><a href="#" id="suggest-link" class="ribbon-link more">View in English</a></p> <button id="suggest-closer" class="icon icon-after icon-reset" aria-label="Dismiss language suggestion" tabindex="0"></button> </div> </div> </div> </div> <script src="/assets/scripts/suggest-lang.js?17182448067"></script> <aside id="ac-gn-segmentbar" class="ac-gn-segmentbar" lang="en-US" dir="ltr"> </aside> <input type="checkbox" id="ac-gn-menustate" class="ac-gn-menustate" /> <nav id="ac-globalnav" class="no-js" role="navigation" aria-label="Global" data-hires="false" data-analytics-region="global nav" lang="en-US" dir="ltr" data-www-domain="www.apple.com" data-store-locale="us" data-store-root-path="/us" data-store-api="/[storefront]/shop/bag/status" data-search-locale="en_US" data-search-suggestions-api="/search-services/suggestions/" data-search-defaultlinks-api="/search-services/suggestions/defaultlinks/" data-search-suggestions-enabled="false"> <div class="ac-gn-content"> <ul class="ac-gn-header"> <li class="ac-gn-item ac-gn-menuicon"> <label class="ac-gn-menuicon-label" for="ac-gn-menustate" aria-hidden="true"> <span class="ac-gn-menuicon-bread ac-gn-menuicon-bread-top"> <span class="ac-gn-menuicon-bread-crust ac-gn-menuicon-bread-crust-top"></span> </span> <span class="ac-gn-menuicon-bread ac-gn-menuicon-bread-bottom"> <span class="ac-gn-menuicon-bread-crust ac-gn-menuicon-bread-crust-bottom"></span> </span> </label> <a href="#ac-gn-menustate" role="button" class="ac-gn-menuanchor ac-gn-menuanchor-open" id="ac-gn-menuanchor-open"> <span class="ac-gn-menuanchor-label">Global Nav Open Menu</span> </a> <a href="#" role="button" class="ac-gn-menuanchor ac-gn-menuanchor-close" id="ac-gn-menuanchor-close"> <span class="ac-gn-menuanchor-label">Global Nav Close Menu</span> </a> </li> <li class="ac-gn-item ac-gn-apple"> <a class="ac-gn-link ac-gn-link-apple-developer" href="/" data-analytics-title="appledeveloper home" id="ac-gn-firstfocus-small"> <span class="ac-gn-link-text">Apple Developer</span> </a> </li> </ul> <div class="ac-gn-search-placeholder-container" role="search"> <div class="ac-gn-search ac-gn-search-small"> <a id="ac-gn-link-search-small" class="ac-gn-link" href="/search/" data-analytics-title="search" data-analytics-click="search" data-analytics-intrapage-link aria-label="Search"> <div class="ac-gn-search-placeholder-bar"> <div class="ac-gn-search-placeholder-input"> <div class="ac-gn-search-placeholder-input-text" aria-hidden="true"> <div class="ac-gn-link-search ac-gn-search-placeholder-input-icon"></div> <span class="ac-gn-search-placeholder">Search</span> </div> </div> <div class="ac-gn-searchview-close ac-gn-searchview-close-small ac-gn-search-placeholder-searchview-close"> <span class="ac-gn-searchview-close-cancel" aria-hidden="true">Cancel</span> </div> </div> </a> </div> </div> <ul class="ac-gn-list"> <li class="ac-gn-item ac-gn-apple"> <a class="ac-gn-link ac-gn-link-apple-developer" href="/" data-analytics-title="appledeveloper home" id="ac-gn-firstfocus"> <span class="ac-gn-link-text">Apple Developer</span> </a> </li> <li class="ac-gn-item ac-gn-item-menu ac-gn-news"> <a class="ac-gn-link ac-gn-link-news" href="/news/" data-analytics-title="news"> <span class="ac-gn-link-text">News</span> </a> </li> <li class="ac-gn-item ac-gn-item-menu ac-gn-discover"> <a class="ac-gn-link ac-gn-link-discover" href="/discover/" data-analytics-title="discover"> <span class="ac-gn-link-text">Discover</span> </a> </li> <li class="ac-gn-item ac-gn-item-menu ac-gn-design"> <a class="ac-gn-link ac-gn-link-design" href="/design/" data-analytics-title="design"> <span class="ac-gn-link-text">Design</span> </a> </li> <li class="ac-gn-item ac-gn-item-menu ac-gn-develop"> <a class="ac-gn-link ac-gn-link-develop" href="/develop/" data-analytics-title="develop"> <span class="ac-gn-link-text">Develop</span> </a> </li> <li class="ac-gn-item ac-gn-item-menu ac-gn-distribute"> <a class="ac-gn-link ac-gn-link-distribute" href="/distribute/" data-analytics-title="distribute"> <span class="ac-gn-link-text">Distribute</span> </a> </li> <li class="ac-gn-item ac-gn-item-menu ac-gn-dsupport"> <a class="ac-gn-link ac-gn-link-dsupport" href="/support/" data-analytics-title="dsupport"> <span class="ac-gn-link-text">Support</span> </a> </li> <li class="ac-gn-item ac-gn-item-menu ac-gn-account"> <a class="ac-gn-link ac-gn-link-account" href="/account/" data-analytics-title="account"> <span class="ac-gn-link-text">Account</span> </a> </li> <li class="ac-gn-item ac-gn-item-menu ac-gn-search" role="search"> <a id="ac-gn-link-search" class="ac-gn-link ac-gn-link-search" href="/search/" data-analytics-title="search" data-analytics-click="search" data-analytics-intrapage-link aria-label="Search"></a> </li> </ul> <aside id="ac-gn-searchview" class="ac-gn-searchview" role="search" data-analytics-region="search"> <div class="ac-gn-searchview-content"> <div class="ac-gn-searchview-bar"> <div class="ac-gn-searchview-bar-wrapper"> <form id="ac-gn-searchform" class="ac-gn-searchform" action="/search/" method="get"> <div class="ac-gn-searchform-wrapper"> <input id="ac-gn-searchform-input" class="ac-gn-searchform-input" type="text" name="q" aria-label="Search" placeholder="Search" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="true" aria-owns="quicklinks suggestions" /> <button id="ac-gn-searchform-submit" class="ac-gn-searchform-submit" type="submit" disabled aria-label="Submit Search"></button> <button id="ac-gn-searchform-reset" class="ac-gn-searchform-reset" type="reset" disabled aria-label="Clear Search"> <span class="ac-gn-searchform-reset-background"></span> </button> </div> </form> <button id="ac-gn-searchview-close-small" class="ac-gn-searchview-close ac-gn-searchview-close-small" aria-label="Cancel Search"> <span class="ac-gn-searchview-close-cancel" aria-hidden="true"> Cancel </span> </button> </div> </div> <aside id="ac-gn-searchresults" class="ac-gn-searchresults hidden" data-string-quicklinks="Quick Links" data-string-suggestions="Suggested Searches" data-string-noresults=""> <section class="ac-gn-searchresults-section ac-gn-searchresults-section-defaultlinks"> <div class="ac-gn-searchresults-section-wrapper"> <div class="search-group-checkbox hidden"><input id="group-input" type="checkbox" name="group-filter" checked>Only search within “<span id="group-search-label"></span>”</div> <h3 class="ac-gn-searchresults-header ac-gn-searchresults-animated">Quick Links</h3> <ul class="ac-gn-searchresults-list" id="defaultlinks" role="listbox"> </ul> <span role="status" class="ac-gn-searchresults-count" aria-live="polite">5 Quick Links</span> </div> </section> </aside> </div> <button id="ac-gn-searchview-close" class="ac-gn-searchview-close" aria-label="Cancel Search"> <span class="ac-gn-searchview-close-wrapper"> <span class="ac-gn-searchview-close-left"></span> <span class="ac-gn-searchview-close-right"></span> </span> </button> </aside> </div> </nav> <div class="ac-gn-blur"></div> <div id="ac-gn-curtain" class="ac-gn-curtain"></div> <div id="ac-gn-placeholder" class="ac-nav-placeholder"></div> <script src="/assets/scripts/ac-globalnav.built.js?17182448067"></script> <link rel="stylesheet" href="/assets/styles/search.css?17182448067"> <script src="/assets/scripts/search.js?17182448067"></script> <!-- metrics --> <script> /* RSID: */ var s_account="awdappledeveloper" </script> <script src="/assets/metrics/scripts/analytics.js?072620243"></script> <script> s.pageName= AC && AC.Tracking && AC.Tracking.pageName(); s.channel="www.en.developer" s.channel="www.videos.developer"; /************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/ var s_code=s.t();if(s_code)document.write(s_code) </script> <!-- /metrics --> <link rel="stylesheet" property="stylesheet" href="/assets/styles/localnav.css" type="text/css" /> <input type="checkbox" id="localnav-menustate" class="localnav-menustate"/> <nav id="localnav" class="localnav localnav-scrim theme-dark" data-sticky role="navigation"> <div class="localnav-wrapper"> <div class="localnav-background"></div> <div class="localnav-content"> <h2 class="localnav-title"> <a href="/videos/">Videos</a> </h2> <div class="localnav-menu"> <a href="#localnav-menustate" class="localnav-menucta-anchor localnav-menucta-anchor-open" id="localnav-menustate-open"> <span class="localnav-menucta-anchor-label">Open Menu</span> </a> <a href="#" class="localnav-menucta-anchor localnav-menucta-anchor-close" id="localnav-menustate-close"> <span class="localnav-menucta-anchor-label">Close Menu</span> </a> <div class="localnav-menu-tray"> <ul class="localnav-menu-items"> <li class="localnav-menu-item"> <a href="/videos/" class="localnav-menu-link">Collection</a> </li> <li class="localnav-menu-item"> <a href="/videos/topics/" class="localnav-menu-link">Topics</a> </li> <li class="localnav-menu-item"> <a href="/videos/all-videos/" class="localnav-menu-link">All Videos</a> </li> <li class="localnav-menu-item"> <a href="/videos/about/" class="localnav-menu-link">About</a> </li> </ul> </div> <div class="localnav-actions localnav-actions-center"> <div class="localnav-action localnav-action-menucta" aria-hidden="true"> <label for="localnav-menustate" class="localnav-menucta"> <span class="localnav-menucta-chevron"></span> </label> </div> </div> </div> </div> </div> </nav> <label id="localnav-curtain" for="localnav-menustate"></label> <script src="/assets/scripts/ac-localnav.built.js"></script> <script type="text/javascript" src="/assets/scripts/localnav.js"></script> <main id="main" class="main theme-dark" role="main"> <section class="bg-dark"> <section class="grid"> <section class="row"> <section class="column large-10 small-12 padding-top-small large-centered no-padding-bottom"> <!-- back link --> <p class="back-link smaller"> <a class="icon icon-before icon-chevronleft" href="/videos/">More Videos</a> </p> </section> </section> <!-- video player --> <section class="video-wrapper row"> <section class="column large-10 small-12 padding-top-small padding-bottom-small large-centered"> <div class="developer-video-player"> <div id="video-status-overlay" class="developer-video-overlay" style="display: none"> <div class="video-status-content"> <div id="video-status-text"></div> <img class="video-status-icon" id="icon-backward" src="/assets/elements/icons/symbols/gobackward5.svg" style="display: none" /> <img class="video-status-icon" id="icon-forward" src="/assets/elements/icons/symbols/goforward5.svg" style="display: none" /> </div> </div> <video id="video" class="video large-centered" controls="" src="https://devstreaming-cdn.apple.com/videos/wwdc/2021/10202/3/1E0D5337-0542-423B-9775-7FB518B7707B/cmaf.m3u8" data-id="wwdc2021-10202" data-locale="en"></video> </div> <div class="no-video-banner hidden"> <div class="no-video-copy"> <p>Streaming is available in most browsers,<br> and in the Developer app.</p> </div> </span> </div> </section> </section> </section> </section> <section class="grid"> <!-- tab menu --> <section class="tab-menu row divider-bottom"> <section class="column large-10 small-12 padding-top-small padding-bottom-small large-centered"> <ul class="tabs"> <li class="tab" data-supplement-id="details"><a href="#"><span class="smaller">Overview</span></a></li> <li class="tab" data-supplement-id="transcript"><a href="#"><span class="smaller">Transcript</span></a></li> <li class="tab right active" data-supplement-id="search"> <!-- mobile search --> <a href="#"><span><!--icon--></span></a> <!-- desktop search --> <section class="searchbar-wrapper desktop" style="opacity:0;"> <button class="search-icon"></button> <input id="searchDesktop" class="active" type="text" autocomplete="off" placeholder="Search this video…"> </section> </li> <section class="searchbar-wrapper mobile"> <input class="active" type="text" autocomplete="off" placeholder="Search this video…"> </section> </ul> </section> </section> <!-- supplements --> <section class="row"> <section class="column large-10 small-12 large-centered no-padding-top no-padding-bottom"> <ul class="supplements hidden"> <!-- details --> <li class="supplement details " data-supplement-id="details"> <h1>Detect bugs early with the static analyzer</h1> <p>Discover how Xcode can automatically track down infinite loops, unused code, and other issues before you even run your app. Learn how, with a single click, Xcode can analyze your project to discover security issues, logical bugs, and other hard-to-spot errors in Objective-C, C, and C++. We'll show you how to use the static analyzer to save you time investigating bug reports and improve your app's overall quality.</p> <h2>Resources</h2> <ul class="links small"> <li class="download"> <ul class="options"> <li><a href="https://devstreaming-cdn.apple.com/videos/wwdc/2021/10202/3/1E0D5337-0542-423B-9775-7FB518B7707B/downloads/wwdc2021-10202_hd.mp4?dl=1">HD Video</a></li> <li><a href="https://devstreaming-cdn.apple.com/videos/wwdc/2021/10202/3/1E0D5337-0542-423B-9775-7FB518B7707B/downloads/wwdc2021-10202_sd.mp4?dl=1">SD Video</a></li> </ul> </li> </ul> <div class="divider-top margin-top-small padding-bottom-small"></div> <h2>Related Videos</h2> <h4>WWDC19</h4> <ul class="links small"> <li class="video"> <a href="/videos/play/wwdc2019/409">What's New in Clang and LLVM</a> </li> </ul> </li> <!-- transcript --> <li class="supplement transcript" data-supplement-id="transcript" data-shortcut-base-url="/videos/play/wwdc2021/10202/"> <section> <div class="margin-bottom-small download-transcript"><span id="get-transcript" class="icon icon-before icon-downloadcircle">Download</span></div> <p><span class="sentence"><span data-start="0.0"> </span></span><span class="sentence"><span data-start="3.0">♪ ♪ </span></span><span class="sentence"><span data-start="9.0">I am Ravi Kandadai Madhavan, </span></span><span class="sentence"><span data-start="10.0">and in this video, </span></span><span class="sentence"><span data-start="11.0">I will show how to use the static analyzer </span></span><span class="sentence"><span data-start="13.0">in Xcode to find and fix bugs in your apps. </span></span><span class="sentence"><span data-start="17.0">First, I will demonstrate how to use </span></span><span class="sentence"><span data-start="19.0">the static analyzer to find bugs and also understand them. </span></span><span class="sentence"><span data-start="23.0">Then, I will describe the new checks in Xcode 13, </span></span><span class="sentence"><span data-start="26.0">which can help find more kinds of issues in your code. </span></span><span class="sentence"><span data-start="30.0">Finally, I will describe the ways </span></span><span class="sentence"><span data-start="31.0">in which you can customize the analyzer </span></span><span class="sentence"><span data-start="33.0">to better integrate it with your development workflow. </span></span><span class="sentence"><span data-start="37.0">Let's now see how to use the analyzer to find bugs. </span></span><span class="sentence"><span data-start="41.0">The static analyzer is a tool in Xcode that can discover bugs </span></span><span class="sentence"><span data-start="44.0">by analyzing the source code without running it, </span></span><span class="sentence"><span data-start="48.0">so it can reveal bugs, even before you do </span></span><span class="sentence"><span data-start="50.0">testing and quality assurance of your app. </span></span><span class="sentence"><span data-start="54.0">It can also find problems in code paths </span></span><span class="sentence"><span data-start="56.0">that are rare and not covered by tests. </span></span><span class="sentence"><span data-start="59.0">The analyzer finds bugs in C/C++ and Objective-C code, </span></span><span class="sentence"><span data-start="63.0">even in mixed Swift and Objective-C projects. </span></span><span class="sentence"><span data-start="66.0">Let us see the analyzer in action </span></span><span class="sentence"><span data-start="68.0">using an app I am developing. </span></span><span class="sentence"><span data-start="71.0">I am trying to improve an existing app written in Swift </span></span><span class="sentence"><span data-start="73.0">and Objective-C that allows exploring the solar system. </span></span><span class="sentence"><span data-start="78.0">This is the Xcode project for the app. </span></span><span class="sentence"><span data-start="81.0">I am going to run the Static Analyzer to see </span></span><span class="sentence"><span data-start="83.0">if it finds anything wrong with my code. </span></span><span class="sentence"><span data-start="86.0">It's very easy to run. </span></span><span class="sentence"><span data-start="87.0">Just go to Product and choose Analyze, </span></span><span class="sentence"><span data-start="90.0">or use the keyboard shortcut Command-Shift-B.</p><p></span></span><span class="sentence"><span data-start="96.0">You can see the analyzer running in the status bar of Xcode. </span></span><span class="sentence"><span data-start="100.0">Analyzing your project is very similar to building it. </span></span><span class="sentence"><span data-start="104.0">The analyzer scans all the sources files in the targets </span></span><span class="sentence"><span data-start="107.0">of the currently-active scheme looking for bugs. </span></span><span class="sentence"><span data-start="111.0">As you see in the status, </span></span><span class="sentence"><span data-start="112.0">the analyzer has found an issue in my project. </span></span><span class="sentence"><span data-start="115.0">I can go to Xcode's issue navigator </span></span><span class="sentence"><span data-start="117.0">to learn more about it. </span></span><span class="sentence"><span data-start="120.0">As I showed you, all it takes to run </span></span><span class="sentence"><span data-start="122.0">the analyzer on your project is a single click. </span></span><span class="sentence"><span data-start="125.0">And with this single click, you can find </span></span><span class="sentence"><span data-start="127.0">several kinds of bugs, like security issues, </span></span><span class="sentence"><span data-start="131.0">logical bugs, misuse of APIs, and many more. </span></span><span class="sentence"><span data-start="135.0">The analyzer can not only find bugs, </span></span><span class="sentence"><span data-start="138.0">but can also explain them. </span></span><span class="sentence"><span data-start="140.0">Let's get back to the bug found in my app </span></span><span class="sentence"><span data-start="142.0">and try to understand it. </span></span><span class="sentence"><span data-start="144.0">The problem here is that the Objective-C method </span></span><span class="sentence"><span data-start="146.0">positionAtDate is returning nil when it is not supposed to. </span></span><span class="sentence"><span data-start="151.0">The method's return value is declared to be non-null </span></span><span class="sentence"><span data-start="154.0">in the method's definition. </span></span><span class="sentence"><span data-start="156.0">But now, I want to understand how </span></span><span class="sentence"><span data-start="158.0">this method is returning nil. </span></span><span class="sentence"><span data-start="161.0">You can expand the analyzer issues </span></span><span class="sentence"><span data-start="163.0">and see the sequence of events that lead to the bug. </span></span><span class="sentence"><span data-start="166.0">The events are also shown in the editor, </span></span><span class="sentence"><span data-start="169.0">alongside the statements where they happen. </span></span><span class="sentence"><span data-start="172.0">The arrows show how the events are ordered. </span></span><span class="sentence"><span data-start="175.0">I find it easier to read these reports from bottom to top. </span></span><span class="sentence"><span data-start="180.0">The last event shows </span></span><span class="sentence"><span data-start="181.0">that the returned value, position, is nil. </span></span><span class="sentence"><span data-start="185.0">The previous events show that this is because the method </span></span><span class="sentence"><span data-start="188.0">regularPositionAtDate, meant to initialize position, </span></span><span class="sentence"><span data-start="191.0">is not called because its receiver object is nil.</p><p></span></span><span class="sentence"><span data-start="196.0">Looking at the arrows, this happens along </span></span><span class="sentence"><span data-start="198.0">the default case of the switch. </span></span><span class="sentence"><span data-start="201.0">Going back to the beginning of the report reveals </span></span><span class="sentence"><span data-start="203.0">that the receiver object is initialized to nil </span></span><span class="sentence"><span data-start="206.0">and remains so along the default case. </span></span><span class="sentence"><span data-start="209.0">Now, I understand that I haven't handled objects that are not </span></span><span class="sentence"><span data-start="213.0">spherical or irregular within the switch.</p><p></span></span><span class="sentence"><span data-start="217.0">To fix this, I am going to make </span></span><span class="sentence"><span data-start="219.0">the default case identical to the spherical case. </span></span><span class="sentence"><span data-start="223.0">I will rerun the analyzer to make sure the issue is fixed.</p><p></span></span><span class="sentence"><span data-start="228.0">I am quite relieved that this bug </span></span><span class="sentence"><span data-start="229.0">is detected while I am developing the app. </span></span><span class="sentence"><span data-start="232.0">This is because returning nil from an Objective-C method </span></span><span class="sentence"><span data-start="236.0">annotated as returning a non-null value </span></span><span class="sentence"><span data-start="238.0">can result in unexpected runtime behavior when the method </span></span><span class="sentence"><span data-start="242.0">is called from Swift, which happens in my code. </span></span><span class="sentence"><span data-start="246.0">Thankfully, running the static analyzer has revealed </span></span><span class="sentence"><span data-start="248.0">this bug before it could affect the users of my app. </span></span><span class="sentence"><span data-start="252.0">In Xcode 13, we have made the analyzer even better, </span></span><span class="sentence"><span data-start="256.0">and we have some brand-new checks for you. </span></span><span class="sentence"><span data-start="259.0">The analyzer can now catch more logic bugs in your code. </span></span><span class="sentence"><span data-start="263.0">It can detect infinite loops and redundant code, </span></span><span class="sentence"><span data-start="266.0">such as unnecessary branch conditions. </span></span><span class="sentence"><span data-start="270.0">It can report side-effects in asserts, and in C++ code, </span></span><span class="sentence"><span data-start="274.0">it can catch errors in the use of move and forward operators. </span></span><span class="sentence"><span data-start="279.0">Parts of these new checks are open-source contributions </span></span><span class="sentence"><span data-start="281.0">made to Apple's Clang compiler. </span></span><span class="sentence"><span data-start="284.0">Let's see some examples of bugs these new checks can catch. </span></span><span class="sentence"><span data-start="289.0">In general, it's a good practice to use asserts to validate </span></span><span class="sentence"><span data-start="292.0">your expectations about your code. </span></span><span class="sentence"><span data-start="295.0">However, you must make sure </span></span><span class="sentence"><span data-start="297.0">that asserts do not have side effects, </span></span><span class="sentence"><span data-start="299.0">such as writing to variables or memory. </span></span><span class="sentence"><span data-start="302.0">For example, consider the code snippet </span></span><span class="sentence"><span data-start="304.0">shown here that traverses an array </span></span><span class="sentence"><span data-start="306.0">of astronomical objects and counts the number </span></span><span class="sentence"><span data-start="308.0">of those that have associated moons. </span></span><span class="sentence"><span data-start="311.0">It has an NSAssert that checks that the number of objects </span></span><span class="sentence"><span data-start="314.0">with moons is less than or equal to the number of planets. </span></span><span class="sentence"><span data-start="318.0">But the assert has a side effect of incrementing </span></span><span class="sentence"><span data-start="320.0">the counter tracking the objects with moons. </span></span><span class="sentence"><span data-start="323.0">Updates like this can be lost in the release </span></span><span class="sentence"><span data-start="326.0">build configuration, where asserts could </span></span><span class="sentence"><span data-start="328.0">be disabled to make your code run faster. </span></span><span class="sentence"><span data-start="332.0">So this code may not increment the counter </span></span><span class="sentence"><span data-start="334.0">at all in release builds. </span></span><span class="sentence"><span data-start="336.0">It's easy to miss bugs like these during development, </span></span><span class="sentence"><span data-start="339.0">as they do not show up in debug builds. </span></span><span class="sentence"><span data-start="342.0">Starting Xcode 13, the analyzer can find </span></span><span class="sentence"><span data-start="345.0">such issues in your code and report it. </span></span><span class="sentence"><span data-start="348.0">This check works not just for NSAsserts, </span></span><span class="sentence"><span data-start="351.0">but also for asserts in C and C++. </span></span><span class="sentence"><span data-start="354.0">These bugs are easy to fix, </span></span><span class="sentence"><span data-start="356.0">and you just move the side effect </span></span><span class="sentence"><span data-start="358.0">outside of the assert, as shown here.</p><p></span></span><span class="sentence"><span data-start="362.0">Infinite loops are another common bug. </span></span><span class="sentence"><span data-start="365.0">You might have seen it happen </span></span><span class="sentence"><span data-start="366.0">when there are loops with complex logic. </span></span><span class="sentence"><span data-start="370.0">For instance, the nested loop shown here tries </span></span><span class="sentence"><span data-start="372.0">to populate a two-dimensional grid with a value. </span></span><span class="sentence"><span data-start="377.0">It hides a bug where the variable value </span></span><span class="sentence"><span data-start="380.0">is incremented by the inner loop instead of column, </span></span><span class="sentence"><span data-start="383.0">which is the actual loop counter. </span></span><span class="sentence"><span data-start="386.0">The analyzer can now detect such mistakes and explain it to you.</p><p></span></span><span class="sentence"><span data-start="391.0">Once you spot it, this bug is very easy to fix. </span></span><span class="sentence"><span data-start="394.0">Just replace value by column. </span></span><span class="sentence"><span data-start="398.0">Though these checks find simple mistake, </span></span><span class="sentence"><span data-start="400.0">we have found real bugs with them. </span></span><span class="sentence"><span data-start="402.0">Now you can use them, too, and find bugs </span></span><span class="sentence"><span data-start="404.0">and fix them as you develop your app. </span></span><span class="sentence"><span data-start="407.0">Xcode offers many customizations for fine tuning the analyzer </span></span><span class="sentence"><span data-start="411.0">to fit in with your development workflow. </span></span><span class="sentence"><span data-start="413.0">You can make the analyzer run along with every build </span></span><span class="sentence"><span data-start="416.0">of your project from the project's build settings. </span></span><span class="sentence"><span data-start="419.0">To quickly narrow down on the relevant settings, </span></span><span class="sentence"><span data-start="422.0">make use of the search functionality. </span></span><span class="sentence"><span data-start="424.0">For example, using "analysis" as the search keyword, </span></span><span class="sentence"><span data-start="427.0">I can look at just those options relevant to the analyzer.</p><p></span></span><span class="sentence"><span data-start="432.0">To enable Analyze During 'Build', </span></span><span class="sentence"><span data-start="434.0">all you need to do is turn on a build setting. </span></span><span class="sentence"><span data-start="437.0">Like incremental builds, the analysis runs </span></span><span class="sentence"><span data-start="440.0">only on files that are modified. </span></span><span class="sentence"><span data-start="442.0">This makes running the analyzer after code changes </span></span><span class="sentence"><span data-start="445.0">both fast and easy. </span></span><span class="sentence"><span data-start="448.0">The analyzer offers two modes of analysis: shallow and deep. </span></span><span class="sentence"><span data-start="453.0">Shallow mode is faster, but avoids exploring </span></span><span class="sentence"><span data-start="456.0">bugs spanning multiple functions. </span></span><span class="sentence"><span data-start="459.0">Use this mode in projects </span></span><span class="sentence"><span data-start="460.0">that are sensitive to build and analysis times. </span></span><span class="sentence"><span data-start="464.0">As I mentioned earlier, the analyzer has checks </span></span><span class="sentence"><span data-start="466.0">for finding different kinds of bugs, </span></span><span class="sentence"><span data-start="468.0">and some of them are opt-in. </span></span><span class="sentence"><span data-start="471.0">You can fine tune the checks </span></span><span class="sentence"><span data-start="472.0">that suit your project by enabling or disabling them </span></span><span class="sentence"><span data-start="475.0">selectively from the build settings. </span></span><span class="sentence"><span data-start="478.0">For instance, if your project has security-critical code, </span></span><span class="sentence"><span data-start="481.0">enable the checks for security issues. </span></span><span class="sentence"><span data-start="485.0">On the other hand, if you find that some issues </span></span><span class="sentence"><span data-start="487.0">are not relevant to your code, you can disable less useful </span></span><span class="sentence"><span data-start="491.0">checks individually and still benefit from the other checks.</p><p></span></span><span class="sentence"><span data-start="497.0">You can also analyze a single file </span></span><span class="sentence"><span data-start="499.0">instead of the entire project. </span></span><span class="sentence"><span data-start="502.0">Choose the file to analyze from the Product > Perform Action menu. </span></span><span class="sentence"><span data-start="506.0">Use this to check your changes quickly, </span></span><span class="sentence"><span data-start="508.0">without even needing to build your project. </span></span><span class="sentence"><span data-start="511.0">This is particularly useful when modifying header files. </span></span><span class="sentence"><span data-start="515.0">It would skip reanalyzing all files importing it. </span></span><span class="sentence"><span data-start="519.0">The static analyzer in Xcode can reveal bugs </span></span><span class="sentence"><span data-start="522.0">in your code very early during development. </span></span><span class="sentence"><span data-start="525.0">Run it with a click of a button and find many kinds of bugs. </span></span><span class="sentence"><span data-start="528.0">And don't forget to customize it to your workflow. </span></span><span class="sentence"><span data-start="531.0">In Xcode 13, we have further improved the analyzer </span></span><span class="sentence"><span data-start="535.0">and added many new checks for finding logical bugs. </span></span><span class="sentence"><span data-start="538.0">Use the analyzer and fix bugs in your app </span></span><span class="sentence"><span data-start="541.0">before they reach your users. </span></span><span class="sentence"><span data-start="543.0">Thank you, and enjoy the rest of WWDC! </span></span><span class="sentence"><span data-start="546.0">[upbeat music]</span></span></p> </section> </li> <!-- sample code --> <li class="supplement sample-code" data-supplement-id="sample-code"> <section> <ul class="no-bullet padding-top-small margin-bottom"> </ul> </section> </li> <!-- search --> <li class="supplement search active" data-supplement-id="search"> <section class="transcript-results-summary"> <p class="message smaller lighter"><!-- to be populated --></p> <p class="instructions smaller lighter text-center">Looking for something specific? Enter a topic above and jump straight to the good stuff.</p> <p class="error smaller lighter italic text-center" style="display:none;">An error occurred when submitting your query. Please check your Internet connection and try again.</p> </section> <!-- search results --> <ul class="transcript-results row"> </ul> </li> </ul> </section> </section> </section> <input id="analytics-meta" type="hidden" data-event-name="WWDC21" data-event-id="wwdc2021-10202" data-session-id="10202" data-video-name="Detect bugs early with the static analyzer" data-session-response-id=""> </main> <link rel="stylesheet" href="/assets/styles/footer.dist.css?17182448067"> <footer id="footer" class="footer" role="contentinfo" aria-labelledby="footer-label"> <div class="footer-content"> <h2 class="footer-label" id="footer-label">Developer Footer</h2> <developer-breadcrumbs> <li class="footer-breadcrumbs-item"><a href="/videos/">Videos</a></li> <li class="footer-breadcrumbs-item"><a href="/videos/wwdc2021/">WWDC21</a></li> <li class="footer-breadcrumbs-item">Detect bugs early with the static analyzer</li> </developer-breadcrumbs> <nav class="footer-directory" aria-label="Apple Developer Directory" role="navigation"> <!--googleoff: all--> <div class="footer-directory-column"> <input class="footer-directory-column-section-state" type="checkbox" id="footer-directory-column-section-state-platform" /> <div class="footer-directory-column-section"> <label class="footer-directory-column-section-label" for="footer-directory-column-section-state-platform"> <h3 class="footer-directory-column-section-title">Platforms</h3> </label> <a href="#footer-directory-column-section-state-platform" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-open"> <span class="footer-directory-column-section-anchor-label">Open Menu</span> </a> <a href="#" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-close"> <span class="footer-directory-column-section-anchor-label">Close Menu</span> </a> <ul class="footer-directory-column-section-list"> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/ios/">iOS</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/ipados/">iPadOS</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/macos/">macOS</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/tvos/">tvOS</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/visionos/">visionOS</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/watchos/">watchOS</a></li> </ul> </div> <input class="footer-directory-column-section-state" type="checkbox" id="footer-directory-column-section-state-tools" /> <div class="footer-directory-column-section"> <label class="footer-directory-column-section-label" for="footer-directory-column-section-state-tools"> <h3 class="footer-directory-column-section-title">Tools</h3> </label> <a href="#footer-directory-column-section-state-tools" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-open"> <span class="footer-directory-column-section-anchor-label">Open Menu</span> </a> <a href="#" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-close"> <span class="footer-directory-column-section-anchor-label">Close Menu</span> </a> <ul class="footer-directory-column-section-list"> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/swift/">Swift</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/swiftui/">SwiftUI</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/swift-playgrounds/">Swift Playgrounds</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/testflight/">TestFlight</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/xcode/">Xcode</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/xcode-cloud/">Xcode Cloud</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/sf-symbols/">SF Symbols</a></li> </ul> </div> </div> <div class="footer-directory-column"> <input class="footer-directory-column-section-state" type="checkbox" id="footer-directory-column-section-state-topics" /> <div class="footer-directory-column-section"> <label class="footer-directory-column-section-label" for="footer-directory-column-section-state-topics"> <h3 class="footer-directory-column-section-title">Topics & Technologies</h3> </label> <a href="#footer-directory-column-section-state-topics" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-open"> <span class="footer-directory-column-section-anchor-label">Open Menu</span> </a> <a href="#" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-close"> <span class="footer-directory-column-section-anchor-label">Close Menu</span> </a> <ul class="footer-directory-column-section-list"> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/accessibility/">Accessibility</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/accessories/">Accessories</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/app-extensions/">App Extensions</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/app-store/">App Store</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/audio/">Audio & Video</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/augmented-reality/">Augmented Reality</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/design/">Design</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/distribute/">Distribution</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/education/">Education</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/fonts/">Fonts</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/games/">Games</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/health-fitness/">Health & Fitness</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/in-app-purchase/">In-App Purchase</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/localization/">Localization</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/maps/">Maps & Location</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/machine-learning/">Machine Learning</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="https://opensource.apple.com">Open Source</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/security/">Security</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/safari/">Safari & Web</a></li> </ul> </div> </div> <div class="footer-directory-column"> <input class="footer-directory-column-section-state" type="checkbox" id="footer-directory-column-section-state-resources" /> <div class="footer-directory-column-section"> <label class="footer-directory-column-section-label" for="footer-directory-column-section-state-resources"> <h3 class="footer-directory-column-section-title">Resources</h3> </label> <a href="#footer-directory-column-section-state-resources" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-open"> <span class="footer-directory-column-section-anchor-label">Open Menu</span> </a> <a href="#" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-close"> <span class="footer-directory-column-section-anchor-label">Close Menu</span> </a> <ul class="footer-directory-column-section-list"> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/documentation/">Documentation</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/learn/">Tutorials</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/download/">Downloads</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/forums/">Forums</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/videos/">Videos</a></li> </ul> </div> <input class="footer-directory-column-section-state" type="checkbox" id="footer-directory-column-section-state-support" /> <div class="footer-directory-column-section"> <label class="footer-directory-column-section-label" for="footer-directory-column-section-state-support"> <h3 class="footer-directory-column-section-title">Support</h3> </label> <a href="#footer-directory-column-section-state-support" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-open"> <span class="footer-directory-column-section-anchor-label">Open Menu</span> </a> <a href="#" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-close"> <span class="footer-directory-column-section-anchor-label">Close Menu</span> </a> <ul class="footer-directory-column-section-list"> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/support/articles/">Support Articles</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/contact/">Contact Us</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/bug-reporting/">Bug Reporting</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/system-status/">System Status</a></li> </ul> </div> <input class="footer-directory-column-section-state" type="checkbox" id="footer-directory-column-section-state-account" /> <div class="footer-directory-column-section"> <label class="footer-directory-column-section-label" for="footer-directory-column-section-state-account"> <h3 class="footer-directory-column-section-title">Account</h3> </label> <a href="#footer-directory-column-section-state-account" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-open"> <span class="footer-directory-column-section-anchor-label">Open Menu</span> </a> <a href="#" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-close"> <span class="footer-directory-column-section-anchor-label">Close Menu</span> </a> <ul class="footer-directory-column-section-list"> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/account/">Apple Developer</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="https://appstoreconnect.apple.com/">App Store Connect</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/account/ios/certificate/">Certificates, IDs, & Profiles</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="https://feedbackassistant.apple.com/">Feedback Assistant</a></li> </ul> </div> </div> <div class="footer-directory-column"> <input class="footer-directory-column-section-state" type="checkbox" id="footer-directory-column-section-state-programs" /> <div class="footer-directory-column-section"> <label class="footer-directory-column-section-label" for="footer-directory-column-section-state-programs"> <h3 class="footer-directory-column-section-title">Programs</h3> </label> <a href="#footer-directory-column-section-state-programs" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-open"> <span class="footer-directory-column-section-anchor-label">Open Menu</span> </a> <a href="#" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-close"> <span class="footer-directory-column-section-anchor-label">Close Menu</span> </a> <ul class="footer-directory-column-section-list"> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/programs/">Apple Developer Program</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/programs/enterprise/">Apple Developer Enterprise Program</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/app-store/small-business-program/">App Store Small Business Program</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="https://mfi.apple.com/">MFi Program</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/programs/news-partner/">News Partner Program</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/programs/video-partner/">Video Partner Program</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/security-bounty/">Security Bounty Program</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/programs/security-research-device/">Security Research Device Program</a></li> </ul> </div> <input class="footer-directory-column-section-state" type="checkbox" id="footer-directory-column-section-state-events" /> <div class="footer-directory-column-section"> <label class="footer-directory-column-section-label" for="footer-directory-column-section-state-events"> <h3 class="footer-directory-column-section-title">Events</h3> </label> <a href="#footer-directory-column-section-state-events" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-open"> <span class="footer-directory-column-section-anchor-label">Open Menu</span> </a> <a href="#" class="footer-directory-column-section-anchor footer-directory-column-section-anchor-close"> <span class="footer-directory-column-section-anchor-label">Close Menu</span> </a> <ul class="footer-directory-column-section-list"> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/events/">Meet with Apple</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/events/developer-centers/">Apple Developer Centers</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/app-store/app-store-awards/">App Store Awards</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/design/awards/">Apple Design Awards</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/academies/">Apple Developer Academies</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/entrepreneur-camp/">Entrepreneur Camp</a></li> <li class="footer-directory-column-section-item"><a class="footer-directory-column-section-link" href="/wwdc/">WWDC</a></li> </ul> </div> </div> <!--googleon: all--> </nav> <section class="footer-mini" vocab="http://schema.org/" typeof="Organization"> <div class="footer-mini-news"> <div class="copy"> Get the <a href="https://apps.apple.com/us/app/apple-developer/id640199958">Apple Developer app</a>. </div> <div class="content"> <div class="color-scheme-toggle" role="radiogroup" tabindex="0" aria-label="Select a color scheme preference"> <label data-color-scheme-option="light"> <input type="radio" value="light" autocomplete="off" onchange="window.setPreferredColorScheme(event.target.value)" /> <div class="text">Light</div> </label> <label data-color-scheme-option="dark"> <input type="radio" value="dark" autocomplete="off" onchange="window.setPreferredColorScheme(event.target.value)" /> <div class="text">Dark</div> </label> <label data-color-scheme-option="auto"> <input type="radio" value="auto" autocomplete="off" onchange="window.setPreferredColorScheme(event.target.value)" /> <div class="text">Auto</div> </label> </div> <script async src="/assets/scripts/color-scheme-toggle.js"></script> </div> </div> <link rel="stylesheet" href="/assets/styles/language-dropdown.css?17182448067"> <div class="language-dropdown dropdown-container legacy-form hidden"> <select class="dropdown" aria-label="Language Dropdown"></select> <span class="dropdown-icon icon icon-chevrondown" aria-hidden="true"></span> </div> <script src="/assets/scripts/language-dropdown.js?17182448067"></script> <div class="footer-mini-legal"> <div class="footer-mini-legal-copyright">Copyright © 2024 <a href="https://www.apple.com">Apple Inc.</a> All rights reserved.</div> <div class="footer-mini-legal-links"> <a class="footer-mini-legal-link" href="https://www.apple.com/legal/internet-services/terms/site.html" class="first">Terms of Use</a> <a class="footer-mini-legal-link" href="https://www.apple.com/legal/privacy/">Privacy Policy</a> <a class="footer-mini-legal-link" href="/support/terms/">Agreements and Guidelines</a> </div> </div> </section> </div> </footer> <script src="/assets/scripts/params.js"></script> <script src="/assets/scripts/watchable.js"></script> <script src="/assets/scripts/timeout.js"></script> <script src="/videos/scripts/play/play.js?04012409282"></script> <script src="/videos/scripts/hls/rtc.min.js?59182451067"></script> <script src="/videos/scripts/hls/hls.min.js?59182451067"></script> </body> </html>