User login
bosshogg's blog
My Opinings On The iPad
bosshogg — Mon, 02/01/2010 - 20:08
Well, it's been a few days now and most folks have heard about Apple's now unveiled iPad. There are many different opinions about the relevance of it, and most pundits are quick to jump onto the iPad-hater wagon. There are myriad reasons given as to its short-coming, including (but not limited to) its inability to multi-task, its lack of a camera, its lack of any meaningful way to connect peripherals aka USB, etc, etc, etc.
Plug For A Good Small Company
bosshogg — Tue, 01/12/2010 - 20:54
If you're in the market for a robust OLE DB provider for your development, I highly suggest you check out my friend Sean's company Cherry City Software. He has a slew of commercially released and production tested modules for Windows 200x/XP/Vista/7. Check him out!
Getting the Version String
bosshogg — Sun, 12/06/2009 - 20:07
So, a very common thing to want to do in your application is to display the version string. However, unless you know where to look, this can actually be a somewhat frustrating thing to try and do. The key here is the NSBundle class which will return you the main application bundle which you can then get an NSDictionary class from. Once you have the NSDictionary, you can then query any of the paired values from the info.plist file.
Sample code below for getting the App Version and the Copyright text.
+ (NSString*) GetAppVersion
{
Your iPhone App Icon
bosshogg — Fri, 12/04/2009 - 19:59
Have you ever noticed that a lot of applications in the app store have what looks like over-lighting or washout around the top of the icon? Well, it turns out that that is how the iPhone and the App Store render your application's icon by default. However, if you have an artist that has spent a lot of time trying to make a good looking icon, they can be quite frustrated once they give you the icon only to see the top 1/3 of the icon become washed out, and in fact most of the apps from bigger named devs don't have this.
C++ On The iPhone
bosshogg — Sun, 11/29/2009 - 21:53
I have a bunch of utility classes and functions that I've collected in my 'toolbox' over the years. When I first started doing iPhone development, I was a little bummed out because the primary development language for it is Objective C, and while you can mix and match to a certain degree, I couldn't see how you could use C++ classes in tandem with Objective C classes.
Detecting the iPhone Simulator
bosshogg — Fri, 11/27/2009 - 19:32
Recently, because of defects with a third party library that we were using for 10,000, I had to figure out if our code was running on the iPhone Simulator and not do a few things. It's not complicated code, but it's not a bad little snippet to keep handy in your programming toolbox. Here is the code I came up with. Please for you to enjoy...
NSString* model= [[UIDevice currentDevice] model];
NSString* simulator = @"iPhone Simulator";
if ([model compare:simulator] == NSOrderedSame)
{
//Simulator!
}
Removing .svn Directories On Mac OS X
bosshogg — Fri, 11/27/2009 - 19:16
If you use svn on your Mac and you've ever wanted to move/copy one directory to another project in SVN, you've probably found that the folders keep their association with whatever SVN destination/repository you first added them to. This can be incredibly frustrating if you want to take something OUT of revision control without losing the files, or if you want to move a copy of files from one part of your tree to a totally different project/subfolder .
Formatting NSString's With NSStrings
bosshogg — Fri, 11/27/2009 - 15:23
Disclaimer:Perhaps everyone else in the iPhone-Development-Universe learned this nugget in some obvious Apple programming tutorial, but for some reason, it took quite a bit of hunting the other day for me to find it. So, I now post this here for the bumpkins like myself that had trouble finding it. For those non-bumpkins, just keep moving. Nothing for you to see here.
Three Ways To Randomize on the iPhone
bosshogg — Wed, 11/25/2009 - 23:20
To the best of my knowledge, there are three ways to generate random numbers on the iPhone: The first, SecRandomCopyBytes:
UInt32 randomResult = 0;
int result = SecRandomCopyBytes(kSecRandomDefault, sizeof(int), (uint8_t*)&randomResult);
if (result != 0)
randomResult = arc4random();
The second, arc4random:
UInt32 randomResult = arc4random();
The last (and worst) rand():
UInt32 randomResult = rand();
iPhone Déjà vu
bosshogg — Sat, 11/21/2009 - 15:20
In the last few weeks, several high profile iPhone developers have very publicly announced their intention to stop developing for the platform. Many of them cite Apple's very closed, opaque, often arbitrary App approval process. Some cite other things, but the one common thread is that they feel Apple is neglecting and abusing its developer community.
Navigation
Recent blog posts
- My Opinings On The iPad
- Plug For A Good Small Company
- Gambling Planet Features Three Jacks Games
- Twist Tac Toads Available in the AppStore!
- Getting the Version String
- Your iPhone App Icon
- C++ On The iPhone
- Detecting the iPhone Simulator
- Removing .svn Directories On Mac OS X
- Formatting NSString's With NSStrings
