Tuesday, November 17, 2009
And it's approved!
The app has been approved and it's on the app store! Linky Linky.
Labels:
iPhone,
Warcraft Gear Compare,
World of Warcraft,
wow
Saturday, November 14, 2009
Still Waiting
So it's still waiting to be reviewed.
My friend turned me onto a new possible utility app for a game. I don't play it myself but according to her, it's pretty popular and there's little support for it on the app store. So I'll be starting research and design on that.
I also found an excellent OpenGL ES tutorial for the iPhone: . I like it because it starts from the very beginning and assumes you know nothing about OpenGL and graphics/game programming. Which I don't. This takes care of the programming part... I don't know that I will ever learn enough to do the graphics part. Fortunately, the same friend that turned me onto the new app idea is really into art and she's damn good at it. So maybe she can help on that end. I'll have to find out if she knows how to do 3D stuff or is willing to learn it.
And I'm also fleshing out 3-4 game ideas for when I know enough to actually make something.
My friend turned me onto a new possible utility app for a game. I don't play it myself but according to her, it's pretty popular and there's little support for it on the app store. So I'll be starting research and design on that.
I also found an excellent OpenGL ES tutorial for the iPhone: . I like it because it starts from the very beginning and assumes you know nothing about OpenGL and graphics/game programming. Which I don't. This takes care of the programming part... I don't know that I will ever learn enough to do the graphics part. Fortunately, the same friend that turned me onto the new app idea is really into art and she's damn good at it. So maybe she can help on that end. I'll have to find out if she knows how to do 3D stuff or is willing to learn it.
And I'm also fleshing out 3-4 game ideas for when I know enough to actually make something.
Saturday, November 7, 2009
Submitted for Approval!
It was submitted for approval last night. Took a little longer to finish than I thought but it was my first app. All in all, I'm happy with the results. Now I need to think about another idea for an app while I attempt to learn the OpenGL stuff. I've never done graphics before and I suck at art but we'll see what happens.
Anyways, the app is Warcraft Gear Compare, or just Gear Compare. You search the WoW Armory for an item that just dropped, it loads your currently equipped items from Armory, and using weighted values, calculates which item is better. It comes preloaded with 30 specs and the weights were taken from wowhead and the elitistjerks' forums. You can edit the specs or create your own weights to cater to your need.




Anyways, the app is Warcraft Gear Compare, or just Gear Compare. You search the WoW Armory for an item that just dropped, it loads your currently equipped items from Armory, and using weighted values, calculates which item is better. It comes preloaded with 30 specs and the weights were taken from wowhead and the elitistjerks' forums. You can edit the specs or create your own weights to cater to your need.
Thursday, November 5, 2009
NSURLConnection subclass
So I wanted a way to handle multiple NSURLConnections for different functional areas. The problem with the normal NSURLConnection is the inability to distinguish between the different connections unless you look at the URL.
Which is fine, but just looking at the URL doesn't help when I have multiple objects that use similar URLs and need to keep them separated. One common solution you find on the internet is to subclass NSURLConnection and add a tag variable. Which is what I did, but I needed more than just that.
I also didn't want to have to keep track of multiple sets of data from the different connections so I created a variable for the data and overloaded the methods that send delegate responses to handle the data.
Now it's getting closer to what I wanted. The last thing I wanted was there was only one instance of a connection for each tag. So I created a class variable to handle that.
So in the end, what I had was an NSURLConnection subclass that handles multiple tagged connections with the response data contained in the connection and limiting the connections to 1 instance of each tag.
Anyways, here's the subclass definition:
#import
NSMutableDictionary *instances;
@interface tagConnection : NSURLConnection {
NSString *connID;
NSMutableData *receivedData;
}
@property (retain) NSString *connID;
@property (retain) NSMutableData *receivedData;
+ (void)checkTag:(NSString *)tag Target:(tagConnection *)target;
+ (void)removeTag:(NSString *)tag;
- (id)initWithTag:(NSURLRequest *)request delegate:(id)delegate startImmediately:(BOOL)startImmediately connID:(NSString*)tag;
@end
And this is the class implementation:
#import "tagConnection.h"
@implementation tagConnection
@synthesize connID;
@synthesize receivedData;
+ (void)initialize {
instances = [[NSMutableDictionary alloc] init];
}
+ (void)checkTag:(NSString *)tag Target:(tagConnection *)target{
tagConnection *tempConn = [instances objectForKey:tag];
if (tempConn != nil) {
[tempConn cancel];
[tempConn release];
}
[instances setObject:target forKey:tag];
}
+ (void)removeTag:(NSString *)tag {
[instances removeObjectForKey:tag];
}
- (id)initWithTag:(NSURLRequest *)request delegate:(id)delegate startImmediately:(BOOL)startImmediately connID:(NSString*)tag {
self = [super initWithRequest:request delegate:delegate startImmediately:(BOOL)startImmediately];
if (self) {
self.connID = tag;
receivedData = [[NSMutableData alloc] initWithLength:0];
[tagConnection checkTag:connID Target:self];
}
return self;
}
- (void)dealloc {
[tagConnection removeTag:connID];
[receivedData release];
[connID release];
[super dealloc];
}
- (void)URLProtocol:(NSURLProtocol *)protocol didReceiveResponse:(NSURLResponse *)response cacheStoragePolicy:(NSURLCacheStoragePolicy)policy {
[receivedData setLength:0];
}
- (void)URLProtocol:(NSURLProtocol *)protocol didLoadData:(NSData *)data {
[receivedData appendData:data];
}
@end
And here is some sample code of how to implement the subclass:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://wwww.yahoo.com"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:15];
[theRequest setValue:@"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4" forHTTPHeaderField:@"user-agent"];
tagConnection *testConn1 = [[tagConnection alloc] initWithTag:theRequest delegate:self startImmediately:YES connID:@"test"];
tagConnection *testConn2 = [[tagConnection alloc] initWithTag:theRequest delegate:self startImmediately:YES connID:@"test"];
}
- (void)connection:(tagConnection *)connection didFailWithError:(NSError *)error {
[connection release];
}
- (void)connectionDidFinishLoading:(tagConnection *)connection {
[connection receivedData]; //Do something with the data;
[connection release];
}
Which is fine, but just looking at the URL doesn't help when I have multiple objects that use similar URLs and need to keep them separated. One common solution you find on the internet is to subclass NSURLConnection and add a tag variable. Which is what I did, but I needed more than just that.
I also didn't want to have to keep track of multiple sets of data from the different connections so I created a variable for the data and overloaded the methods that send delegate responses to handle the data.
Now it's getting closer to what I wanted. The last thing I wanted was there was only one instance of a connection for each tag. So I created a class variable to handle that.
So in the end, what I had was an NSURLConnection subclass that handles multiple tagged connections with the response data contained in the connection and limiting the connections to 1 instance of each tag.
Anyways, here's the subclass definition:
#import
NSMutableDictionary *instances;
@interface tagConnection : NSURLConnection {
NSString *connID;
NSMutableData *receivedData;
}
@property (retain) NSString *connID;
@property (retain) NSMutableData *receivedData;
+ (void)checkTag:(NSString *)tag Target:(tagConnection *)target;
+ (void)removeTag:(NSString *)tag;
- (id)initWithTag:(NSURLRequest *)request delegate:(id)delegate startImmediately:(BOOL)startImmediately connID:(NSString*)tag;
@end
And this is the class implementation:
#import "tagConnection.h"
@implementation tagConnection
@synthesize connID;
@synthesize receivedData;
+ (void)initialize {
instances = [[NSMutableDictionary alloc] init];
}
+ (void)checkTag:(NSString *)tag Target:(tagConnection *)target{
tagConnection *tempConn = [instances objectForKey:tag];
if (tempConn != nil) {
[tempConn cancel];
[tempConn release];
}
[instances setObject:target forKey:tag];
}
+ (void)removeTag:(NSString *)tag {
[instances removeObjectForKey:tag];
}
- (id)initWithTag:(NSURLRequest *)request delegate:(id)delegate startImmediately:(BOOL)startImmediately connID:(NSString*)tag {
self = [super initWithRequest:request delegate:delegate startImmediately:(BOOL)startImmediately];
if (self) {
self.connID = tag;
receivedData = [[NSMutableData alloc] initWithLength:0];
[tagConnection checkTag:connID Target:self];
}
return self;
}
- (void)dealloc {
[tagConnection removeTag:connID];
[receivedData release];
[connID release];
[super dealloc];
}
- (void)URLProtocol:(NSURLProtocol *)protocol didReceiveResponse:(NSURLResponse *)response cacheStoragePolicy:(NSURLCacheStoragePolicy)policy {
[receivedData setLength:0];
}
- (void)URLProtocol:(NSURLProtocol *)protocol didLoadData:(NSData *)data {
[receivedData appendData:data];
}
@end
And here is some sample code of how to implement the subclass:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://wwww.yahoo.com"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:15];
[theRequest setValue:@"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4" forHTTPHeaderField:@"user-agent"];
tagConnection *testConn1 = [[tagConnection alloc] initWithTag:theRequest delegate:self startImmediately:YES connID:@"test"];
tagConnection *testConn2 = [[tagConnection alloc] initWithTag:theRequest delegate:self startImmediately:YES connID:@"test"];
}
- (void)connection:(tagConnection *)connection didFailWithError:(NSError *)error {
[connection release];
}
- (void)connectionDidFinishLoading:(tagConnection *)connection {
[connection receivedData]; //Do something with the data;
[connection release];
}
Getting close to release
Getting real close to finishing now. At first the programming went really fast because I was mostly sticking to stuff I had learned. That was the first 3-5 days. And I was going at such a quick pace I thought I would have been able to finish it by the end of that week.
But then I started to get into the stuff where I didn't have as much experience, i.e., sqlite3, libxml2, and url connections. Those each held me up a while until I could figure out how to work them. On the plus side, I think I was able to come up with a handy NSURLConnection subclass that I will implement at some point to handle the asynchronous connections that I make to the World of Warcraft Armory. But I might have that along with a few other features I want to add for a future update. Right now I just want to get a working version out onto the app store.
My revised completion date is by the end of this weekend. Which means it won't be approved (hopefully) by Apple and be up on the app store for another week. In the mean time, I will work on an update to thread more functions and add functionality.
I'll post my subclass a little later. And my next post after that will be when I finish the app and submit it for approval.
But then I started to get into the stuff where I didn't have as much experience, i.e., sqlite3, libxml2, and url connections. Those each held me up a while until I could figure out how to work them. On the plus side, I think I was able to come up with a handy NSURLConnection subclass that I will implement at some point to handle the asynchronous connections that I make to the World of Warcraft Armory. But I might have that along with a few other features I want to add for a future update. Right now I just want to get a working version out onto the app store.
My revised completion date is by the end of this weekend. Which means it won't be approved (hopefully) by Apple and be up on the app store for another week. In the mean time, I will work on an update to thread more functions and add functionality.
I'll post my subclass a little later. And my next post after that will be when I finish the app and submit it for approval.
Saturday, October 24, 2009
Done?
Finished all the lectures. I'm thinking about skipping the last assignment since I don't really need to or want to mess with the Address book API and the search functionality seems simple enough.
I think I'll start on my app tomorrow. Don't want to give anything away at this point about it but it's going to be a simple that will help with tracking a small bit of information from world of warcraft. It's a simple idea for an app I had that doesn't seem to have an analogue on the app store that seems easy enough to implement. I will need to learn how to parse xml and use sqlite though.
My target timeline is to finish it under a month at the most. It seems a little long but I do have a job. I'll update on my progress every so often.
I think I'll start on my app tomorrow. Don't want to give anything away at this point about it but it's going to be a simple that will help with tracking a small bit of information from world of warcraft. It's a simple idea for an app I had that doesn't seem to have an analogue on the app store that seems easy enough to implement. I will need to learn how to parse xml and use sqlite though.
My target timeline is to finish it under a month at the most. It seems a little long but I do have a job. I'll update on my progress every so often.
Friday, October 23, 2009
Presence 3
Finally got around to finishing Presence 3. All that's left now is 4 hours of video and one more assignment. Hoping to finish it by the end of the weekend but if not, definitely be mid next week. Then I can start working on an app. I could still use some good ideas that don't require graphics. I'm hoping to learn some non-OpenGL stuff as I go along and maybe make a rudimentary game. Which means I will need to come up with an idea where the gameplay will out weigh the poor graphics. But that's further down the line.
The first part of presence 3 was super difficult and the last part was super easy. The first part was so hard because of the threading for the status updates. I got lucky that I figured it out, it was a complete guess on my part, I found little help on the google group for auditors. But now I know that you have to alloc/init the status updates array right at the beginning or else it crashes. Go figure. One reason I didn't think of that right at the beginning is because it seems to load the array just fine in the thread but doesn't crash until it tries to render. Odd thing is the array responded to the count selector but not to any other selectors. Since it responded to count, I thought that is was allocating fine but I was wrong.
The first part of presence 3 was super difficult and the last part was super easy. The first part was so hard because of the threading for the status updates. I got lucky that I figured it out, it was a complete guess on my part, I found little help on the google group for auditors. But now I know that you have to alloc/init the status updates array right at the beginning or else it crashes. Go figure. One reason I didn't think of that right at the beginning is because it seems to load the array just fine in the thread but doesn't crash until it tries to render. Odd thing is the array responded to the count selector but not to any other selectors. Since it responded to count, I thought that is was allocating fine but I was wrong.
Subscribe to:
Posts (Atom)
