Iphone Developer Technological

Library compile error in XCode 4.5 for iOS6 regarding armv7s and armv7

Here are the resources you will need to fix your libraries.a which are not compiling for armv7s, into working compiling libraries:

  1. The post on how to do it:
  2. An article on how to modify your $PATH on your mac:
  3. Another article on how to edit your .profile hidden file:

And this is the lowdown:

  • You will basically have to create the .sh file & .c file mentioned in Matt’s post.  He then explains how to compile the .c and chmod the .sh.
  • Then you must add these files to your path by either creating a .profile or adding this line to your existing .profile:
  • PATH=$PATH:$HOME/afolderwhereyouplacedyourabovefiles # Add to PATH for scripting
  • And finally navigate to your library.a file where you will run the last command mentioned in Matt’s article.

The main concept to understand here is that after creating the 2 special files Matt came up with and compiling/chmodding respectively, you must add those command files to your system’s “library of system-wide commands” in order to be able to use the last command to actually modify your library.

Iphone Developer Technological


Lets say you are not only downloading tweets (text) from the web, but actual chunks of raw data, such as images. You may have a method that returns a UIImage, such as:

//Preferably look for a cached image
id cachedObject = [cachedImages objectForKey:url];
if (cachedObject == nil)
//set loading placeholder in our cache dict
[cachedImages setObject:LoadingPlacedholder forKey:url];
//Create and queue a new image loading op
ImageLoadingOp *operation = [[ImageLoadingOp alloc] initWithImageURL:url target:self action:@selector(didFinishLoadingImageWithResult:)];
[operationQueue addOperation:operation];
[operation release];
} else if(![cachedObject isKindOfClass:[UIImage class]])
//were already loading the image, dont kick off another request
cachedObject = nil;
return cachedObject;

Except notice this time the operation is not an NSInvocationOperation but rather a Class by itself. That class is responsible for downloading the image from the web, processing it, returning it and caching it.

Upon your return you do this:

NSURL *url = [result objectForKey:@”url”];
UIImage *image = [result objectForKey:@”image”];
[cachedImages setObject:image forKey:url];
[self.tableView reloadData];

Translate »