Try the search, it's linked to some great forums

Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Tuesday, February 26, 2013

Common Xcode erros & their remedies

Here are a few of the errors that I've come across, their descriptions and fixes;

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -predicateFormat cannot be sent to an abstract object of class NSPredicate: Create a concrete instance!'*** 
This error comes up when you try to pass an invalid method or value the an object

Thread 1: EXC_BAD_ACCESS(code=1, address= 0xb1f034fe
This error is usually from trying to access a deallocated object


Friday, February 1, 2013

The executable was signed with invalid entitlements.

This classic error with the following text;
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.
you need to make sure they are the same.
  • Goto Xcode-Window-Organizer-Devices and then goto the connected device's Provisioning Profiles tab.
  • Note the name of the currently valid profile;
  • In Xcode goto program-target-Project-Build Settings-Code Signing and copy the appropriate profile name into the Code Signing Identity field and also in it's children
Recompile & Off You Go!

Friday, January 11, 2013

Memory leaks

Even with ARC (Automatic Reference Counting) an app can have memory leaks which can totally foul up an app.  Typical signs of leaks include;
  • slowing of the apps animation, view transitions, etc
  • locking up the app and or device (see Turning off your locked up iPad)
This post is a quickstart guide for using Xcode's Instruments specifically  to find those leaks.
From within Xcode;
  • Select Xcode-Open Developer's Tools-Instrument
  • Then select your instrument from the popup - Leaks in our case
  • Size the Allocation & Leaks strip charts appropriately and
  • from the List box in the upper left select Choose Target-appName on the device
  • Press Record n Stop button to start & stop the app
Allocations should reach some level & then stop.  If you have leaks they show as red bars, and the allocations count will keep rising.  You can isolate where the leaks are by looking into the stack when the leaks occur.  Fix and rerun the app.

Apple's Instruments User Guide is the place to start learning about these tools. Also see the Xcode 4 User Guide to use with Xcode.

Within Xcode the call stack can be investigated from the Debugger toolbar as in this snapshot


 Stepping back thru the vertical call stack can give an indication where the code failed.