Categories
programming

Xcode 4.3 / 4.4, Archive Build, Strip Static Library Bug

Sometimes it can be quite useful to hide a static library inside another one to hide the details of the inner static library from an application. We successfully did this with the Urban Airship library, but were having problems in a specific situation where the application would crash on first access of a method defined in the inner static library.

  1. Create an application that links against a static library (A), which in turn links against an already compiled static library (B)
  2. In the main application, write code that invokes a method defined in library (B)
  3. Archive the application
  4. Export the application into an IPA
  5. Run this IPA on a device
  6. Witness an EXC_CRASH (SIGSYS) in the crash log

I found the solution, which describes a bug in Xcode 4.3+. This still happens in Xcode 4.4.

“When performing an Archive action, Xcode uses the *project-level* build setting for STRIP_INSTALLED_PRODUCT rather than the target-level setting.”

More info here:

[Bug] Xcode Wrongly Applies Project Settings during Target Archive

 

Categories
Uncategorized

iOS Boilerplate

An Xcode project designed to speed up development of new projects. Seems like there are quite a few things in it I can take inspiration from for my own code.

What is it?

This project is inspired on HTML5 boilerplate.

  • It is intended to provide a base of code to start with
  • It is not intended to be a framework
  • It is intended to be modified and extended by the developer to fit their needs
  • It includes solid third-party libraries if needed to not reinvent the wheel

Via: Simon Teppett

Categories
programming

iOS Development – sizeToFit:

Jérémy Chatard explains the intricacies of UIView’s sizeToFit: with a concrete example of how it should be used to lay out a bunch of subviews stacked vertically. He makes use of recursion in his solution to solve the problem of “If you want to lay out a parent view, you first need to lay out its children” http://canadianviagras.com/pill/cialis-canada/.

If, like me, you always wondered what sizeToFit: should be used for, I recommend you read this. Cheers Jérémy.