working with apple while developing apps

Download Working with Apple while developing apps

Post on 17-Jul-2015




1 download

Embed Size (px)


Working with AppleAll the hoops Apple makes developers jump through when developing iOS appsOutlineHow Apple restricts apps that run on devicesHow to get apps on devices for testingManaging apps under developmentSubmitting an app to the App StoreGlossaryOther ResourcesTangential Topics1. How Apple restricts apps that run on devicesCode SigningGenerally, the only way to put an app on an Apple mobile device such as an iPhone or iPad is through the App StoreApple ensures that non-App Store apps will not run on devices using a process called Code SigningAll of the apps in the App Store have been code signed by Apple -- this is like a digital signature embedded in the app when the app appears in the App StoreThis code signing process is built directly into the operating system of Apple mobile devices (iOS)Before an app starts on a device, iOS checks to make sure the app is properly code signed -- if it is not, the app will not launchThe code signing digital signature is generated using the apps code itself, so this process also ensures that the app has not been altered since it has been signedRunning Apps on a Device2. How to get apps on devices for testingIf apps can only get on devices through the App Store, does that mean that a developer building an app has to put it in the App Store and get it code signed by Apple before he can test it on his own phone? This would mean he would also have to put it through the App Store again for every minor code change as he continues to work on it, since code signing ensures that the app hasnt been changed between being signed and running Thankfully, no -- there is a process for developers to code sign apps themselves, but its complicatedHow Do Developers Do It?Developers who want to run apps on devices during development must register themselves and their devices with AppleAll registration happens at (the Developer Portal)First, a developer joins Apples iOS Developer Program, which costs $99 per year, per developerA company with multiple developers must also register, for another $99Code Signing by DevelopersRegistering DevicesThen, the developer registers each device that he wants to run his app on with AppleThe area of the Developer Portal where a developer can complete this and the remaining steps is only available to developers in the iOS Developer ProgramThe developer specifies each devices Unique Device Identifier (UDID), which can be found by connecting the device to a computer and examining it in iTunes or XcodeThere is a strict limit of 100 devices that can be registered for a particular appNext, the developer requests a Code Signing Certificate from Apple, which allows him to code sign the app he is developingThis uses the macs Keychain system and public/private key encryptionThe developer also specifies an Identifier for his app with AppleEvery app has a unique identifier, called a Bundle ID, Application ID, or IdentifierThe format typically looks something like com.strava.runRegister Everything with AppleFinally, the developer goes back to the Developer Portal once more to create a Provisioning Profile, which combines:The developers Code Signing CertificateThe App IdentifierThe UDIDs of all the devices registered for the appThe developer downloads the Provisioning Profile to the computer he is developing on and connects his device to the computerThe Provisioning ProfileNow, finally, the developer can install the app on his device and run itThe developer installs the app on the attached device through Xcode (code signing it in the process), and specifies a Provisioning Profile to install with the app at the same timeAs always, before the app starts, iOS checks to see if the app has been code signed by AppleBut this time it sees that the app has been code signed by the developer -- So it checks the Provisioning Profile, where it sees that Apple has been notified that this device has been registered by this developer for testing this particular app -- and with that confirmation, it launches the appRunning On a DeviceCode Signing, Provisioning Profiles -- all of this stuff is a source of confusion and frustration, even for professional developersThese things can easily get out of sync with each other when new developers join a team or someone adds a new device to be used for testing, and they will stop working until they are properly updatedMany iOS developers may not even be clear on the details of how they workNobody Likes this StuffThere is an alternative to specifying everything in a Provisioning Profile -- businesses can develop proprietary apps for internal use and distribute them privately to employeesThis method avoids the burden of submitting the apps to the App Store or even having the apps approved by Apple, and is not limited to 100 devicesBut there are restrictions --Businesses must join the iOS Developer Enterprise Program for $299 per yearA device can only have enterprise apps from one employer installed at any timeThis method is not typically used outside of large corporationsEnterprise Distribution3. Managing apps under developmentDevelopers submit apps to the App Store through an Apple website called iTunes Connect ( Connect is also how developers manage the way their apps appear in the App StoreFirst, a developer creates a iTunes Connect record for an app under developmentiTunes ConnectThen, the developer then specifies basic information that will appear in the apps entry in the App StoreThe app name What category the app should appear underKeywords for searchingMaturity ratingImages of the app, such as screenshotsApp description for the apps entry in the App StoreDevelopers company name for payment (iTunes Connect is also where the developer agrees to the necessary legal forms related to payment)Basic App InformationMore complex features are also handled through iTunes ConnectProviding promotional codes for certain users (e.g. press) to download the app for freeFree trials for in-app purchasesManage Smart App Banners (those rows that appear at the top of mobile web sites that encourage users to download the app)iTunes Connect also contains a few tools for analyzing an apps performanceCharts showing downloads and sales over timeFinancial reportsAdditional Functions4. Submitting an app to the App StoreWhen an app is ready for public distribution, the developer submits it to Apple through iTunes ConnectXcode is integrated with iTunes Connect for this purposeThe developer first downloads the record he created for the app in iTunes Connect The developer then associates that record with the app in XcodeFinally, the developer saves a version of the app that includes the record and uploads that to iTunes Connect directly from XcodeSubmission ProcessThe app cant appear in the App Store until Apple approves it, which typically takes 1-5 daysOnce an app is approved, the developer can push it live to the App StoreThere is also an option to have it go live automatically as soon as Apple approves it, but this option makes it harder to coordinate the release with website changes, marketing, PR, etc.Approval is RequiredWhen an app is submitted, Apple will perform a basic check to ensure quality of the app, which includes:Features, functionality, user experience & interface all fit the products descriptionReliability -- reasonable data/battery usage, stable, doesnt crashConforms to Apples guidelines for usability (called the Human Interface Guidelines)Follows recommended programming practices, such as storage of dataIs not bloated -- overall file size and load time are reasonableApproval StandardsApple also has a long list of prohibitions -- too many to list hereSome of the prohibitions are intuitiveCannot use Apples copyrighted imagery such as buttons elements from Apple appsCannot circumvent Apples in-app payment systemMust obtain user consent before accessing the users location dataAdditional Reasons for RejectionSome other reasons for rejection are not so intuitiveToo niche, too repetitive of existing apps, or duplicates built-in appsIt cant just be a mobile website, it must feel like a native appIt cant be a test or a beta version -- it must be a final productNo porn or other content that Apple finds offensiveIt cant use native elements in a way they werent intended -- e.g. vibration can only be used in quick bursts for notification purposesEven More Reasons for RejectionAn app can be rejected even without violating a specific prohibition -- developers really are at Apples mercyThankfully, rejected apps can be re-submitted after modifying the offending elementsDealing with RejectionThats it for content! The rest of the slides are further reading, glossary, etc.

Please submit feedback to and tell me:Were these topics interesting? Useful at your job?Was this stuff too technical / too basic / just right?What other topics are you curious about (iPhone or otherwise)?

Fin.GlossaryApplication IDApp IdentifierBundle IDCode Signing Code Signing CertificateDeveloper PortalHuman Interface Guidelines (HIG)iOSiOS Developer Enterprise Program iOS Developer Program iTunes Connect

Terminology IntroducedProvisioning ProfileSmart App BannerUnique Device Identifier (UDID)

Other ResourcesOther - the ultimate authority - somewhat technical - hard to navigate - some portions are only available to developers - includes:App Distribution Quick Start GuideApp Distribution GuideEscoz Inc. blog post on iOS Code Signing and Provisioning ProfilesFlippa blog post on some reasons for App Store rejection

If any of these are particularly useful for you, let me know

Tangential TopicsTangential TopicsCode Signing - there is a lot more to it, it can get quite technicaliTunes - developers use it to access certain files on devicesKeychain - involved in code signingPublic/Private Key Encryption - a technical topic, involved in code signingXco