CINXE.COM
Keyman for iPhone and iPad Developer Support
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Keyman for iPhone and iPad Developer Support</title> <script src="/cdn/deploy/js/sentry.bundle.5.28.0.min.94ac314aeac15a10211c943fbbb0b85b.js"></script> <script> Sentry.init({ dsn: "https://fcc8fe39792f49f3a94ea831cad5c9d6@o1005580.ingest.sentry.io/5983515", environment: location.host.match(/\.local$/) ? 'development' : location.host.match(/(^|\.)keyman-staging\.com$/) ? 'staging' : 'production', }); </script> <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> <link rel='shortcut icon' href="/cdn/deploy/img/favicon.56e7a2d76793fb59cca3133b8bb1dd3d.ico"> <link rel='canonical' href='/developer/engine/iphone-and-ipad/current-version/'> <link rel="stylesheet" type="text/css" href="/cdn/deploy/css/template.5e9adfa8a8262134cd0ab5ba65411347.css"> <link rel="stylesheet" type="text/css" href="/cdn/deploy/css/prism.e774a7ee19b37e3501dd4ef14ca98b8a.css"> <link href='https://fonts.googleapis.com/css?family=Cabin:400,400italic,500,600,700,700italic|Source+Sans+Pro:400,700,900,600,300|Noto+Serif:400' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,400italic' rel='stylesheet' type='text/css'> <script type='text/javascript' src='/cdn/deploy/js/keyrenderer.6c496dc07a927c012cd6167f1f246f1b.js'></script> <script type="text/javascript"> // Add a script element as a child of the body function downloadJS(src) { var element = document.createElement("script"); element.src = src; document.body.appendChild(element); } function downloadJSAtOnload() { downloadJS("/cdn/deploy/js/jquery1-11-1.min.8101d596b2b8fa35fe3a634ea342d7c3.js"); downloadJS("/cdn/deploy/js/kmlive.68c269576297f036e07a036223b0ebbd.js"); //downloadJS("/cdn/deploy/js/keyrenderer.6c496dc07a927c012cd6167f1f246f1b.js"); } // Check for browser support of event handling capability if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", downloadJSAtOnload); else window.onload = downloadJSAtOnload; </script> </head> <body data-device="Windows" data-section="developer"> <div id="phone-menu"> <div id="phone-menu-inner"> <div class="phone-menu-item"> <h3>Product Support</h3> <ul> <li><a href="/products/windows/">Keyman for Windows</a></li> <li><a href="/products/mac/">Keyman for macOS</a></li> <li><a href="/products/linux/">Keyman for Linux</a></li> <li><a href="/products/web/">Keymanweb.com</a></li> <li><a href="/products/iphone-and-ipad/">Keyman for iPhone and iPad</a></li> <li><a href="/products/android/">Keyman for Android</a></li> <li><a href="/products/bookmarklet/">Keyman Bookmarklet</a></li> <hr/> <li><a href="/knowledge-base/">Knowledge Base</a></li> </ul> </div> <div class="phone-menu-item"> <h3>Keyboard Support</h3> <ul> <li><a href="/keyboard">Keyboard Home</a></li> </ul> </div> <div class="phone-menu-item"> <h3>Developer Support</h3> <ul> <li><a href="/developer">Developer Home</a></li> <li><a href="/developer/current-version/">Keyman Developer</a></li> <li><a href="/developer/engine/web/">Keyman Engine for Web</a></li> <li><a href="/developer/engine/iphone-and-ipad/">Keyman Engine for iPhone and iPad</a></li> <li><a href="/developer/engine/android/">Keyman Engine for Android</a></li> <li><a href="/developer/engine/desktop/">Keyman Engine for Desktop</a></li> <li><a href="/developer/cloud/">Keyman Cloud</a></li> </ul> </div> <div class="phone-menu-item"> <h3>Contact and Search</h3> <ul> <li><a href="https://keyman.com/contact">Contact Us</a></li> <li><a href="/search/">Search Help</a></li> </ul> </div> <div class="phone-menu-item"> <h3>Keyman.com Homepage</h3> <ul> <li><a href="https://keyman.com">Keyman.com</a></li> </ul> </div> </div> </div><div id="container"> <div class="header"> <img id="show-phone-menu" src="/cdn/deploy/img/phonehide.ca5b6569ec86dfcbdff8ca4008c96283.png" /> <a id="home-link" href="/"><img id="logo" src="/cdn/deploy/img/logo2.d8805a27a5c0399d234f1f84aca74cae.png" alt='Keyman Logo' /></a> <img id="header-bottom" src="/cdn/deploy/img/headerbar.5b66d10475396d1a17cb0d687f794262.png" alt='Header bottom' /> <a id="help" href="https://keyman.com"><p id="keyman-help">Keyman.com</p><img src="/cdn/deploy/img/helpIcon.e6531e8bf34d0f667dac699db8f7438f.png"></a> </div> <div id="top-menu-bg"></div> <div id="top-menu1"> <a href="/"><img id="top-menu-icon" src="/cdn/deploy/img/icon1.c7a2600d263e5bfc94580e153ddd38f0.png" /></a> <div class="menu-wrapper"> <div class="menu-item" id="keyboards"> <h3><a href="/products/">Product Support</a><span class="header-triangle"><img src="/cdn/deploy/img/img_trans.ccca81506160a8ccf8003ae57a97b115.png" /></span></h3> <div class="menu-item-dropdown"> <div class="menu-dropdown-inner"> <ul> <li><a href="/products/windows/">Keyman for Windows</a></li> <li><a href="/products/mac/">Keyman for macOS</a></li> <li><a href="/products/linux/">Keyman for Linux</a></li> <li><a href="/products/web/">Keymanweb.com</a></li> <li><a href="/products/iphone-and-ipad/">Keyman for iPhone and iPad</a></li> <li><a href="/products/android/">Keyman for Android</a></li> <li><a href="/products/bookmarklet/">Keyman Bookmarklet</a></li> <hr/> <li><a href="/knowledge-base/">Knowledge Base</a></li> </ul> </div> </div> </div> <div class="menu-item" id="products"> <a href="/keyboard/" ><h3>Keyboard Documentation</h3></a> </div> <div class="menu-item" id="developers"> <h3><a href="/developer/">Developer Home</a><span class="header-triangle"><img src="/cdn/deploy/img/img_trans.ccca81506160a8ccf8003ae57a97b115.png" /></span></h3> <div class="menu-item-dropdown"> <div class="menu-dropdown-inner"> <ul> <li><a href="/developer/current-version/">Keyman Developer</a></li> <li><a href="/developer/language/">Keyman Keyboard Language</a></li> <li><a href="/developer/engine/web/">Keyman Engine for Web</a></li> <li><a href="/developer/engine/iphone-and-ipad/">Keyman Engine for iOS</a></li> <li><a href="/developer/engine/android/">Keyman Engine for Android</a></li> <li><a href="/developer/engine/desktop/">Keyman Engine for Desktop</a></li> <li><a href="/developer/cloud/">Keyman Cloud</a></li> </ul> </div> </div> </div> <div class="menu-item" id="tavultesoft"> <a href="https://keyman.com/contact/" ><h3>Contact Us</h3></a> </div> <div class="menu-pseudo-item" id="menu-search"> <form action="/search/" method="get" role="search"> <div class="search-wrap"> <label for="main-q" class="offscreen">Search</label> <input type="search" id="main-q" name="q" placeholder="Search" data-value="" value="" /> <button type="submit" class="offscreen">Search</button> </div> </form> </div> </div> <img id="top-menu-bottom" src="/cdn/deploy/img/headerbar.5b66d10475396d1a17cb0d687f794262.png" /> </div> <div id="phone-header-spacer"></div><div id="breadcrumbTrail"><a href="/">help.keyman.com</a> > <a href="../../../../developer/">Developer </a> > <a href="../../../engine/">Engine </a> > <a href="../../iphone-and-ipad/">Iphone and ipad </a> > 11.0 </div><div id='version-selector'>Other versions<div><a href='/developer/engine/iphone-and-ipad/current-version/'>Version 18.0 (current version)</a><a href='/developer/engine/iphone-and-ipad/16.0/'>Version 16.0</a><a href='/developer/engine/iphone-and-ipad/15.0/'>Version 15.0</a><a href='/developer/engine/iphone-and-ipad/14.0/'>Version 14.0</a><a href='/developer/engine/iphone-and-ipad/13.0/'>Version 13.0</a><a href='/developer/engine/iphone-and-ipad/12.0/'>Version 12.0</a><span>Version 11.0</span><a href='/developer/engine/iphone-and-ipad/10.0/'>Version 10.0</a><a href='/developer/engine/iphone-and-ipad/2.0/'>Version 2.0</a></div></div><div class="main"> <div id="section2"> <div class="column-left show-index"> <div id="index"> <h3>Index</h3> <div id="index-content"><ul><li><div class='current'>Current page</div><ul><li><a href='guides' title='Index'>Index</a></li><li><a href='KeyboardPickerBarButtonItem' title='KeyboardPickerBarButtonItem class'>KeyboardPickerBarButtonItem class</a></li><li><a href='KeyboardPickerButton' title='KeyboardPickerButton class'>KeyboardPickerButton class</a></li><li><a href='Manager' title='Manager class'>Manager class</a></li><li><a href='TextField' title='TextField class'>TextField class</a></li><li><a href='TextView' title='TextView class'>TextView class</a></li></ul></li></ul></div> </div> </div> <div class="column-right"> <div id="toc"> <h3>On this page</h3> <div id="toc-content"></div> </div> </div> <div class="wrapper"> <article><h1 class="center">Keyman for iPhone and iPad Developer Support</h1> <h2 id="Overview" name="Overview">Overview</h2> <p> The Keyman Engine for iPhone and iPad 11.0 SDK is designed to provide advanced international keyboard support to iOS apps. <br/><br/> As a developer, you simply need to use (or subclass) TextView or TextField instead of using an ordinary UITextView or UITextField. <br/><br/> To let a user pick/download additional keyboards, there are 2 pre-made buttons you can use that bring up the Keyman keyboard UI. <br/><br/> All of the methods and delegate calls of the original UIKit classes are retained. </p> <h2 id="Guides" name="Guides">Guides</a></h2> <ul> <li><a href='guides/in-app/'>Build an in-app keyboard</a></li> <li><a href='guides/system-keyboard/'>Build a system keyboard app</a></li> </ul> <h2 id="Classes" name="Classes">Available Classes/Methods</h2> <p>Everything you need should be in these classes. It is especially important to look at Manager.swift</p> <dl> <dt><code><a href='Manager/'>Manager</a></code></dt> <dd>The core class for controlling Keyman Engine</dd> <dt><code><a href='TextField/'>TextField</a></code></dt> <dd>A UITextField to use with the Keyman Engine</dd> <dt><code><a href='TextView/'>TextView</a></code></dt> <dd>A UITextView to use with the Keyman Engine</dd> <dt><code><a href='KeyboardPickerButton/'>KeyboardPickerButton</a></code></dt> <dd>A button for bringing up the keyboard picker menu</dd> <dt><code><a href='KeyboardPickerBarButtonItem/'>KeyboardPickerBarButtonItem</a></code></dt> <dd>A bar that displays the keyboard picker when tapped</dd> </dl> <h2>Adding the Keyman Engine for iPhone and iPad SDK to your project</h2> <p> 1) create a new iOS project <br/><br/> 2) drag the 'libKeyman' folder into your project <ul> <li>this includes the library itself, some headers and a resources bundle</li> <li>Xcode should automatically link the library and setup the bundle for copying</li> <ul> <li>if not, go to your target's "Build Phases" tab and add:</li> <ul> <li>'libKeyman.a' to "Link Binary With Libraries"</li> <li>'Keyman.bundle' to "Copy Bundle Resources"</li> </ul> </ul> </ul> <br/><br/> 3) add '-all_load' to 'other linker flags' in your project or target build settings <ul> <li>otherwise categories in the static library will fail and your app will crash at runtime</li> </ul> <br/><br/> 4) add the following frameworks/libraries to your project: <br/> (found in 'Link Binary With Libraries' in your target's 'build phases' tab) <ul> <li>CFNetwork</li> <li>MobileCoreServices</li> <li>Libz</li> <li>SystemConfiguration</li> <li>CoreGraphics</li> <li>UIKit</li> <li>CoreText</li> <li>AudioToolbox</li> </ul> <br/><br/> 5) import "Keyman.h" into any source files which require any Keyman classes <br/><br/> 6) [OPTIONAL] add the language .js files which you want to use to your project (e.g. thai_kedmanee.js) <ul> <li>drag them into the project</li> <li>go to your target, then the "Build Phases" tab, and add them to the "Copy Bundle Resources" section</li> <li>to avoid xcode warnings, remove them from the "Compile Sources" section</li> </ul> <br/><br/> 7) [OPTIONAL] set the initial language prior to showing the keyboard for the first time <ul> <li>it is recommended to do this when the app first launches</li> <li>e.g. for Thai Kedmanee <pre class="language-swift"><code>Manager.shared.setKeyboard("thai_kedmanee"); </code></pre></li> <li>the keyboard defaults to English USA if not set otherwise</li> </ul> </p> <h2>Keyman Demo</h2> <p> To see the SDK in action, open the KeymanDemo project. All of the above steps have already been performed. <br/><br/> Additionally, you can see examples of: <ul> <li>TextView</li> <li>TextField</li> <li>KeyboardPickerButton</li> <li>KeyboardPickerBarButtonItem</li> <li>language fetching</li> <li>keyboard downloading/switching</li> <li>responding to Keyman events</li> </ul> </p> <h2 id="See_also" name="See_also">See also</h2> <ul> <li><a href="/developer/engine/iphone-and-ipad/13.0/" title="Keyman Engine for iPhone and iPad 13.0"> Keyman Engine for iPhone and iPad 13.0</a></li> <li><a href="/developer/engine/iphone-and-ipad/12.0/" title="Keyman Engine for iPhone and iPad 12.0"> Keyman Engine for iPhone and iPad 12.0</a></li> <li><a href="/developer/engine/iphone-and-ipad/10.0/" title="Keyman Engine for iPhone and iPad 10.0"> Keyman Engine for iPhone and iPad 10.0</a></li> <li><a href="/developer/engine/iphone-and-ipad/2.0/" title="Keyman Engine for iPhone and iPad 2.0"> Keyman Engine for iPhone and iPad 2.0</a></li> <li><a href="/developer/current-version/" title="Keyman Developer">Keyman Developer</a></li> <li><a href='http://keyman.com/developer/keymanweb/keyboards.php' title="Keyboard Library">Keyboard Library</a></li> <li><a href="/developer/engine/android/10.0/" title="Keyman Engine for Android 10.0">Keyman Engine for Android 10.0</a></li> </ul> </article> </div> </div> </div> <div class="footer"> <div class="wrapper"> <div class="footer-third"> <h2 class="footer-third-title">Keep me updated</h2> <!-- Begin MailChimp Signup Form --> <div id="mc_embed_signup"> <form action="https://keyman.us1.list-manage.com/subscribe/post?u=99fcab2b035a8a51cd2158ca9&id=7ccdac1e32" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> <div class="mc-field-group"> <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder="email" /> </div> <div id="mce-responses" class="clear"> <div class="response" id="mce-error-response" style="display:none"></div> <div class="response" id="mce-success-response" style="display:none"></div> </div> <div class="button subscribe"> <h2>Subscribe</h2> </div> </form> </div> <!--End mc_embed_signup--> <br> <div id="privacy-policy"><a href="https://software.sil.org/language-software-privacy-policy">Privacy policy</a></div> </div> <div class="footer-third" id="footer-social"> <h2 class="footer-third-title">Keep in touch</h2> <div> <a href="https://facebook.com/KeymanApp" target="_blank" data-icon=''>Facebook</a> <a href="https://twitter.com/keyman" target="_blank" data-icon=''>Twitter</a> <a href="https://blog.keyman.com/" target="_blank" data-icon=''>Keyman blog</a> <a href="https://github.com/keymanapp" target="_blank" data-icon=''>GitHub</a> <a href="https://community.software.sil.org/c/keyman" target="_blank" id='footer-community'>Keyman Community</a> </div> </div> <div class="footer-third sil-logo"> <br> <a href="https://www.keyman.com/about/"><img id="sil-logo" src="/_common/assets/sil-logos-2024/sil-logo-abbysinica.png" width="50%" alt='SIL' /></a> <p>Created by <a href="https://www.keyman.com/about/">SIL Global</a></p> </div> </div> </div> <div class="footer-tab-holder" id='footer-tab-support'> <div class="footer-tab"><h4><a href='https://community.software.sil.org/c/keyman'>Support</a></h4></div> </div> <div class="footer-tab-holder" id='footer-tab-edit'> <div class="footer-tab"><h4><a href='https://github.com/keymanapp/help.keyman.com/edit/master/developer/engine/iphone-and-ipad/11.0/index.php' target='_blank'>Edit page</a></h4></div> </div> <div id="KeymanWebControl"></div> <script src='/cdn/deploy/js/prism.d0f5cae6b89b314c659037fb44846584.js'></script> </body> </html>