Showing posts with label Apple. Show all posts
Showing posts with label Apple. Show all posts

Tuesday, March 6, 2012

iOS App : iBoincStats

My latest app iBoincStats has just been approved by Apple.  Releasing software (even something this small) is always a rush, it never gets old.

I decided to do an app instead of a game for a change, just to see what the interface builder, XML and "work" type development would be like. It turned out being a lot faster and simpler than I expected. I have also always been a big fan of BOINC, and checking my "stats" for many years now, all the way back before there was a BOINC platform, and it was only the SETI@Home project.
 (An added bonus: unlike games this one it would actually be available on the South African App store as well as the international ones)

During my development career I have never really spent a lot of time designing and developing UIs, I always ended up on the backend side of development projects. So take the next statement in that light:
I think Apple has actually done a pretty good job (after some initial learning frustration) with their interface builder and storyboard shipped with XCode. I sat down and after a good couple of hours of struggling, something eventually clicked and it all finally came together. I restarted my project, copied over the backend code and in literally 15 minutes the storyboard and 3 UIs were done. Awesome.

I had a couple "funnies" while still using XCode 4.2, but just upgraded to 4.3 and those particular issues seem to have been corrected.


iBoincStats

This is a simple stats client to view your BOINC project processing statistics.
Enter your cross project id and access your latest stats.
Some of the popular BOINC projects include:
Seti@home
climateprediction.net
Einstein@home
POEM@home
rosetta@home

More information regarding the BOINC project can be found at:
BOINC home
Wikipedia - Berkely Open Infrastructure for Network Computing
Screen Shots:



Wednesday, February 15, 2012

iOS App Store Validation Error

I was attempting to submit an update for Wordballs when I run into an archive validation issue:
iPhone/iPod Touch: Icon.png: icon dimensions (0 x 0) don't meet the size requirements.



The solution ended up being simple enough:
Select Project then go to Build Settings, select All, under Packaging set Compress PNG Files to NO.

I have no idea why this all of a sudden started on my 3rd update, just glad it was simple enough to solve

Friday, November 25, 2011

Determining iOS Hardware / Device

I am currently working on my second iOS game in which I am creating dynamic Open GL ES reflections, and noticed on the older devices it would cause a drop in frames per second. It doesn't on the iPad 2, I do not have iPhone 4S yet, but I assume it won't have a visible effect there either with the new CPU.

So to not diminish the user experience I decided to remove those reflections, on the interactive CCSprite, on the older devices.

I went searching and found : UIDeviceHardware - Determine iOS device being used

I ended up just using: (platformString wasn't useful to me) I then just created a convenience method for myself to check for the version that have the Dual-core Apple A5 processor.

Wednesday, August 31, 2011

Mac OSX Global Git Ignore - XCode Project and State Files.

With my recent switch to Mac, Objective C and XCode and XCode using Git as it's default VCS (Version control system), I figured it would probably be a good time to switch over to using Git. I registered with GitHub purchased the base 5 private repo plan and uploaded my projects and images. I didn't realize at the time then what pain I would cause myself.

A little later, my wife joined me in working with those projects only to discover that under certain scenarios we could never actually merge or sync the branches from XCode. There were always couple files that would be "uncommited" in XCode. Nasty XCode project state files.

I had not worked with Git before this actually, so after reading up a bit about project files and the like and how a ".ignore" file would do the trick.
After I little bit of struggling, I realized that for ignore to work, the files needed to be removed from the repository first. Thankfully I did not have any important history so I could simply recreate them. You can also remove them from git with: git rm --cached

To go about creating, editing configuring a global ignore file on OSX I did the following:

First problem on a Mac, any "." files are seen as system files and those are automatically hidden from you.

To get around that open "Terminal" and use the commands below to show and hide system files (you'll need to either restart or force quit Finder for the changes to take effect).

Show:
defaults write com.apple.finder AppleShowAllFiles -bool true

Hide:
defaults write com.apple.finder AppleShowAllFiles -bool false


Once I had done that I simply went searching for a couple example ignore files and combined them into the example below.

Create a file in your user directory called ".gitignore_global", populate it with the contents required, (below is mine, that does take care of the XCode problem files)
Then in Terminal run:
git config --global core.excludesfile ~/.gitignore_global

My global ignore file:

Tuesday, July 26, 2011

Mac Attack...

I have not created a blog entry in some time, for the last 2 months or so all my weekends and evenings have been spent on my latest addiction, iPhone development.

A couple months back I spent some time deciding what programming language to learn, blogged about it here. At the time I based on Tiobe, job stats, current interest and not taking the final step to actually buy a Mac, I choose C#. I spent a couple weeks messing with it, nothing serious, started a WPF clone for one of my favorite tools of all time. Baretail, but it just didn't catch my imagination, so I lacked the drive to finish.

I then got my iPhone, and that was all she wrote... I was hooked, coming from a lame excuse of a "smart phone" The HTC-Touch-Diamond-2-windows-mobile-thing, to the iPhone was a wonderful experience. It didn't take long before I could not resist the desire to program of my new toy... off to the iStore, out with the credit card, returning triumphantly with a single box, (iMac i5 quadcore 4gb 21.5"), inside the box there is a single cable, plug in the power... (spend a couple minutes looking for the on switch)... basic OS config, user and such.... done.

I had heard something about xCode, off go App Store... wait a day for the monster 4.5gb download. Stumble around hello world, and 2 or 3 other tutorials and that was that. I was hooked and with that 2 months of weekends and evenings were lost infront of the iMac. This last weekend my wife and I eventually submitted the game, and now we have to wait for probably 2 nerve wracking weeks for approval or rejection.

I'll will discuss more specific details once it is released but For now I'll share some experiences and thoughts from the last 2 months.

Objective C
I have to say, I like the language although coming for a Java / .Net background some of the intricacies of the syntax, lack of type enforcement and actually having to do your own memory management can be a little tedious when starting.
All that aside but both my wife (a C# developer) and I (Java) didn't feel too uncomfortable picking it up.

Open Source and Other resources
No. 1 most useful thing I found when writing a game for an iOS platform is:
Cocos2D
These guys have done an awesome job, and there is a decent size community / forum to help out if you do get stuck.
I haven't looked at Sparrow as I only found it a couple days after implementing Cocos2D and decided to stick with that. Another blogger did a comparison here.

Physics Engines, there are a couple out there, I figured I would gave it a skip for the first app, there would be enough to worry about without having to learn one of them either.
The 2 Main contenders I can see are:
Chipmunk
Box2D

XCode 4...
ouch, XCode just feels behind the likes of Eclipse, Visual Studio and IntelliJ. Little things we take for granted, are really missed. I am not going to go into the details, just know if you already use Eclipse, Visual Studio (with Resharper) or IntelliJ and start with XCode, you are going to be a little frustrated. To be fair, some of the frustrations were probably from a lack knowledge on my part and to top it off never having coded in the language before.

After submitting my app I decided to try App Code and loved it straight away. It's still in "beta", but using AppCode after coming from IntelliJ fells very natural. So thankfully there will be a real alternative once they release it officially.

General
I will try post useful Objective C/Game/Apple code and examples as I learn. The first 2 quick things to start with:

1. When Using Cocos2D.... and trying to incorporate UIScrollView from the SDK, prepare yourself for some pain. The CCScrollLayer however, is completely painless. We extended it and completely customized it to our game look and feel, it was very simple to do.

2. If you want to sort an array of integers in descending order use a NSSortDescriptor, very hand class actually:

Building KubeSkippy: Learnings from a thought experiment

So, I got Claude Code Max and I thought of what would be the most ambitious thing I could try "vibe"? As my team looks after Kuber...