Here are the resources you will need to fix your libraries.a which are not compiling for armv7s, into working compiling libraries:
- The post on how to do it: http://www.galloway.me.uk/2012/09/hacking-up-an-armv7s-library/
- An article on how to modify your $PATH on your mac: http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
- Another article on how to edit your .profile hidden file: http://www.tech-recipes.com/rx/2618/os_x_easily_edit_hidden_configuration_files_with_textedit/
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.
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:)];
} else if(![cachedObject isKindOfClass:[UIImage class]])
//were already loading the image, dont kick off another request
cachedObject = nil;
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];