Professional Documents
Culture Documents
ABSTRACT:
iOS4 is designed for the mobile phone environment especially for
iphone 4. It addresses constraints of mobile phones by providing a
framework to handle low memory situations, a power management
model, and a rich software layer implementing industry standards for
communications, telephony and data rendering.
the biggest change by the introduction of ios4 is the ability to keep
apps running in limited form in the background. The feature has been
around on other smartphone platforms for years, but Apple has until
now been very resistant to the feature for its effects on battery life and
performance: on mobile processors, allowing an app full privileges is
still a drag on battery life and speed.
with The iPhone 3G will support most iOS 4 features except
1
CONTENTS
1. INTRODUCTION ................................................................................01
3. KERNEL ............................................................................................... 14
7. FEATURES .......................................................................................... 21
9. SOFTWARE UPDATE…………………………………………………
2
INTRODUCTION
3
Company / developer Apple Inc.
ABSTRACTION LAYERS
4
An abstraction layer (or abstraction level) is a way of hiding the
implementation details of a particular set of functionality. In Ios4,
there are four abstraction layers: the Core OS layer, the Core Services
layer, the Media layer, and the Cocoa Touch layer.
CFNetwork:
CFNetwork is a companion to CoreFoundation, and provides
key networking features to applications. A stack overflow exists in
CFNetwork's URL handling code. Visiting a maliciously crafted
website may lead to an unexpected application termination or arbitrary
code execution. This issue is addressed through improved memory
handling.
CarbonCore:
The Media Layer:
Media layer is responsible for playing various media files. In
iOS 4 , the MPMoviePlayerController class now defaults to
share the application's audio session for audio playback and related
audio behaviors. This allows the movie player's audio to mix with the
rest of the application's audio, as well as to conform to the behaviors
of the application audio session's audio category (such as mixing with
5
other applications' audio and/or obeying the Silent Switch). In iOS
3.1.3 and earlier, this class always uses a system-supplied audio
session.
Cocoa touch Layer :
Cocoa Touch is an API for building software programs to run
on the iPhone, iPod Touch, and iPad from Apple Inc. Cocoa Touch is
based on the Mac OS X Coco API toolset and, like it, is primarily
written in the Objective-C language. The Cocoa Touch frameworks
that drive iOS4 apps were built with a special focus on touch-based
interfaces and optimization. The unique interface of iOS4 means that
Cocoa Touch has a unique design to match. Using UIKit you have
access to the special GUI controls, buttons, and full-screen views on
iOS4. You also get to control your application with the accelerometer
and the multi-touch gesture.
Much of Cocoa Touch is implemented in Objective-C, an
object-oriented language that is compiled to run at incredible speed,
yet employs a truly dynamic runtime making it uniquely flexible.
Because Objective-C is a superset of C, it is easy to mix C and even
C++ into your Cocoa Touch applications. As your application runs,
the Objective-C runtime instantiates objects based on executing logic
— not just in ways defined during compilation. For example, a
running Objective-C application can load an interface (a nib file
created by Interface Builder), connect the Cocoa objects in the
interface to your application code, then run the correct method once
the UI button is pressed. No recompiling is necessary.
In addition to UIKit, the Cocoa Touch collection of frameworks
includes everything needed to create world-class iOS4 applications,
6
from 3D graphics, to professional audio, to networking, and even
special device access APIs to control the camera, or get location from
the GPS hardware. Cocoa Touch includes powerful Objective-C
frameworks that perform entire tasks in only a few lines of code, while
providing the foundational C-language APIs to give direct access to
the system when needed. Examples of those frameworks include:
Core Animation
Core Audio
Core Data
7
Kernel
Ios4 relies on Darwin(kernel) for
Memory Management
If you don’t follow some solid principles for memory management it’s
easy to get lazy, and then you can quickly find yourself getting stuck
for hours checking every retain and release statement.
Even worse is if you’re going through someone else’s code, and they
messed things up. Going through to fix memory management in
someone else’s code can take forever. Clang is a tool which works
well with an interface such as this one: Clang GUI For Mac OS X.
You can also use SHIFT-CMD-A (build & analyze) in Xcode to bring
up clang alerts. Clang will notify you of any reference count
problems, and syntactical mistakes that could lead to messed up
memory management. Even with Clang you can still run into
problems.
8
Application Development
With the iOS SDK 4, you can get started developing your iOS
application for iPad, iPhone, and iPod touch today. Access the iOS
Dev Center for a wealth of resources including videos, sample code,
technical documentation, Coding How-To’s, and more.
Development tools in iOS SDK 4
Xcode
iPhone Simulator
Run, test, and debug your application locally on your Mac using a
simulated iPhone and iPad.
Instruments
Interface Builder
Development Resources
9
Getting Started Videos & Documents
Coding Resources
The application life cycle constitutes the sequence of events that occurs
between the launch and termination of application. In iOS, the user
launches application by tapping its icon on the Home screen. Shortly
after the tap occurs,
From this point on, the bulk of the initialization work is handed over
to UIKit, which loads the application’s user interface and start its
event loop.
10
There is predefined sequence of event that occurs from the time of
application start up to the time it quits.
11
There were only two possible states of third party application in iOS 3
Active
Not running
12
execution time may remain in this state for a period of time. In
addition, an application being launched directly into the background
enters this state instead of the inactive state.
After knowing these facts, there could be some obvious questions like
applicationWillEnterForeground
applicationDidBecomeActive
13
Opting out of background execution is strongly discouraged but may
be preferable under certain conditions.
If the user accepts the interruption, the application moves into the
suspended state.
14
FEATURE
Multitasking:
Apple's multitasking works a little differently than on other
smartphones. Instead of having all device resources available to every
running app, iOS 4 lets only seven app services run in the background.
These include audio (you'll be able to play Pandora radio, for
example), VoIP services like Skype, GPS/location for apps like
TomTom, push notifications, local notifications (those that don't to
have to go through a server), task completion (users get an alert when
a process is finished), and fast app switching (apps essentially
hibernate not to use the CPU). According to Apple, this arrangement
will have less of a drain on resources like battery life and memory
than if it gave developers free rein. Also, pausing most background
apps will free the system from having to juggle resources and kill
stalled applications.
• Audio: you can now listen to streaming music from apps, like
Pandora or newscasts through the NPR app, while doing other
activities on your phone. Previously, you would have to quit out
of the app (and therefore stop your music stream) if you wanted
to respond to an SMS or read your e-mail, and now that's no
longer the case. Hallelujah.
• VoIP: similarly, you can carry on Voice Over IP calls on
services like Skype without having to quit the app if you need to
perform other tasks.
• Location: apps that need to poll your location, such as GPS and
direction apps, will be able to do so in the background. No
longer will you need to keep the app in the foreground just so it
can keep track of where you are.
• Local notifications: third-party apps no longer have to rely
solely on push notifications if they want to alert you of
15
something on your phone. If you have an alert set in, say, one of
Omni's applications, it can ping you when the time comes
instead of having to go through a convoluted series of Internet
tubes to get to you. This, of course, reduces your reliance on an
Internet connection to get certain types of alerts and helps cut
down on overall wireless bandwidth.
• Complete tasks: if you start a task in an application and then
switch to another one (such as downloading a new map in your
favorite game), it can now complete the task in the background
instead of forcing you to sit there and wait on it.
• Fast app switching: this is basically "pausing" an app where it
is, which allows you to quickly switch away from it and then
switch back, picking up where you left off.
Virtual Keyboard
Home Screen
16
and get an expanded view of the folder's contents. Alternatively,
if you want to remove an app, just drag it back to the home
screen. You can add as many folders as you like, change the
default folder name, and add both related and unrelated apps.
Surprisingly, we could even group legacy features like
the Weather and Stock applications into a single folder. Apple,
we're limited to just 12 apps in one folder?
Unified inbox
Though the iPhone always has been a functional e-mail
machine, we never enjoyed switching back and forth among
multiple accounts to read new messages. Fortunately, iOS 4 has
a new unified in-box that is accessible under the "Mail" option
on your home screen. Listed above your individual in-boxes is a
new option for "All inboxes," which contains messages from
multiple accounts. You can't access individual folders from the
universal in-box, but you can delete and move messages.
Camera Zoom
You'll have to wait for the iPhone 4 to get a 5-megapixel
shooter, but iOS 4 adds a 5x zoom for the still camera. When
taking a photo, just tap the screen to see the zoom bar. Use your
finger to pan in and out, but remember that since this is digital
zoom, picture quality will degrade as you zoom in.
Geolocation
The addition of Geolocations lets you view where you took
your latest shots on a map and sort your images by location.
This is quite a cool feature, particularly for frequent travelers
17
who like to mark their journeys around the world. But if this
isn't your thing, you can turn off location services in the
Settings menu.
Safari Search
When typing a URL in the Safari browser, you'll see not only
the URL title of sites you've visited recently, but also the full
Web address. That's a nice touch.
Game Center
FaceTime
FaceTime is just another way iOS 4 seamlessly integrates
hardware and software to make every iPhone feature as easy to
use as it is groundbreaking. Now when you wish your friends
could be there, they actually can be. With just a few taps, you
can see your friends and family while you talk to them —
iPhone 4 to iPhone 4 or new iPod touch over Wi-Fi.
18
Hardware and software made for each other
Because Apple makes both the iPhone hardware and the
operating system, everything works together seamlessly and
intelligently. This integration enables apps to take full
advantage of iPhone hardware features such as the Retina
display, the Multi-Touch interface, the accelerometer, the three-
axis gyro, GPS, accelerated graphics, and more. FaceTime is a
perfect example. It uses both iPhone 4 cameras, the display, one
of the two microphones, and your Wi-Fi connection. If you’re
on a voice call with someone and want to start a video call,
FaceTime switches mics, turns on the front camera, and verifies
your Wi-Fi connection — quickly and invisibly.
19
Ready for business
Businesses around the world are choosing iPhone for its
enterprise-ready features and powerful security. iOS 4 works
with Microsoft Exchange and standards-based servers to deliver
over-the-air push email, calendar, and contacts. iOS 4 protects
your data by encrypting information in three separate areas: in
transmission, at rest on the device, and when backed up to
iTunes. You can securely access private corporate networks
through industry-standard VPN protocols. And companies can
easily deploy iPhone across an enterprise using configuration
profiles.
20
ADVANTAGES AND DISADVANTAGE
Advantages of ios4
The Camera Functions
It is striking that the support iOS 4 to the earlier version of
iPhone3 The start speed is faster and the focus is more
accurate.
Folder Settings
Folder settings are the first time appearing in iOS. The result is
very obvious when starting to use. The home page layout
becomes well-organized. It is convenient to find the folders for
the software come down in the appropriate folders.
Spelling Test
This is one of the auxiliary functions of input method. It is
relatively simple but very useful. When the users compose a
message, they just need to type some letters then they can
choose the full terms below.
Unified Inbox
Business people often have multiple e-mail address in order to
deal with different customers. iOS 4 draws on a similar feature
in BlackBerry. Users can view many different accounts / email
from different service providers in a single inbox. It supports
quick preview and users can understand about the content
without opening the mail.
Multi-tasking
OS 4.0 version can run multiple applications simultaneously
and is in no way inferior to other similar operating systems .
21
Users can schedule an application to be run in the background.
When the system detects update or notice, it will appear in the
current interface. But due to technical reasons, only iPhone 4,
iPhone 3GS and above can enjoy the service.
Disadvantages of ios4
Semi-thread message
In Gmail, all the similar topics are arranged together and show
through the session way. iOS tryed to do that, but the actual
result is not satisfactory.
There is no real features upgrade for iPod
The new operating system's home page has much improvement
to the older. But the iPod itself does not get the nature
improvement. It is lack of adjustable graphic equalizer, and
better support to create playlists.
Mail does not support attachment
In general, iOS 4 did give users a better user experience, but it
needs to make improvements in commonly used functions.
After all, now in smart phone OS, there are still Android,
BlackBerry and other strong rivals. Ios needs to innovate
continually then it will gain market recognition.
22
Known Issue
AV Foundation
Xcode
Debugger
23
windows will show Program received signal:
"EXC_BAD_ACCESS" and the toolbar buttons for stepping
through the code will be disabled. To recover, choose “Sync
with Debugger” from the Run menu and continue debugging.
Interface Builder
GameKit
Simulator
24
UIImagePickerController object to hang an application
when launched in the iOS 4 simulator. The cancel button is
disabled and the only way out of an application once the image
picker is shown (with the camera for the source type) is to kill
the application manually.
UIKit
25
• iPhone 4 uses a different system font than earlier devices.
References to the Helvetica font in nib files will be decoded as
the system font on these newer devices.
• The UIKit Text Input System never calls the methods found in
the documentation under the "Determining Layout and Writing
Direction" category.
Software Update
Application Sandbox
The Application Sandbox does not prevent applications from
directly accessing the user's photo library. This may allow an
application to determine visited locations without authorization.
This issue is addressed by modifying the Application Sandbox
to prevent direct access to the user's photo library.
ImageIo
26
value, may be able to cause an unexpected application
termination or arbitrary code execution. This issue is addressed
Through improved bound checkings.
LibXml
Multiple use after free issues exist in libxml2, the most serious
of which may lead to an unexpected application termination.
The issues are addressed through improved memory handling.
Settings
A design issue exists in the Settings application. When
connected a hidden wireless network, the Settings application
may incorrectly indicate another wireless network. This issue is
addressed by properly displaying the active wireless network.
Webkit
A buffer overflow exists in WebKit's parsing of floating point
numbers. Visiting a maliciously crafted website may lead to an
unexpected application termination or arbitrary code execution.
The issue is addressed through improved bounds checking.
A canonicalization issue exists in WebKit's handling of UTF-7
encoded text. An HTML quoted string may be left
unterminated, leading to a cross-site scripting attack or other
issues. This issue is addressed by removing support for UTF-7
encoding in WebKit.
When WebKit is redirected from an HTTPS site to an HTTP
site, the Referer header is passed to the HTTP site. This can
lead to the disclosure of sensitive information contained in the
URL of the HTTPS site. This issue is addressed by not passing
27
the Referer header when an HTTPS site redirects to an HTTP
site
Comparing ios4 with other mobile os
Apple iOS 4 vs. Android
iOS 4 remembers the email addresses of senders you reply to, adding
them to a database of contacts that it looks up automatically as you tap
characters into the To and Cc fields; Android doesn't do that. Both
operating systems let you add email addresses to your contacts list by
tapping them.
28
Corporate email, contacts, and calendar support. Android OS 2.2
is significantly inferior to iOS 4 when it comes to corporate email
capabilities. That's mostly because Android OS 2.2 supports just a
limited set of Exchange ActiveSync (EAS) policies, so most corporate
Exchange environments are unlikely to permit access. The biggest
omission is support for on-device encryption, which is a basic EAS
requirement. You can tell Exchange to ignore such policy misses, but
that lets any noncompliant device onto the Exchange server -- not a
viable option for most enterprises. Although iOS 4's EAS support is
nowhere near as extensive as what BlackBerry and Windows Mobile
offer, it remains the most compliant of any new-gen mobile OS.
29
cursor (sort of like using a mouse); a magnifier appears to help you
move precisely to where you want to go. You then add and delete text
at that location.
Along these lines, copy and paste -- and even basic selection -- is
often not available in Android OS 2.2. In some fields, tapping and
holding brings up a contextual menu that lets you copy or paste the
entire field's contents; in others you can't even do that. Although the
browser lets you select and copy text, this ability is not universal. For
example, you can't select text in email messages. In iOS, any textual
item can be selected, and you can adjust specifically what text is
selected by using little sliders. It's easy, intuitive, and universal.
Conclusion
Apple is again rounding out their offering with iOS 4, which is
the sign of the maturity of the platform. Since they’ve stated
several times now that they’re using the iPhone to “educate”
users about multitouch interfaces, they’re going to continue
keeping changes evolutionary for now, and the UI broadly
consistent across devices. There won’t be any huge,
revolutionary changes again until they have to, and they don’t
have to yet. Restraint can be a virtue.
Some functionality is still not present, like non-interuptive
notifications, widgets beyond the limited fast task switcher UI,
wireless sync/sharing, less painful file round-tripping, etc. but
Apple is no doubt working on this the way they worked on copy
and paste and multitasking. The question is how and when, not
if. After all, it’s only 9 or 10 months until the iOS 5 sneak
preview in spring 2011.
30
REFERENCE
1. http://www.tipb.com/2010/06/14/ios-4-walkthrough/
2. http://developer.apple.com
3. http://www.net-security.org
4.
31