Building Apps for iPhone and iPad
Upcoming SlideShare
Loading in...5
×
 

Building Apps for iPhone and iPad

on

  • 688 views

Learn how to build enterprise apps for iOS including iPad and iPhone.

Learn how to build enterprise apps for iOS including iPad and iPhone.

Learn more at: http://www.maas360.com/products/mobile-device-management/apple-ios/

Statistics

Views

Total Views
688
Views on SlideShare
688
Embed Views
0

Actions

Likes
0
Downloads
9
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Hello Everyone, Thanks for joining us. So what are we learning today? Compare various design choices for developing iOS Application We’ll discuss Web App and Native App- We’ll then focus on Native App development in an Enterprise And in the end, we’ll walk through three interesting features of iOS - Push Notifications, Location Services and Data ProtectionLets get started..To address a wider range of audience, including folks from non-development background like product managers who want to learn the capabilities and complexities of developing iOS Apps, or project manager who would like create a plan for an iOS App project and wants to understand the development process, I will try to avoid being too technical and give high level pointers on each topic, which can be discussed further if need be.
  • Before we start on this topic, I would like to stress that these are development approaches. Regardless of what approach you choose, the user experience should always be the primary consideration. Most users don’t care about what technology is being used. All they want is that the apps are built and designed with usability and their specific needs in mind. So evaluate all these approaches, but don’t compromise with the end user experience.Web App:Using Web 3.0 technologies like HTML5, CSS3 & JS, you can develop Web Apps with rich user experience. that have a native app feel to it. There are frameworks which make the task easy by giving you access to standard UI controls similar to ones found in a native app.Chances are most of us have already been exposed to a Web App. I would recommend 2 web-apps - ft.com. Amazon’s Kindle Cloud Reader is another good web app.The web app can have its own icon in Home Screen and can be launched in a Full Screen mode, adding the native app feel to it. The other plus is cross-platform advantage. These web apps will run on any HTML5 capable browser. You need to be careful about HTML5 feature selection though, since not all features are implemented across different browsers.Installation and Upgrades are in an instant. By installation, I mean adding the web clip icon to home screen. As a side note, the discoverability of the web apps is an issue though. There is no App Store like entity for Web Apps. The providers need to ensure that the target users can discover the app easily. If your are developing an app that is heavy on content,and you don’t need access to hardware capabilities like camera, etcand app discovery isn’t a concern (like in the case of enterprise app),you should strongly consider a Web App approach.Native App:Can access device h/w capabilities like camera, accelerometer, address book, etc.You can use push notifications, to inform the user of some update even when a user isn’t using your app. For example you can update the badge number of your application icon to indicate an update.UI is in general more responsive and you can create complex custom control if needed. Your team need Objective C expertise for developing Native App.Hybrid App:Is a Web App wrapped in a Native App. The html5, css3 and JS file are packaged within the native app. Native apps has a browser control, which renders the Web App in its UI.With this, if you already have a working mobile web application, it can be packaged within an iPhone native app with the same core code. You can then post the application to App Store. There are frameworks that provider access to device capabilities to web app JS files. Device capabilities like camera, file system, accelerometer, geolocation. etc. If you have expertise in web technologies, your learning curve would be minimal in this approach.We evaluated a few frameworks and like two of them: Titanium Mobile(www.appcelerator.com) – commercial product with various buying options. NBC iPad App has been built using Titanium.- PhoneGap – an open-source alternative. Works with Sencha Touch. Logitech Squeezebox Controller This evaluation was done an year back, and scales might have changed. So please research other solutions as well.
  • HTML5, CSS3 and JS can be used to create apps with rich user experience, sometimes close to a native app.There are few HTML5/CSS3 capabilities that are worth exploring:Persistence: Web Storage: an improvement over cookies, where 2 modes are available - Local and session storage. These are key-value storage mechanism. Web SQL – for more advanced persistence needs, local SQLite Database. Offline application cache – The offline application cache lets you create web apps - such as canvas-based games, e-readers - that people can return to your site and continue to use even when they have no internet connection. ft.com app uses it display stored content even if a device is offline.Touch Events enables your web app to react to touch events from the touch screen.Geolocation gives access to a user’s location and can be used to present location-specific content or behavior.HTML5 is an Evolving Standard, and hasn’t been uniformly implemented on all mobile browsers. If you intend to build a cross-platform web app, please check on the availability of features of your interest.Always use feature detection. Do not program conditionals per platform or version. A good reference of feature-platform matrix is http://mobilehtml5.org.Noteworthy HTML5 Mobile Web App Frameworks:- jQTouch: is a jQueryplugin, lightweight (4KB), gives you basic UI controls like animations, AJAX, callbacks and in-built touch events.- jQuery Mobile: A library, lightweight (20KB). A unified user interface system that works seamlessly across all popular mobile device platforms, built on the jQuery and jQuery UI foundation. Focused on a lightweight codebase built on progressive enhancement with a flexible, easily themeable design. (20KB)SenchaTouch: very comprehensive library of UI controls. It can be bit heavy. You can reduce the size by removing unused components.What do we mean by installation?Its much easier for Enterprise Apps. Those who have bought an MDM solution to manage their enterprise iOS devices, can deliver a web-clip for installing a Web Apps.
  • Once you have decided to use a native app, you need to create an appropriate developer account. If your apps is targeted for App Store, you should buy iOS developer program ($99/yr)If you app is targeted for deployment within your enterprise (also called in-house apps), you should buy iOS Enterprise Developer Program. You need to have a DUNS id for enrolling in this program ($299/yr).Would also like to mention that all MDM systems require an APNS certificate to manage iOS devices and these can be requested only by joining the Developer Enterprise Program.For App Store apps, please review the App Store Review Guidelines and iOS Human Interface Guidelines.Provisioning PortalProvisioning Portal is used to set up the artifacts needed to start App development – including certificates, devices, and the App ID for your application. It can be slightly confusing in the beginning, but once you get to know the basic constructs, you’ll get past it like a breeze.From tools perspective, Xcode is a one-stop-shop for all your needs. Xcode is the complete toolset for building iOS applications. Install the latest version of iOS SDK. Select the target device to the minimum iOS Version you intend to support.There is plenty of documentation available in Apple’s developer website to help you get started and have a Hello World application in no time.http://developer.apple.com/library/ios/navigation/Select settings based on the targeted device family - iPhonevsiPad. You also need to decide the supported orientation on each device type.You need images for retina & non-retina display for iPhone and images for iPad.There are 3 kinds of build types that you should know about: Developer build are meant for individual developers testing on their test devices or simulator.Adhoc: This build is used while an app is in testing phase. There is a limit of 100 test devices per developer account. If you have outsourced development of your enterprise apps and are given drops for testing, chances are these builds are adhoc builds with your device added as a test device. Distribution: When an app is ready for production deployment, a distribution build is created.Testing Apps:Lets talk about testing strategy: device selection - its best to test your app on target devices, and not just rely on simulator. process: you should have Automated Tests which can be quickly run on targeted devices, before its given out to testers for testing. If you need to test your app one various networks, you can try a company called DeviceAnywhere. They have devices on different networks in US and UK.ProfilingWith the Instruments application, which is bundled with Xcode, you can gather a variety of application performance metrics, such as memory and network use. You can profile an app either on a simulator or a development device.If your application is resource intensive, I would recommended profiling it on a device instead of a simulator as a simulator can’t replicate device’s performance characteristics like CPU speed or memory throughput.Instruments can also be used to create Automated UI Test scripts. This is useful to perform quick sanity check on your builds.Internationalization and LocalizationIt’s a good practice to design the App with Internationalization supportfrom the beginning. The localizable resource can be images, text strings, xib file, sounds. With this approach, adding localization support later doesn’t need any code refactoring.----------------------------------------------------------------------------------------------------------------Internationalization is the process of designing and building an application to facilitate localization. Localization, in turn, is the cultural and linguistic adaptation of an internationalized application.
  • Now that we know a little bit about Native App development, lets look at few important aspects for developing and deploying an Enterprise App.Security is a big concern for Enterprise. Chances are your company’s security team would audit the iOS App before it is deployed. Here are few best practices for Enterprise Apps:User AuthenticationOne of Apple’s best practice for Enterprise apps is to have user authentication. This is especially important when the app providers access to any sensitive information. Disabling a user account is an easy way to manage user access in case an employee leaves the company. Save sensitive information like username / password in key chain instead of standardUserDefaults (User Defaults).If you're running the app on an actual iOS device and perform an unencrypted backup the plist file is located at ~/Library/Application Support/MobileSync/Backup/ where is a random string. The plist file will also have a random name but is available in plaintext.JOE >> is this how itunes “backs-up” your app?Use https instead of http. This is basic network security recommendation.InstallationWhen an Enterprise Apps is in its testing phase, it can be installed on test devices using iTunes or iPCU. While this method works well for test devices, it isn’t scalable for enterprise wide deployment. It is recommended to use an over the air (OTA) deployment. It involves posting the app on a secure web server where users access and perform the installation wirelessly. To post the app on the web, you need an XML manifest file with details of the application (icon, .ipa file). When a user clicks on the web app’s installation URL, iOS installation service (ITMS) service reads the XML manifest and installs the app using the details provided in the XML manifest.With iOS 5, one of the many improvements is in app management feature, where app installs and uninstalls can be now performed using MDM APIs. This will give even greater control to IT Administrators. They can now push Apps on the eligible devices and also uninstall an app an from a device for which the app is not more relevant.You can choose to build your own Enterprise App Catalog, or evaluate many enterprise ready “App Catalog” solutions out there in the market.SDK/ToolkitIf your company plans on developing multiple applications, it is desirable to use an SDK or a toolkit. It’ll helps in reuse of common services and components.User Authentication, Auditing, Usage, Updates, Data.
  • Notification is a very interesting feature of iOS. Notifications allow you to send messages directly to the people who have installed your app, even when your app is closed. A user can be notified with an alert (a text message), a sound or a badge on the application icon.It comes in 2 flavors - Local notifications and Push notifications (also known as remote notifications).Local and push notifications serve different design needs. A local notification is local to an application on an iOS device. Push notificationsarrive from outside a device. They originate on a remote server - the application’s provider - and are pushed to applications on devices (via the Apple Push Notification service) when there are messages to see or data to download. A user is presented with the alert, which typically has “Close” and “View” buttons. The alerts can be localized to user’s locale.A typical example of a Push notification when for a chat application, an alert is seen if the user is offline and you send a chat message to a user. In this case, the chat application server sent a push notification to this user’s device.An advanced use of Push Notification is for the application server to send custom data to the application, along with the alert text. This is useful when there is a need to send extra information besides the alert message.Enabling Push NotificationTo enabled push notification, you need to enable APNS for your app in the iOS Provisioning Portal and create an APNS certificate. This certificate is use by the Application Server to send notifications to devices.After the app is installed on a device, it sends a unique device specific token to the Application Server. App server needs to store this token against the device. App Server uses the APNS certificate and a device-specific token to send Push Notifications to the devices. There are few open-source libraries for sending Push Notifications.You have 2 choices with App Servers:- Either write your own - Use an outsourced model – there are companies that can enable APNS notification for your app, with various price points per notification.
  • Troubleshooting Firewall Rules: Server network - Port 2195 & 2196, 17.0.0.0/8 IP address block Device network – Port 5223Check APNS Cert Expiry DateYou can also enable APNS console logs on a device by installing a configuration profile APNsLogging.mobileconfigavailable in Apple’s APNS troubleshooting support page.Missing NotificationsIf you are sending multiple notifications to the same device or computer within a short period of time, the push service will send only the last one. The APNS queue holds a single notification per app per device. If the service receives another notification before the one in the queue is sent, the new notification overwrites the previous one. Notifications should not contain data which isn't also available elsewhere, and they should also not be stateful.Outsources APNS: Urban Airship (http://urbanairship.com/products/push-notifications/).
  • There are varied usage of a user’s location data, ranging from social networking to navigation services. You should use this feature cautiously as it can be a huge battery drain. Evaluate various service types available to you and select the one that meets user’s requirements and is easy on battery.The standard location service is configurable and is supported in all versions of iOS. It uses a combination of GPS, Wi-Fi hotspots and cellular radio to report location data to apps. What I mean by “Configurable service” is that an app can request for the distance filter and desired accuracy. For e.g. I can have an app registering for a callback when the location changes by 1 km with 100 m accuracy.There are 2 important characteristics of significant-change location service:- Low power usage: its provides a low-power way to get the current location and detect changes to that location. This is because it uses cellular radio for location detection. This service isn’t configurable and we have observer that it typically give callbacks when a device switches cell towers.Ability to wake up app that is suspended or is even not running. The App get a callback from the OS and gets about 10 sec to perform its tasks. This is useful in situations where your app needs to perform few lightweight tasks on a regular basis, without needing user’s intervention. If you wish to perform long running task, you can start a background task which typically has an allowed runtime of 10 min.Please note that this service work of devices with cellular radios and is available only in iOS 4.0 and later.If you need regular position updates, you should use the significant-change location service where ever you can; otherwise, you should configure the parameters of the standard location service in a way that minimizes its impact on battery life.Region monitoring lets you monitor boundary crossings for a defined area. (iOS 4.0 and later).This service is useful for implementing features like geo-fencing, where you wish to react to a device going out of or coming into a pre-determined area.
  • Starting with iPhone 3GS, hardware encryption feature is available in iPhones. Its present in all iPads. In iOS 4, Data protection APIs were introduced. The goal of these APIs is to ensure critical information is secure even if the device is stolen or compromised.There was an ability to tie in the encrypted data to the passcode. What this means to a user is that, the protected files are accessible only when the device is unlocked. The Mail app uses it.The API is a filesystem API (defined in NSData class used to save a file – set NSDataWritingOptions to NSDataWritingFileProtectionComplete)Key chain API: use kSecAttrAccessibleWhenUnlocked or kSecAttrAccessibleAfterFirstUnlockApple recommends that all apps should save data using this API by default. This should be the default behavior, and This API meets the security needs of most of the applications and you should avoid encrypting data using custom encryption beyond what Apple provides. If you are developing AppStore app, the terms of AppStore requires you to get approval from US Dept of Commerce.“WWDC 2010 Session 209 Securing Application Data”
  • Lastly I wanted to provide an overview of our upcoming webinars. We also have Past Webinars posted and lots of how to content at our MaaSters Center. Here you can find mobile device management best practices, common blackberry solutions and over 300 articles and posts including training videos and free tools.

Building Apps for iPhone and iPad Building Apps for iPhone and iPad Presentation Transcript

  • Building Apps for iPhone and iPad Sumeet Singh© 2011 Fiberlink Communications MORE Webinar Series © 2011 Fiberlink Communications
  • What will I learn?> Types of Apps  Web  Native  Hybrid> Native Apps in the Enterprise> Push Notifications> Location Services> Data Protection MORE Webinar Series © 2011 Fiberlink Communications 2
  • Web App vs. Native App > Web App  Native app-like feel (HTML5, CSS3, JS)  Cross-platform  Easy installation and upgrading  No app store approval > Native App  Built in marketing (App Store)  Access to device H/W capabilities  Push notifications  User experience > Hybrid App  Leverage expertise in web technologies  Native app capabilities MORE Webinar Series © 2011 Fiberlink Communications 3
  • Web App > HTML5, CSS3, JS  Persistence  Touch events  Geolocation  Evolving standard > UI Frameworks > Installation MORE Webinar Series © 2011 Fiberlink Communications 4
  • Native App > Apple Developer Account  iOS Developer Program  iOS Developer Enterprise Program > Provisioning Portal > Mac, Objective C, Xcode IDE + iOS SDK > Builds Types & Testing App > Profiling > Internationalization MORE Webinar Series © 2011 Fiberlink Communications 5
  • Native App in an Enterprise > User Authentication > Use Secured Network Communication > Installation > SDK/Toolkit MORE Webinar Series © 2011 Fiberlink Communications 6
  • Push Notifications > Enabling Push Notifications  APNS certificate  App server (provider) Source: Apple iOS Developer Library MORE Webinar Series © 2011 Fiberlink Communications 7
  • Push Notifications > Troubleshooting Push Notification  Firewall rules  APNS certification expiry date  Enable console logging  Missing notifications MORE Webinar Series © 2011 Fiberlink Communications 8
  • Location Services > Usage > Service Types  Standard (GPS, Wi-Fi and cellular radio)  Significant-change (iOS 4.0+, cellular radio)  Region monitoring (iOS 4.0+) MORE Webinar Series © 2011 Fiberlink Communications 9
  • Data Protection > iOS4: User Passcode Tied to Encryption Mechanism > File System API > Key Chain API > All Apps MORE Webinar Series © 2011 Fiberlink Communications 10
  • Network World MDM Product TestMaaS360 is the Clear Choice Winner “Fiberlink’s MaaS360 is our Clear Choice Winner, based on its strong overall performance, particularly its ease of use. The application initially shocked us, as it was comparatively simple to deploy.” Tom Henderson, Network World MORE Webinar Series © 2011 Fiberlink Communications
  • Questions or follow-up? Sumeet Singh Wrap-up ssingh@fiberlink.com> Upcoming Webinars (http://maasters.maas360.com/webinars/)  Sept 29: Putting Employee-owned iPhones and iPads to Work> Past Webinars (http://links.maas360.com/webinars/)  Financial Services: Benchmarking your Smartphone IT Operations  Managing Devices in a Post-Intel World  Enabling iPhones and iPads in the Enterprise> Plus lots of How-To content at the MaaSters Center  Mobile Device Management Best Practices • http://links.maas360.com/mdm/  Mobile Device Management Strategy Series from Lopez Research • http://links.maas360.com/mdmstrategy/  Mobile Device Management Glossary • http://links.maas360.com/mdmglossary/  Over 300 articles and posts including training videos and free tools • http://maasters.maas360.com/ MORE Webinar Series © 2011 Fiberlink Communications 12