Practice Question and Answer

Q: How can your application perform actions that are provided by other application e.g. sending email? 981 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

Intents are created to define an action that we want to perform and the launches the appropriate activity from another application. Code         Intent intent = new Intent(Intent.ACTION_SEND);         intent.putExtra(Intent.EXTRA_EMAIL, recipientArray);         startActivity(intent);

Q: How will you launch an Activity within you application? 1631 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

For launching an application, we will need to create an intent that explicitly defines the activity that we wish to start. For example: Code         Intent intent = new Intent(this, MyTestActivity.class);         startActivity(intent);

Q: Whats a struct? 1610 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

A struct is a special C data type that encapsulates other pieces of data into a single cohesive unit. Like an object, but built into C.

Q: Whats the difference between a NSArray and a NSMutableArray? 1148 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

A NSArray’s contents can not be modified once it’s been created whereas a NSMutableArray can be modified as needed, i.e items can be added/removed from it.

Q: If I call performSelector:withObject:afterDelay: – is the object retained? 1010 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

Yes the object is retained. It creates a timer that calls a selector on the current threads run loop. It may not be 100% precise time-wise as it attempts to dequeue the message from the run loop and perform the selector.

Q: Explain the correct way to manage Outlets memory? 1046 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

Create them as properties in the header that are retained. In the viewDidUnload set the outlets to nil(i.e self.outlet = nil). Finally in dealloc make sure to release the outlet.

Q: Where can you test Apple iPhone apps if you don’t have the device? 1772 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

iOS Simulator can be used to test mobile applications. Xcode tool that comes along with iOS SDK includes Xcode IDE as well as the iOS Simulator. Xcode also includes all required tools and frameworks for building iOS apps.  However, it is strongly recommended to test the app on the real device before publishing it.

Q: Which API is used to write test scripts that help in exercising the application's user interface elements? 1490 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

UI Automation API is used to automate test procedures. Tests scripts are written in JavaScript to the UI Automation API.  This in turn simulates user interaction with the application and returns log information to the host computer.

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully