Search This Blog

Sunday, June 07, 2009

Cheap way to develop for iPhone

Peace be upon you

How are you guys? I am sorry for not posting a lot.
Today I am gonna write how to start iPhone development in a very cheap way, first let us talk about why, I thought about that.
In Egypt we have don't have Apple it self, we have punch of people who has the reseller logo, they offer SUCK service, high prices for nothing, they are even not cool in manner of human treatment, it is like "we sell Apple products, we are from heaven (YAKHHHHH)"
anyways, I have noticed that people likes the idea of developing for the iPhone and how it can get quite good money for simple application, this is happen because of the huge number which is use 1 place to shop for software "App store", the only thing that makes people step back is the prices of the Apple machines, in Egypt we pay double prices so there is always something to be done to get out of this CRAP, high price and need of equipment, so I have started messing around the netbooks as a low end machines that can do HELL of things (little monster)

so what do u need to start?
 - MSI Wind U123x
 - Externel DVD reader
 - Mac OS X (10.5.2 (this what I have tried) or higher) -> Kalyway (get it from http://wiki.osx86project.org/wiki/index.php/Main_Page )
 - Combo Update to (10.5.3)
 - iPhone SDK (get it for free from http://developer.apple.com/iphone )
 - Chain0 (get it from http://wiki.osx86project.org/wiki/index.php/Chain0 )

Here is snapshots for what the operation 

Insert the Mac OS X Kalyway DVD and boot

From the customize screen select the proper kernel and VGA driver 
Now after installing the combo update (VERY TRICKY to be installed) and installing the XCode and iPhone SDK everything up and running and 100% running 

Screen shot from the MSI Wind U123x after having a simple trail.

I will post in detail how to make everything running, I have exams this days so pray for me and I hope that I have much time for my BELOVED blog and BELOVED readers, I really miss the nice feeling when I write something

Thanks for your time.
BR
Ahmed Essam

Saturday, May 09, 2009

NSOpreation

Peace be upon you

How are you guys? I am sorry that it has been long time since last post, but I have exams, work and my beloved iPhone projects.

Now, let us get to the point of todays post, it is about something called NSOpreation and NSOpreationQueue, this classes are part of the "iPhone Threading programming", which means that this things are mostly used when u do some threading in the iPhone app

The point here that makes me really get stunned was that this thing manages that queue of tasks, it is really critical to have something like that done for you, this thing manages that threads combined with locks combined with queue management, imagine that you have some kind of big thing, I will never have example better than Standford CS193p sample, flicker, imagine that you get some list of information from flicker and u wanna display it, considering that it is coming from the web, it will take some time, so there will be a need to handle it really wisely to make user feels Ok and don't get bored from your application, if I am going to do it on Windows, I may use "Threads", "Locks" to handle it and I think it will be a bit headache.

In the iPhone development "as far as I know such class is not exist for Mac OS yet", this classes will save all that time that will be sucked by implement this stuff, I really recommend downloading the sample and check it out, it is available online on the CS193p page, I really wish that I have some time to write example to show you how much it can be efficient to use such thing.
ohh, I forgot to mention that iPhone considered a subset of unix, which means internally it uses the pthread, I think it has all the POSIX , can u imagine that this little device runs UNIX :D

anyways, it was nice writing to you :) and I hope u like it as I do ;)

thanks for your time.

BR
Ahmed Essam

Tuesday, April 14, 2009

Arabic in iPhone Safari Sourcsecode

Peace be upon you

This days, I have forward my focus into iPhone development, actually I have figured out too many things that I miss by not working for Mac :D
I am not going to get into debate or something like that but all I am going to say is "Apple definition for the word 'Framework' is much much much much better than anyone else"
Let us get to what I am coming to say today.

Today I would like to demonstrate some stuff related to Arabic inside WebKit which the core of Safari
I will sort then explain, as I don't have much time I will explain in hurry :D
First, to get the code , you have to download it from Apple Opensource section, here is link
http://www.opensource.apple.com/darwinsource/iPhone/
in the Article I have used the 2.2.1
so let us start with BiDi related function , this function called BidiCharacterRung, I put it here because I have noticed that it has some kind of detection for the Right To Left issue



shapeArabic, If you know about Arabic representaion, the reshaping is the phase which make the Arabic readable by the user

This line I like very much, this code prevent from showing "boxes" if the font is not exist


The function related to previous figure


  1. The first image shows that the Arabic is really solved in manar of character direct, this doesn't mean RTL, you can notice that in Safari because actually it showes Arabic is resolved and corrected but not Shaped
  2. The code showes that there is some work done in many levels, there is some code also to solve Arabic in the SVG render engine, which means that it is ready, I don't know why they didn't use it, may be it is little buggy
  3. I like this part very very much, in OS X, when you use font that doesn't have the glphy"the shape of the character" of the character, it will find anther font that does have a font containe the character, why this thing is very important, it think it is better to see the character than seeing squares :D, you can easily see this in Windows mobile if it doesn't has Arabic support by 3rd party
What do I think about this code is, this code is somekind of memory conuming, as I understand that the code doubles the buffer to manage to solve the bidi issue
I think it should be optimized some how.
anyways, I like the code it is very well commented, I really recommend you to review it,
it doesn't require any thing from Apple products to review this stuff.

I hope that anyone correct me if there is anything wrong

Thanks for your time.

BR
Ahmed Essam