iPhone Connect for Sage 50

Posted by admin under App Development on Saturday Jul 17, 2010

ADD COMMENTS | Tags :

Small ‘feature’ in iOS4

Posted by admin under App Development on Saturday Jul 3, 2010

In my upcoming app ‘FlirtSMS’ I draw a UIButton in the right hand side of a UITextField. This was working fine on 3.1.3 but now in iOS4 it disappears. Thanks to Sylver over on the iPhoneDevSDKForums as my existing code;

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:[UIImage imageNamed:@"add.png"] forState:UIControlStateNormal];
[button setImage:[UIImage imageNamed:@"add.png"] forState:UIControlStateHighlighted];
button.imageEdgeInsets = UIEdgeInsetsMake(0, -24, 0, 0);

[button addTarget:self action:@selector(chooseContacts) forControlEvents:UIControlEventTouchUpInside];

addContact.rightView = button;
addContact.rightViewMode = UITextFieldViewModeAlways;

Simply needed the following line added;

button.bounds = CGRectMake(0, 0, 35, 32);

Because the bounds of the button are set to zero by default.

ADD COMMENTS | Tags :

In-app purchases

Posted by admin under App Development on Thursday Jul 1, 2010

In app purchases are a great way to add revenue to your application. Apple also now allow in-app purchases in free apps where once they didn’t. Its not *that* difficult but again I’m all for saving time so I hunted around to see what was on the net that would wrap this functionality. I stumbled across Mugunth Kumar’s excellent MKStoreKit which you can get here.

I did have a couple of small issues. The first is the name of your in-app purchase. I was led to believe this should be in the format;

com.<business name>.<in app purchase item name>

When in fact you dont specify the whole bundle identifier but just the in-app purchase item name. Secondly MKStoreKit is great for one off purchases as it has two flags; FeatureAPurchased and FeatureBPurchased. My in-app purchases were consumable so I simply wired up the delegate to my view controller like so;

[MKStoreManager setDelegate:self];

And then implemented the delegate method;

- (void)productPurchased:(NSString *)productId

ADD COMMENTS | Tags :

Talking to the web

Posted by admin under App Development on Friday May 21, 2010

S50 remote viewer is the first app I did and utilised web communication. So I issue requests simply using HTTP REST urls with an NSURL object.

Next the results come back from the web in Javascript Object Notation (JSON) format. Rather than re-invent the wheel I simply used the excellent TouchJSON library available here.

ADD COMMENTS | Tags :

First App on Sale

Posted by admin under App Development on Friday May 14, 2010

So S50 Remote Viewer is now on the app store. Its quite a nice feeling although as its very niche I dont expect it to sell in great quantity. That said its been a great exercise for me in terms of learning the iPhone SDK.

ADD COMMENTS | Tags :

First App Done and Submitted!

Posted by admin under App Development on Tuesday May 4, 2010

It certainly has been a learning curve but my first app is done and has been submitted for approval. What has really impressed me with the app store is the distribution and update model. As a traditonal developer its always been a pain issuing updates to existing code. That has improved in recent years with tools/components that allow you to do web updates but its still extra work to build this functionality. Now with the app store you simply build your app, select which stores around the world you want to sell it in and hey presto, you’re away!

Need to add something/fix a bug? Simple upload the new version and itunes will manage the update across all devices running your existing version.

ADD COMMENTS | Tags :

Work on first app begins….

Posted by admin under App Development on Sunday Mar 14, 2010

OK the thing I find with any course is “use it or lose it!” so I am taking my newly found skills to actually create an app to go on the app store. As I work alot with Sage I am doing a ‘remote viewer’ which in conjunction with a server application will allow a user to view their key Sage data on their phone wherever they are.

ADD COMMENTS | Tags :

The Cocoa Way

Posted by admin under App Development on Wednesday Oct 21, 2009

You know its quite a mindset change doing things with the Cocoa Touch SDK. I’m a conventional OO programmer where I simply subclass an object with the required functionality and then add my own getters/setters and class methods. Cocoa is slightly different in that it uses delegates and protocols. You simply create an instance of an existing object and then you either implement a delegate method or you don’t. So for instance UITableView is the main UI component for rendering a table. So you create an instance of UITableView which on its own will do nothing. You need to tell the instance you are implementing a protocol, say for instance, UITableViewDatasource and then the instance will expect you to implement delegate methods as defined by UITableViewDatasource (if that makes sense!) which bind the table view to data.

Typically in my Win32 development days it would be a case of dropping a datasource onto a form, hooking it to a database and then hooking a datatable or query upto the datasource and then hooking the UI controls to the datatable.

ADD COMMENTS | Tags :