Tuesday, 22 April 2014

Elance iOS 4.2 Programming Skills Test Questions


Elance iOS 4.2 Programming Skills Test Questions

In This post you can find question that are frequently asked in elance.

Question: 01
While opening Nib files, which of the following should not be ignored?


    a.     Objects in a Nib file typically have connections between them that should not be broken.
    b.     If Objects in a Nib file have broken connections, they should not be restored.
    c.     The size of the files.
    d.     None of the above


Question: 02
What type of value is assigned to the loc-args child property of alert property in an Apple Push Notification?


    a.     string
    b.     array of strings
    c.     number
    d.     dictionary


Question: 03
Which of the following properties of the GKSession class is read-only?


    a.     available
    b.     delegate
    c.     displayName
    d.     peerID
    e.     sessionID


Question: 04
Locking all connections before editing the Nib files can be achieved by using:


    a.     An option in the Start Menu.
    b.     An option in the Preferences panel of Interface Builder.
    c.     An option in the Preferences panel of Language Directory.
    d.     Any of the above.


Question: 05
When you send an object a retain message in Memory Management using Objective-C, what will happen?


    a.     Its retain count is incremented by 1.
    b.     Its retain count is decremented by 1.
    c.     Its retain count remains same.
    d.     Its retain count is set to 0.


Question: 06
Which of the following properties of the UIImage class affects the way the image data is displayed when drawn?


    a.     CGImage
    b.     leftCapWidth
    c.     imageOrientation
    d.     scale
    e.     size


Question: 07
What is the function of the Code Sense feature in Xcode?


    a.     Code Sense helps in switching between different circumstances such as development or release.
    b.     Code Sense maintains an index that contains important information for your project.
    c.     Code Sense creates a cache for the files which are being used frequently.
    d.     Code Sense maintains an index of files used in a project.


Question: 08
When using a Cocoa framework, what will all ControlEvents method of UIControl class return in case it fails to create the object?


    a.     failure to create
    b.     no object to return
    c.     status code 420
    d.     nil


Question: 09
Which of the following reasons will return a value of NO for the instance method startVideoCapture of class UIImagePickerController?


    a.     Movie capture is already in progress.
    b.     The device does not support movie capture.
    c.     The device is out of disk space.
    d.     All of the above


Question: 10
Which of the following animation class provides simple interpolation between values for a layer property?


    a.     CABasicAnimation
    b.     CAKeyframeAnimation
    c.     CATransition
    d.     CAAnimationGroup


Question: 11
If you want to rotate an object using Core Animation, in radians, in the z axis, which of the following key paths of a layer's CATransform3D matrix will you use?


    a.     rotation
    b.     rotation.xy
    c.     rotation.x
    d.     rotation.y
    e.     rotation.z


Question: 12
How much time in seconds will it take to display an animation if you have 60 images using UIImageView class for the property animationDuration?


    a.     1
    b.     2
    c.     10
    d.     15


Question: 13
You want to animate a layer's opacity to 0 while moving it further away in the layer. Which of the following code snippets will you use?


    a.     theLayer.opacity=0.0;
theLayer.zPosition=0;
    b.     theLayer.opacity=0.0;
theLayer.zPosition= -100;
    c.     theLayer.opacity=0.0;
theLayer.zPosition=100;
    d.     theLayer.opacity=1.0;
theLayer.zPosition=0;


Question: 14
Which of the following types of audio files has NO size restriction?


    a.     AIFF
    b.     WAVE
    c.     CAF
    d.     All of the above have file size restrictions.


Question: 15
Which of the following properties of ADBannerView class are read-only?


    a.     bannerLoaded
    b.     currentContentSizeIdentifier
    c.     bannerViewActionInProgress
    d.     delegate
    e.     requiredContentSizeIdentifiers


Question: 16
Which of the following is NOT a parameter of function SecKeyDecrypt of the class SecCertificate in iPhone OS 4.0?


    a.     key
    b.     padding
    c.     cipherText
    d.     certificate


Question: 17
What happens if Xcode is not able to find a file or folder at the path defined for it in the project?


    a.     Xcode skips the file or the folder and continues execution.
    b.     Xcode gives an alert with a description of the missing file.
    c.     Xcode displays the item in red in the project window.


Question: 18
What is the default value of the borderColor property of the CALayer class?


    a.     0
    b.     nil
    c.     opaque black
    d.     dark black


Question: 19
Before editing the Nibs, one should:


    a.     Unlock all connections.
    b.     Lock all connections.
    c.     Break all connections.
    d.     None of the above


Question: 20
What is the default setting to refer to file locations in your Xcode project?


    a.     Relative to Build Product
    b.     Relative to Project
    c.     Relative to Enclosing Group
    d.     Relative to <source path>
    e.     Absolute Path


Question: 21
Which of the following are new features to have been introduced in iPhone OS 4.0?


    a.     Multitasking
    b.     Apple Push Notification Service
    c.     Local Notification
    d.     Gesture Recognizers


Question: 22
Which of the following directives are used to declare and define classes, categories, and protocols?


    a.     @interface
    b.     @implementation
    c.     @protocol
    d.     @class
    e.     @end


Question: 23
By default, is the search interface visible in the UISearchDisplayController class?


    a.     Yes
    b.     No


Question: 24
Which of the following statements is correct regarding functions fopen and open in generic C?


    a.     fopen returns an error if the file does exist.
    b.     fopen does not automatically create the file if it does not exist.
    c.     open returns an error if the file does exist.
    d.     open returns a file descriptor.


Question: 25
When your session becomes active, which of the following iPhone OS 4.0 audio session categories allows other audio to continue playing?


    a.     AVAudioSessionCategoryAmbient
    b.     AVAudioSessionCategorySoloAmbient
    c.     AVAudioSessionCategoryPlayback
    d.     AVAudioSessionCategoryRecord


Question: 26
Which of the following terms are related to Memory Management in Objective-C?


    a.     alloc
    b.     mutableCopy
    c.     delete
    d.     release


Question: 27
Which part of the HTTP Live Streaming is responsible for taking input streams of media and encoding them digitally?


    a.     Server component
    b.     Distribution component
    c.     Client software
    d.     None of the above


Question: 28
What is the functionality of the beta parameter of function catlas_caxpby in class cblas?


    a.     Input vector X
    b.     Input vector Y
    c.     Scaling factor for X
    d.     Scaling factor for Y


Question: 29
What is the datatype of the parameter inValidBitsPerChannel for the function CalculateLPCMFlags in CoreAudioTypes class in iPhone OS 4.0?


    a.     UInt32
    b.     bool
    c.     Float32
    d.     UInt64


Question: 30
Which of the following properties of the CAKeyframeAnimation class represents an optional array of NSNumber objects that define the duration of each keyframe segment?


    a.     path
    b.     keyTimes
    c.     rotationmode
    d.     continuityValues


Question: 31
If the code is written using the Core Foundation and Foundation macros, the simplest way to create strings files is:


    a.     Using an option in the Preferences panel of Interface Builder.
    b.     By merging the comments from the individual entries into one comment string.
    c.     By unlocking all connections.
    d.     By using the genstrings command-line tool.


Question: 32
Which Core Audio Service framework is used to record, play back, pause, loop, and synchronize audio in iPhone OS 4.0?


    a.     Audio Queue
    b.     Music Sequencing Services
    c.     Core Audio Clock
    d.     System Sound Services


Question: 33
What is the data type of extendStart parameter of function CGShadingCreateAxial of class CGShading?


    a.     CGFloat
    b.     CGPoint
    c.     bool
    d.     CGFunctionRef
    e.     int


Question: 34
Which of the following languages can be used to write the code for Xcode projects?


    a.     C
    b.     C++
    c.     Objective-C
    d.     Objective-C++
    e.     Java


Question: 35
Which of the following debugging tasks are provided by Xcode to find and squash bugs in your code?


    a.     Add and set breakpoints.
    b.     View your call stack per thread.
    c.     View the value of variables by hovering the mouse pointer over them.
    d.     Execute a single line of code.
    e.     All of the above


Question: 36
What is the default value of allowsEditing property of UIImagePickerController class in iPhone OS 4.0?


    a.     NO
    b.     YES
    c.     enable
    d.     disable


Question: 37
Which of the following are the Derivative types defined in Objective-C?


    a.     short
    b.     long
    c.     long long
    d.     int


Question: 38
When the genstrings tool discovers a key string used more than once in a single strings file, it:


    a.     deletes the comments from the individual entries and leaves one comment string without generating a warning.
    b.     merges the comments from the individual entries into one comment string and generates a warning.
    c.     differentiates the comments from the individual entries into various strings and generates a warning.
    d.     None of the above


Question: 39
Which of the following statements regarding Objective-C are correct?


    a.     In Objective-C, the keyword for NULL is nil.
    b.     In Objective-C, #import and #include compiler directives carry out the same operations.
    c.     In Objective-C, for the object-oriented constructs (such as method return values), id is the default data type.
    d.     The keyword nil has an id with a value of 0.


Question: 40
Which symbol is used as a syntactic marker for blocks of code in iPhone OS 4.0?


    a.     ~
    b.     $
    c.     ^
    d.     *

Thursday, 6 February 2014

How To Sumbit your App to AppStore !!


                 Are you ready To Sumbit Your Application on Appstore  ?

You have worked weeks or months on your first iOS application and you are ready to submit your masterpiece to Apple's App Store. How do you do this? Is your application ready for submission? I am sure that some of these questions have entered your mind at one point or another. Is submitting an application as simple as sending Apple your application's binary? Not quite. With this tutorial, I will provide you with a detailed map to get your application submitted to Apple's App Store. Just to keep it simple lets start with introduction ang then folow these simple steps .

Introduction

Even though the App Store review process is a black box for the most part, that doesn't mean that you can't prepare yourself and your application for Apple's review process. Apple provides guidelines to help you stay within the sometimes invisible boundaries of what is and isn't allowed in the App Store.
The first time you submit an application to the App Store is exciting and nerve-racking at the same time. Even for experienced iOS developers, submitting an application to the App Store is often a stressful undertaking because it is something that most developers don't do on a daily basis.
Throughout this article, I am assuming that you are a registered iOS developer which means that you are enrolled in Apple's iOS Developer Program and are allowed to submit applications for publication in the App Store. To submit an iOS application to the App Store, you need to be a registered iOS developer. Red flag? Don't worry. You can enroll in Apple's iOS Developer Program by visiting this linkand clicking the Enroll Now button.

How To Submit an iOS App to the App Store - Enrolling in Apple's iOS Developer Program
Figure 1: Enrolling in Apple's iOS Developer Program

1. Is your application ready?

Step 1: Testing

An application isn't necessarily ready when you've written the last line of code or implemented the final feature of the application's specification. Have you tested your application on one or more physical devices? Have you profiled your application for memory leaks and performance issues? Does your application crash from time to time? The family of iOS devices has grown substantially over the past years and it is important to test your application on as many iOS devices as you can lay your hands on. Common issues include not optimizing an application for the iPhone 5's 4" screen or the iPad Mini's 7.9" screen.
The iOS Simulator is a great tool, but it runs on your Mac, which has more memory and processing power than the phone in your pocket. I can assure you that the differences in performance between an old(er) iPhone 3GS and an iPhone 5 are like night and day. As an iOS developer, you should never get rid of an old iOS device as long as you build or maintain applications that can run on any of these older devices.
Apple's Review Process isn't airtight, but it is very capable of identifying problems that might affect your application's user experience. If your application crashes from time to time or it becomes slow after ten minutes of use, then you have some work to do before submitting it to the App Store. Even if Apple's review team doesn't spot the problem, your users will. If the people using your application are not pleased, they will leave bad reviews on the App Store, which may harm sales or inhibit downloads.

Step 2: Rules and Guidelines

As I mentioned earlier, Apple provides developers with a number of documents that are a great help during the creation and development process of your application. The documents that you should be aware of are the iOS Human Interface Guidelines and the App Store Review Guidelines. Despite the availability of these documents, it seems that few developers take the time to browse them, let alone read them. It shouldn't be a surprise that some applications are therefore rejected even though the reason for the rejection is clearly stated in these documents.
Even if you don't intend to read the iOS Human Interface Guidelines or the App Store Review Guidelines, it is important to know about some of the rules that they talk about. Take a look at the short list below to get an idea of what your application should and shouldn't do.
Your application ...
  • doesn't crash.
  • shouldn't use private API's.
  • shouldn't replicate the functionality of native applications.
  • should use In App Purchase for in-app (financial) transactions.
  • shouldn't use the camera or microphone without the user's knowledge.
  • only uses artwork that you have the copyright of or you have permission to use.
Keep in mind that this is a tiny subset of the guidelines included in the aforementioned documents. The majority of the rules and guidelines are trivial, but some are not and you might even violate some of them inadvertently. Let me give you an example. Before Apple started using its own maps, the MapKit framework used Google's maps. This was clear to the user because of the small Google logo in the bottom left corner of each map. However, if some part of your application's user interface covered or obscured Google's logo, your application would get rejected. This rule seems trivial, but it is a rule that is easily violated if you're not careful. Even automated tests won't cover you in this case.

2. Prerequisites

Before you can even start thinking about submitting your application to the App Store, you need to make sure that you have an App ID, a valid distribution certificate, and a valid provisioning profile. Let me show you what this entails.

Step 1: App ID

Every application needs an App ID or application identifier. There are two types of application identifiers, (1) an explicit App ID and (2) a wildcard App ID. A wildcard App ID can be used for building and installing multiple applications. Despite the convenience of a wildcard App ID, an explicit App ID is required if your application uses iCloud or makes use of other iOS features, such as Game Center, Apple Push Notifications, or In App Purchase.
If you're not sure what App ID best fits your project, then I recommend readingTechnical Note QA1713 for more information about this topic.

Step 2: Distribution Certificate

To submit an application to the App Store, you need to create an iOS provisioning profile for distribution. To create such a provisioning profile, you first need to create a distribution certificate. The process for creating a distribution certificate is very similar to creating a development certificate. If you have tested your application on a physical device, then you are probably already familiar with the creation of a development certificate.
If you need to refresh your memory, I suggest reading Apple's detailed guide about signing certificates and provisioning profiles. The process is not difficult once you understand how the various pieces of the puzzle fit together.

Step 3: Provisioning Profile

Once you've created an App ID and a distribution certificate, you can create an iOS provisioning profile for distributing your application through the App Store. Keep in mind that you cannot use the same provisioning profile that you use for ad hoc distribution. You need to create a separate provisioning profile for App Store distribution. If you use a wildcard App ID for your project, then you can use the same provisioning profile for multiple applications.

Step 4: Build Settings

With the App ID, distribution certificate, and provisioning profile in place, it is time to configure your target's build settings in Xcode. This means selecting the target from the list of targets in Xcode's Project Navigator, opening the Build Settings tab at the top, and updating the settings in the Code Signing section to match the distribution provisioning profile you created earlier. Newly added provisioning profiles are sometimes not immediately visible in the Code Signing section of the build settings. Quitting and relaunching Xcode remedies this issue.

How To Submit an iOS App to the App Store - Configuring the Target's Build Settings
Figure 2: Configuring the Target's Build Settings

Even though the code signing process is fairly simple once you understand it, it is something that trips up a lot of developers. I don't know a single Cocoa developer who hasn't run into code signing issues at some point in their career. Once you've taken this hurdle, the rest of the submission process is fairly easy.

Step 5: Deployment Target

It is useful to write a few words about your application's deployment target. Each target in an Xcode project, has a deployment target, which indicates the minimum version of the operating system that the application can run on. It is up to you to set the deployment target, but keep in mind that modifying the deployment target is not something you can do without consequences once your application is in the App Store. If you increase the deployment target for an update of your application, then users who already purchased your application but don't meet the new deployment target, cannot run the update. It gets really problematic when a user downloads an update through iTunes (not the device), replacing the previous version on their computer, and then discovers that the new update doesn't run on their device.
I have two very simple tips with regards to your application's deployment target. (1) Be very careful when you decide to increase the deployment target of an existing application. Mention this in the application's release notes of the updates that precede the change and again in the update that uses the new deployment target. If your warn your customers well in advance, you have done all you can to prevent potential problems. (2) For new applications, I almost always set the deployment target to the last major release, iOS 6 at the time of writing. Because of the incredible adoption rate of new iOS releases, there is no harm in doing this. Some people think that they miss out on a large chunk of the market, but that is not true. Take the release of iOS 6 as an example. One month after the release of iOS 6,more than 60% of iOS devices had upgraded to the new version of iOS. Unfortunately, the same isn't true for Android.

3. Assets

Step 1: Icons

You probably know that an application icon is a vital component of every iOS application, but you need to make sure that your application ships with the correct sizes of the artwork. Take a look at the list below for an overview.
  • iTunes Artwork: 1024px x 1024px (required)
  • iPad/iPad Mini: 72px x 72px and 114px x 114px (required)
  • iPhone/iPod Touch: 57px x 57px and 114px x 114px (required)
  • Search Icon: 29px x 29px and 58px x 58px (optional)
  • Settings Application: 50px x 50px and 100px x 100px (optional)
It goes without saying that you don't need to include an application icon for the iPad/iPad Mini device family if your application only targets the iPhone/iPod Touch device family, and vice versa.

Step 2: Screenshots

Each application can have up to five screenshots and you must provide at least one. If you are developing a universal application, then you need to provide separate screenshots for iPhone/iPod Touch and iPad/iPad Mini. In addition, you can optionally include separate screenshots for the 3.5" and the 4" screen sizes of the iPhone/iPod Touch. This is quite a bit of work and you want to make sure that the screenshots show your application from its best side. Shiny Development sells a Mac application, Status Magic that helps you get the status bar in your screenshots right. Status Magic will save you quite a bit of time.
It is important to spend some time thinking about the screenshots. Your application's screenshots are often the only thing that a customer can use to decide whether she purchases or downloads your application or not. What a lot of developers don't know is that the screenshots don't have to be actual screenshots. The hard rule is that the size of each screenshot needs to be that of the screen size of the target device. Many companies are creative with this rule. Take a look at the screenshots of Where's My Water?, for example. By using this strategy, screenshots can be much more attractive and compelling.

Step 3: Metadata

Before you submit your application, it is a good idea to have your application's metadata at hand. This includes (1) your application's name, (2) the version number, (3) the primary (and an optional secondary) category, (4) a concise description, (5) keywords, and (6) a support URL. If you are submitting an update, then you can also provide information for the What's new in this Version section.
Does your application require users to sign in? Then you also need to provide Apple with a test or demo account to make sure that the review team can immediately sign in and use your application without first having to sign up for an account.

4. Submission Preparation

The submission process has become much easier since the release of Xcode 4. You can now validate and submit an application using Xcode, for example. First, however, you need to create your application in iTunes Connect.
Visit iTunes Connect, sign in with your iOS developer account, and click Manage Your Apps on the right. Click the Add New App in the top left, select iOS App, and fill out the form.

How To Submit an iOS App to the App Store - Visit iTunes Connect to Get Started
Figure 3: Visit iTunes Connect to Get Started

Step 1: Basic Information

The App Name, which needs to be unique, is the name of your application as it will appear in the App Store. This can be different than the name that is displayed below your application icon on the home screen, but it is recommended to choose the same name. The SKU Number is a unique string that identifies your application. I usually use the application's bundle identifier. The last piece of information is theBundle ID of your application. This means selecting the (wildcard or explicit) App ID that you created earlier from the drop down menu.

How To Submit an iOS App to the App Store - Specifying Name, SKU Number, and Bundle ID
Figure 4: Specifying Name, SKU Number, and Bundle ID

Step 2: Price and Availability

In the next step, you specify your application's price and availability. Apple works with price tiers so that you don't have to specify a price for each country that Apple operates in. You can also specify in which stores your application should - or shouldn't - be available. The information that you enter in this step can be modified once your application is live in the App Store. In other words, you can change the price and availability of an application without having to submit an update.

How To Submit an iOS App to the App Store - Specifying Price and Availability
Figure 5: Specifying Price and Availability

Step 3: Metadata

We've already covered the application's metadata. The only aspect that I haven't talked about yet is your application's rating. Based on your application's content and functionality, it is given a rating. This rating is not only useful for telling users about your application's content and features, the rating is also used by the operating system for the parental controls features.
It is strongly recommended that you don't try to outsmart the rating system. Apple is well aware of this and will reject your application if it doesn't agree with the rating that you have set.

How To Submit an iOS App to the App Store - Entering Your Application's Metadata and Assigning a Rating
Figure 6: Entering Your Application's Metadata and Assigning a Rating

Step 4: Ready to Upload Binary

Once your application's metadata is submitted, you will be presented with a summary of your application. Under Versions, you should see the version that you submitted a moment ago. Click the View Details button and click the Ready to Upload Binary button in the top right. You are then asked one or more questions regarding your application and, if all went well, you should see a message telling you that you are now ready to upload your application binary. The status of your application has changed to Waiting for Upload.

How To Submit an iOS App to the App Store - Your Application's Summary
Figure 7: Your Application's Summary

5. Uploading Binary

To submit your application, you need to create an archive of your application. You can only create an archive by building your application on a physical device. If you select the iOS Simulator in the active scheme, you will notice that the Archiveoption in Xcode's Product menu is grayed out. Connect an iOS device to your Mac, select it in the active scheme, and select Archive from Xcode's Product menu.

How To Submit an iOS App to the App Store - Archiving Your Application using Xcode
Figure 8: Archiving Your Application using Xcode

If all went well, you should now have an archive and Xcode's Organizer should automatically open and show you the archive you just created. Select the archive from the list and click the Distribute... button on the right. From the options you are presented with, select Submit to the iOS App Store. After entering your iOS developer account credentials and selecting the Application and Code Signing Identity, the application binary is uploaded to Apple's servers. During this process, your application is also validated. If an error occurs during the validation, the submission process will fail. The validation process is very useful as it will tell you if there is something wrong with your application binary that would otherwise result in a rejection by the App Store review team.

How To Submit an iOS App to the App Store - Archiving Your Application using Xcode
Figure 9: Archiving Your Application using Xcode
How To Submit an iOS App to the App Store - Submit Your Application to the iOS App Store
Figure 10: Submit Your Application to the iOS App Store
How To Submit an iOS App to the App Store - Enter Your iOS Developer Account Credentials
Figure 11: Enter Your iOS Developer Account Credentials
How To Submit an iOS App to the App Store - Select Application and Code Signing Identity
Figure 12: Select Application and Code Signing Identity
How To Submit an iOS App to the App Store - An Error is Shown if Validation Fails
Figure 13: An Error is Shown if Validation Fails

6. Waiting

If the submission process went without problems, your application's status will change to Waiting for Review. It takes several days for Apple to review your application and the time it takes, tends to fluctuate over time. 

Conclusion

The submission process is quite lengthy for a new application, but submitting an update to the App Store is much less cumbersome. Keep in mind that the submission process is much more involving if your application is localized in various languages as your application's metadata needs to be localized as well. However, localizing your application is well worth the effort as it often results in higher sales and positive customer feedback.
Once you done it for first time , you can do it without any issue . You need to be carefull for doing that .