ios SDK possibilities & limitations
Licensing
Licensing Registered as an Apple Developer (free) Access to XCode3 and ios SDK ios, Mac and Safari Dev Center Resources No possibility of distribution of developed apps! ios Developer Program ($99 / Year) Access to the newest XCode4 and ios SDK Allows creating free and commercial apps for distribution on the App Store All development/testing needs to be done on Mac
Possible use with SMAP7 Querying and retrieving surveys from the server Sending survey results to the server Integration with HTML5 Offline caching Storing data on the phone database Push/Pull notifications Integration with multimedia Use of GPS data
Problem! How to take advantage of HTML5 and native iphone features? Safari doesn t support all of the HTML5 functionality but most importantly, it doesn t allow access to system functions Implementing a native iphone app from scratch does not make sense, as it doesn t take any advantage of HTML5
PhoneGap Open Source Mobile Framework supporting 6 mobile platforms (ios, Android, Blackberry, Symbian, Palm webos and Windows Phone coming up soon) Develop web application using HTML5, CSS, JavaScript Use PhoneGap framework to get access to native APIs Deploy native application to multiple platforms
PhoneGap Not all of the native functionality is supported, but the most interesting and useful features are available: Camera Geo Location Media Storage Notifications Relies on phone browser HTML5 support
PhoneGap We don t need to study Objective-C We don t need to develop native iphone application replicating the same functionality across the project We have an open source community support and multiple code examples and tutorials to use
Push Notifications Very small in size (max payload of 256 bytes), used to send very short and brief messages (not suitable for forms) Need to have APNS and obtain unique SSL certificate to handle push notifications for the specific app It s not free, it requires having the developer license ($99/Year) Urban Airship as a free commercial tool to support push notifications EasyAPNS is an alternative open source PhoneGap tool Unfortunately it also requires SSL certificate for the production app Probably not very useful with this project anyway Could use it with the news notification system Send update about new surveys added to the system (?)
Urban Airship Free for the first 1,000,000 messages sent / month, $0.001 for every message after that Will do the work for systems with small number of users For big systems, it actually becomes quite expensive Still requires Apple Developer License ($99/Year) Native iphone Objective-C API In order to make it working with PhoneGap, a set of bridge functions would need to be developed from scratch to map Urban Airship Objective-C API with PhoneGap Javascript API
Pull Notifications Just simple querying of the external server Required to implement a protocol to communicate with the server (preferably via TSL) Communication and data transfers to and from the server / web app developed to deal with external databases Does not require any special licenses or features enabled handled from the application level
Safari HTML5 Compatibility Safari scores 206/400 in the HTML5 compatibility test Not too bad comparing to other browsers (even FireFox4.0 doesn t score much higher) Missing features: Microdata WebGL Files API Workers Local Devices WebM and Off Theora video/audio support Advanced forms support
Objective-C Native programming language for the ios Extensive API Multiple books / discussion boards / tutorials on implementing various features We will try to avoid using it Take advantage of HTML5 using the PhoneGap API Use only if necessary to develop required PhoneGap bridging functions (if not available in the existing API) Phone development should be kept minimal (we want to have a comfort of having one single app being deployed to multiple platforms without need of applying any significant changes)
PhoneGap code samples Write to file Take a photo
PhoneGap code samples Execute SQL query (internal database SQL Lite)
PhoneGap code samples Retrieving current position (GPS)
PhoneGap capabilities Other PhoneGap features include use of the following: Accelerometer Camera Compass Contacts Device Events File Geolocation Media Network Notification Storage
Summary iphone is HTML5 ready PhoneGap will be used to develop web application with an access to the device system functions We need to obtain an ios Developer Program License in order to use push notifications and distribute an app We need to have an access to Macs