Mar 10 2010

Approval times improved

Since the new year Apple appears to be making massive improvements to their overall approval times. An update for F1 Insider was approved in about 48 – 72 hours, which we had previously planned for 1 – 2 weeks!

Very good job, I hope it continues.

Now we just need to get some consistency in the approval/rejection guidelines :)


Jan 12 2010

The application does not have a valid signature

Had a frustrating issue this weekend with one of my Xcode projects. I’ve been working with this project for months, without problems, and then suddenly the application won’t install onto the Simulator, and when ran onto the device, I’m greeted with the error: “The application does not have a valid signature.”

Note this is not the same as the more common invalid provisioning profile error. I of course, googled my problem with the error message, but to my surprise found very little of anyone else with the same problem.

After a slow process of elimination, I finally tracked down the problem.

In my application, the directory structure of the resource files is very important. Added folders with the default option in Xcode, adds them as a group, and in the resulting application, all the files are copied into the top directory. This creates problems with you have files which share the same name, in different directories.

The solution to this is of course use reference folders (the second option you can select when added files to the project).

This is all fine and dandy, but what caused my Xcode project to go haywire, was the fact that my reference folder was called “resources”. The solution, was simply to rename the folder to “resource” (or anything else in fact), and after a clean, it works.

Very very strange error, but thankfully with an easy fix, once you know how!


Dec 2 2009

Customisable UIPageControl

PageControl Examples

PageControl Examples


The UIPageControl has no way of changing the colors of the dots. Kind of annoying right? Well I knocked up a simple solution to customising the look of the UIPageControl.

This class allows you to replace the dots with your own UIImages, with the following 2 properties:

@property (nonatomic, readwrite, retain) UIImage* imageNormal;
@property (nonatomic, readwrite, retain) UIImage* imageCurrent;

It works by replacing the UIImage on the UIImageView containing the original dot.

One word of warning, if Apple change the way the UIPageControl works, this code will most likely break (especially if they change the dots so they are no longer UIImageViews!). However I’d say the only reason this would happen, is if they add their own functionality in to customise the look of it, so it’s probably OK.

Here’s the full code, in all it’s glory. Feel free to use how you see fit (I’m releasing this with no restrictions). It’s not very complicated, but I figured it might be useful to someone!

#import <UIKit/UIKit.h>
 
@interface OMPageControl : UIPageControl {
  UIImage* mImageNormal;
  UIImage* mImageCurrent;
}
 
@property (nonatomic, readwrite, retain) UIImage* imageNormal;
@property (nonatomic, readwrite, retain) UIImage* imageCurrent;
 
@end
#import "OMPageControl.h"
 
@interface OMPageControl (Private)
- (void) updateDots;
@end
 
 
@implementation OMPageControl
 
@synthesize imageNormal = mImageNormal;
@synthesize imageCurrent = mImageCurrent;
 
- (void) dealloc
{
  [mImageNormal release], mImageNormal = nil;
  [mImageCurrent release], mImageCurrent = nil;
 
	[super dealloc];
}
 
 
/** override to update dots */
- (void) setCurrentPage:(NSInteger)currentPage
{
  [super setCurrentPage:currentPage];
 
  // update dot views
  [self updateDots];
}
 
/** override to update dots */
- (void) updateCurrentPageDisplay
{
  [super updateCurrentPageDisplay];
 
  // update dot views
  [self updateDots];
}
 
/** Override setImageNormal */
- (void) setImageNormal:(UIImage*)image
{
  [mImageNormal release];
  mImageNormal = [image retain];
 
  // update dot views
  [self updateDots];
}
 
/** Override setImageCurrent */
- (void) setImageCurrent:(UIImage*)image
{
  [mImageCurrent release];
  mImageCurrent = [image retain];
 
  // update dot views
  [self updateDots];
}
 
#pragma mark - (Private)
 
- (void) updateDots
{
  if(mImageCurrent || mImageNormal)
  {
    // Get subviews
    NSArray* dotViews = self.subviews;
    for(int i = 0; i < dotViews.count; ++i)
    {
      UIImageView* dot = [dotViews objectAtIndex:i];
      // Set image
      dot.image = (i == self.currentPage) ? mImageCurrent : mImageNormal;
    }
  }
}
 
@end

Nov 2 2009

A new start

Well I’m finally taking the plunge and going self employed! So I’ve setup this new site to help keep my portfolio up to date and always available.

I’ve spent many great years working for Greenius and others on mobile games and apps, but now the time has come to work for myself, and hopefully make a success of OniMobi.

There’s 2 sides to my business:

OniMobi

This is a brand new games studio I’m starting, which will feature some exciting new games due for release next year! Although it’s hardly a measure of originality or success, I’ve not really seen anything like some of the games we’ve got in the pipeline! Watch this space for more info over the coming months!

OniDev

OniDev is the contracting/work for hire, side of my business. If you’re looking for an experienced iPhone designer & developer (or for other platforms too), please get in touch!


This site also sees the closure of my old blog, found here. I’ll no longer be posting there, but I’ll keep it running for archives sake, and eventually redirect people to this new site.