Google

Tuesday, December 15, 2009

Connecting a Mac to an Active Directory domain

These are the steps you should follow in order to connect MacOSX to an existing active directory domain. I tried this using MacOSX Snow Leopard 10.6.2. The domain server is Windows Server 2003.
  1. In the Mac, go to System Preferences -> Accounts
  2. Click the lock icon to unlock it and enter the admin password to gain access to administrative settings.
  3. Click "Login Options"
  4. Under "Network Account Server", click "Join"
  5. In the popup, click "Open Directory Utility" and make sure all the tick marks are checked.
  6. In the "Server" field, enter the server name (without "\\" or anything) which is hosting the active directory service.
  7. If it finds the server, it will ask you for the information shown below:
  8. Make sure to use the client computer ID that your administrator has given.
  9. Enter the correct details for the settings and click OK.

To login as a domain user, enter the user name in the usual domain\username format in the MacOSX login window.

Sunday, November 15, 2009

Diving into the iPhone AppStore - Part 2

This is the continuation from the post Diving into the iPhone AppStore - Part 1.

Application <-> Firmware Compatibility

Apple frequently releases firmware update for the iPhone. These new releases includes bug fixes, new features for users as well as developers. If your application depends on a certain feature that is only available in newer firmware versions, it will not work on devices with older firmware installed. For example, the MapKit library which provides native Google Map controls for third-party developers, was introduced in iPhone OS 3.0. So if your application needs to use native Google Map controls, it can only be run on devices with iPhone OS 3.0 or later. Similarly each new version of firmware (3.1, 3.1.2, …) introduces new features like this.

In XCode, you can set the target firmware version when developing your application. You can go as back to iPhone OS 2.0 as well. The best thing to do is setting the target to the minimum firmware version that your application requires so your application will be available to a larger audience. Although most iPhone users upgrade the iPhone firmware as Apple releases them, some don’t.

AppStore

AppStore is the first successful and the largest mobile application store on the planet and it has set a huge distance between it and its nearest competitor, Android Market. In a nutshell, it’s the one big store that iPhone users can shop for third party applications, currently featuring over 100,000 applications. If you are not an iPhone user, just install iTunes on your computer and visit the AppStore. You’re in for a treat!

If Apple is good at something, it’s maintaining the highest quality possible in their products. Their main strength is providing a very high amount of customer satisfaction by means of quality user experience. This is true for the AppStore shopping experience too. Users can easily install applications on their iPhones without any of the technical difficulties that were available on past mobile platforms. The end result is very high user recognition and discoverability for applications developed third party developers. When you put your application on the AppStore, it’s instantly available to all the 30 million something iPhone users around the world. And it’s guaranteed, that it’ll work on all the devices of the users who choose to install it. This is the fact that is attracting developers into the iPhone platform.

Application Approval Process

Apple loves maintaining quality and they want the third party developers to do that too. They don’t want third party developers to cripple Apple’s image in quality. When a user installs an Application, and if it gives crippled user experience, it’s the iPhone that get’s the blame from the user. Obviously Apple doesn’t like it and they want the user to have the best experience possible with their device. So they have a set of rules that every third party developer should follow in order to ensure that quality.

Making a release

When you finish building your application, and finish your internal testing and QA, you’d think you could make your application available to users straight away. This is not the case with iPhone. When your application is ready, you have to submit it to the Application Approval Process.

This is where things get interesting. It might take weeks (or months!) to get your app approved (or rejected!). You have no control whatsoever over this process and you have to wait until you get results from Apple. If your app is approved, it’ll appear on the AppStore and you’ll be notified. Since it’s humans that inspects your applications you can expect human errors and inconsistencies in different situations. According to Apple, they have a team of 40 full time employees, who have to review nearly 8500 application submissions per week. And every app is reviewed by 2 employees. Funny ha!

The point is, things can go wrong! and you won’t have any control over it. Suppose you submit your app and after few weeks it gets approved. As the users start using it, you notice a small bug that can be fixed quickly. But still, you have to resubmit the modified version of application and wait…all over again just to ship that small bug fix, while users keep using the buggy version. Because of this, you have to be very very careful in making a release into the AppStore. A small mistake can cost you so much.

Economics

Despite all the drawbacks, AppStore has a constant developer attraction. Mainly because of the unification that it provides in terms of distributing their software. After your app appears on the store, users around the world can buy it with a single click, using their computers or iPhones. (and it’s guaranteed to work on their devices) With every sale, the developer gets 70% of the price of the application and 30% goes to Apple. It’s that simple. No more infrastructure maintenance, financial handling and complex charging policies. You’ll get a monthly cheque from Apple. You don’t have to pay anything if your app is free.

As the developer, you get to choose the price of your app. From the start, developers have experimented with various pricing strategies which have yielded very interesting results. The sweet spot is considered $0.99. The net profit you get doesn’t come from the profit margin. It’s the sheer number of sales you could get if you do things right. There are lot of success stories about developers who have made fortunes with their simple, $0.99 apps. In the AppStore, sales figures can come in tens of thousands per day. So even if you make $0.50 profit per sale, it can mean $5000 profit per day! With the sheer number of iPhone users around the world (more than 30million) you have can have a huge target user base who can use your application. It doesn’t magically give successful results. You have to be creative and strategic with you application.

Conclusion

With all that being said, there’s a LOT I haven’t said. The web is pouring with iPhone and AppStore related articles in which many are interesting reads. I’ve been following on all the things related to iPhone even before it’s release. If you follow up on the subject, it may turn out to be fascinating to you too. As with everything in this universe, it has both good and bad things about it. Just know your beast and learn to get the most out of it. If you need to know more info, just search the web or put a comment.

Good Luck!

Interesting reads:

http://daringfireball.net/
http://blogs.zdnet.com/Apple

Thursday, October 29, 2009

Diving into the iPhone AppStore - Part 1

The iPhone madness is resonating throughout the world and the shock wave has reached Sri Lanka as well. The madness is two-fold; iPhone User madness and iPhone Developer madness! I've been fortunate enough to be a part of the staggering iPhone user base for one and half years now. Thanks to my new employer I've been able get my hands on "the other side" as well, that is, the iPhone development arena!

I'm writing this since several people have asked me about iPhone development procedures, about the AppStore and such. This should help any would-be-iPhone-developer to know about prerequisites, special considerations and possible frustrations! that he or she is going to face.

Here are the steps that you should follow to get into iPhone development using iPhoneSDK.

1. Get a Mac!

Can't I use Windows (or Linux)? Of course not! All official iPhone development tools are developed by Apple and they are Mac-only!

Well, this is costly! but you have several choices here. If you have the money, you could go for an iMac. That's apple's desktop class computer and it's sooooo pretty! Next choice would be a MacBook Pro or a lower end white MacBook. If you have a spare monitor and keyboard/mouse, you can go for a MacMini (it's kind of cheap) and plug your own monitor and keyboard to it.

If you really need it, for the initial stage of experimenting, you can try out hacked versions of MaxOS X on your PC. But these have lot of glitches in them and it's hard to get them working. More info at http://www.osx86project.org/.

MacOS X version requirement
iPhoneSDK have a minimum requirement of a certain version of MacOS X to be installed. The latest SDK version (3.1.2) requires MacOS X 10.5.8 to work. The requirement tend to elevate with most updates to the iPhoneSDK. So make sure you have necessary software updates installed on the OS.

2. iPhoneSDK

iPhoneSDK has more or less the same development tools, libraries and programming paradigms that MacOS X uses. The reason for this is that, iPhoneOS is just MacOS X with a different UI running on different hardware. In fact, apple has built iPhoneOS with the same source files of MacOS X Leopard kernel and most of the system services and libraries. So it has the same power and the architecture of the desktop class MacOS X. If you are a Mac developer (which I'm not), you'll find iPhoneSDK surprisingly similar to the development tools you've been using up to now. The only major deviation that the iPhoneOS has from MacOS X, is the UI, which is a complete rethought from top to bottom.

XCode
XCode is the IDE you'll be using. Although you are not required to use XCode, it has really nice and elegant features making it the standard choice of Mac and iPhone developers (much like Microsoft Visual Studio). XCode and other supporting development tools are freely available on the iPhone developer connection website.

Objective-C
In iPhoneSDK, You'll have to write code primarily in Objective-C. It is essentially a super set of C, meaning you can code in pure C if you want. You can think of Objective-C as an extension library to C. All it does is providing an object-oriented like syntax to access underlying C entities. The syntax may appear weird at first since it's significantly different from the "dot" notation we are used to in C-style languages. But within 10 minutes or so, you can get the hang of it.

Since we are talking about native application development here, there are no fancy runtimes available for you. Actually, Objective-C itself has a runtime to do stuff like wrapping/unwrapping Objective-C classes from and to their equivalent C data structures. But it's not as powerful as .Net CLR or Java virtual machine. In my opinion, iPhoneSDK development stands between Win32 native development and .Net development. You don't have to go into so deep as native Windows programming, but you don't also have a large runtime feature set like .Net. For example, Objective-C runtime, doesn't have a garbage collector so you have to release resources manually when you finish using them. Somewhat similar to free() in C but not exactly the same. You'll understand these fine differenciations when you read the subject matter.

For more info on everything regarding iPhone SDK and AppStore, register on iPhone Developer Connection.

3. Testing the apps

iPhoneSDK comes with a nice iPhone simulator that you can use to test your applications. Obviously this doesn't have all the features of a real iPhone but you can emulate most of the functionality here. One thing to keep in mind is that DO NOT test application performance in the emulator. Since the emulator runs using your desktop CPU and hardware, applications run significantly faster on it. But it should be enough for most day-to-day business class applications.

If you do need to test your application on a real device however, you might want to consider buying an iPhone or an iPodTouch (iPodTouch lacks some hardware features the iPhone has). In addition to that, you need to register on the iPhone Developer Program ($99/year) in order to acquire a developer certificate. You need that certificate to test your applications on a real iPhone.

.

Tuesday, September 15, 2009

Gaming Industry and "XP Effect"!

Of course this is not about running games on windows XP. :-) I thought of writing this because 1) I haven't written a blog article from some time and 2) I see some dilemma that has been plaguing the technological progression of these two ecosystems. Hence the reason for the title of this article is the similarity that exists in the direction these two are headed.

If you are not a gaming fan you might consider skipping this article. (it's boring anyway!)

First let me extract what is known by many people. Even after two progressive Windows releases, Windows XP still dominates the market as the primary operating system of users arround the world. With advancements of computer hardware and software, you would expect people to move forward. In fact, that's what actually happened in the past. If we consider only the Windows community, users have steadilly migrated onto new operating system versions from Windows 3.0 era to XP era. With hardware advancements over time, the operating system designers were able to deliver new features and concepts and users willingly grasped them.

But since then, the Windows ecosystem seems to be stuck on Windows XP for a long time. (Argubaly, there maybe several reasons for it including Microsoft screwing up over Vista but that's not what this article tries to discuss) The point is, despite rapid growth of hardware and software capabilities, most end-users have decided to stay with what they are already familiar with. It seems that constant "change" that have existed with end-users, is "stabalized" for the past few years.

In my point of view, the gaming industry too have faced this kind of stabalization point in terms of exploiting hardware capabilities. In the case of Windows XP, it was the end-users who seems to have reached a stabalizatin point. But in the gaming industry, it's the game developers that have reached a certain stabalization. In the past, we saw games being released with higher and higher hardware requirements. When you buy a graphics card, it'll be obsolete within a month or two. But now, all the new gaming titles seems to aim a certain level of hardware requirements that would no way require high end graphics cards.

The Reasons

There's a lot. Talking about Windows, users were pretty satisfied with features offered by Windows XP. Most couldn't justify moving onto Vista with the overhead it had on the system and the user himself. The jump caused a considerable change of user interaction. Users simply chose to stick with what they already had, since it was familliar and enough for their requirements.

The same goes for the gaming industry. Only that it maybe little more complex. There is a level of harware specification that can be regarded as familliar and enough for most gamers and that's the level the game developers going to build their games on. This is mostly decided by the current versions of gaming consoles. Unlike PCs, gaming consoles (XBOX, Playstation, etc...) are the major market for games. We can see new PC graphics cards released every month but gaming consoles may take years to re-iterate. So a game which requires the highest hardware capabilities end up being available to a limited set of the consumers. Since developers like to expand their market they compromise on the game graphics to make it available to a larger gaming community.

The Effects

On Windows, what always happens will happen in this case as well. Developers will write software for XP because a large user base is available and users will continue to use XP because there are lot of software available. The downside is the old operating systems and software will not get to use new hardware features supported only by new software.

Talking about games, of course, graphics does not make a game. There's a lot more to it. Developers can make superb gaming titles by inventing controversial story lines, music and gameplay experience. But for "graphics-freaks" like me, gaming graphics will always matter! In fact, I'm using a somewhat old graphics card (see here). But it has more horsepower than all the recent games I've played need (except Crysis). I really wish those games exploited that extra power and improved more on graphics. Although we think the games will be more and more realistic, it will take a longer time to progress as the industry addresses the requirements of the global market.

If you read it this far, I know there are lot of points you may not agree. It's open for discussion...
.

Friday, July 24, 2009

Windows 7

Though I was lazy to download Win7 RC due to exams and stuff, I got a copy thanks to the Microsoft .Net Forum Sri Lanka. I installed it on a separate partition since I didnt like to replace my 64bit Vista with this 32bit version. Here's a personalized review of Windows 7 mentioning the improvements in my interested areas.

(There are tons of in-depth Win7 reviews out there. This is just a personal preference of feature additions that I stumbled upon in my usage)

Overall, Windows 7 is snappier and cleaner to the highest level. Here are some additional things I noted:

Displays the really usable memory in system properties

See this post. 32bit OSes cannot use 4GB RAM. They are limited to 3.25GB. On my system, XP 32bit showed 3.25GB as full memory available. But in Win7 32bit it shows both the real memory and usable memory in system properties. This would avoid user confusion in situations like I faced as in the aforementioned post.


Performance Index Differences

Performance Index scale has been changed in Windows 7. Compare the rating I have in Vista and the new rating. In Win7, CPU and RAM performance index have been moved higher. I got a lower index for hard dist performance since I installed Win7 on an IDE hard disk. Otherwise my Base score in Win7 would have been 5.7, compared to 5.5 in Vista.


Rating in Vista SP1 (in SATA HDD)


Rating in Windows 7 (in IDE HDD)


Detects iPhone even without iTunes driver

Windows 7 detected my iPhone straight away and allowed me to use it as a camera. In XP and Vista, the iPhone won't even charge from the USB without the driver installed. This would make my life a lot easier if everybody had Windows 7. :-) It's worth to mention that Ubuntu had this driver built-in from some time ago.


Video format support

The video formats we love; xvid, divx, h264 and more, are natively supported in Windows 7. So you can watch your films even without installing a codec pack or another player. But for subtitles, you will need a player like KMPlayer or VLC.

Sinhala Typing isn't fixed yet!

That wiered Sinhala typing problem we had in Vista, still exist in Windows 7 as well. I had to install Vista Sinhala Quick Fix to fix that.

Saturday, July 4, 2009

My 3 Column Blogger Template

I felt 2 columns was not enough for my blog and decided to change it to 3 columns. I found this article showing how to take an existing blogger template and make it 3 column: http://www.bloggerbuster.com/2007/07/create-three-column-blogger-template.html
This article modifies the blogger Minima template, but I did this on blogger's Son of Moto template.
I was previously using Son of Moto template since I liked its fonts, link colors and all but I decided to change it's Greenish color theme to my own one. This was pretty easy, considering I had no experience in editing CSS before!


If somebody liked my template and wanted to modify, you can download it from the link below. Remember, this is just a modified version of Blogger Son of Moto template.

Download Link: http://www.mediafire.com/?ytdywrnq4zn

All images are tiled .gif ones. and they add up to just 1KB. I cannot guarantee the availability of images in its current server. So I suggest you host the images on your own server if you really need to use those.
.

Sunday, June 21, 2009

How to unlock iPhone with OS 3.0

WARNING: The procedure in this post may not always give the same correct results. So use it at your own risk.

Apple released iPhone OS 3.0. So Dev-Team has released a jailbreak tool for OS 3.0. This lists down the steps for upgrading your iPhone to OS 3.0 and then jailbreaking it. FYI, Jailbreaking and Unlocking are two separate things. You have to Jailbreak before unlocking. Jailbreaking is cracking the OS. Unlocking is making any SIM work with your iPhone.

The procedure is slightly different for iPhone 2G and iPhone3G. So do whatever applies to you. The process is fairly easy and doesn't use any command line tools..

I personally did this procedure only on my iPhone 2G. I have no way of testing this for iPhone 3G.

Upgrading the iPhone
  1. Open iTunes. (version 8.2 or later must be installed. Get it here)
  2. Connect your iPhone to the computer. iTunes will show the iPhone sync screen.
  3. Click the Update button in iTunes.
  4. iTunes will begin downloading the firmware file (about 240MB).
  5. The download progress will appear in the "Downloads" section of iTunes left panel.
  6. You can disconnect your iPhone while the file is being downloaded. Connect it after the download and click Update button again.
  7. iTunes will install the downloaded firmware file to your device. This may take like 20 minutes or so.
Upgrading is finished. If you are using an unofficial SIM the phone will be locked. Now for the jailbreak and unlock.

Preserve the downloaded firmware file
  1. Now you have to locate the firmware file iTunes just downloaded and store it in an easy to access folder.
  2. In My Computer, go to this address: %AppData%\Apple Computer\iTunes\iPhone Software Updates
  3. This folder is where iTunes stores downloaded iPhone firmware files. You have to copy the file corresponding to your iPhone to any folder you like for future use.
Here are the file names:
  • for iPhone3G : iPhone1,2_3.0_7A341_Restore.ipsw
  • for iPhone 2G : iPhone1,1_3.0_7A341_Restore.ipsw
Copy the file to any folder you like.

Jailbreaking Procedure
  1. Download the latest version of redsn0w torrent from here: http://thepiratebay.org/user/iphonedev/
  2. Extract the downloaded archive. There will be a program called redsn0w.exe in it.
  3. Run the redsn0w.exe. This is the jailbreaking tool.
  4. Carefully read instructions on the screen and do what it says.
  5. In the first screen, click browse and give the firmware file you copied before.
  6. In the next screen put a tick for Cydia and click next.
  7. Follow instructions on redsn0w and if u follow it the phone will be jailbroken within like 15 minutes or so.
Unlocking Procedure

If you upgraded an iPhone 2G it should be already unlocked. iPhone 2G does not loose its unlock when upgrading. On the other hand, iPhone 3G looses its unlock when upgraded. So you have to install ultrasn0w to unlock iPhone3G.

This is for iPhone3G only.

Unlocking instructions are also available here.
  1. Connect the iPhone3G to the internet (WiFi Only. Cannot use 3G since SIM is locked).
  2. Open Cydia in iPhone.
  3. In Cydia, go to Manage -> Sources
  4. Tap Edit, then tap Add.
  5. Type this in the text box: repo666.ultrasn0w.com (There's a Zero in the word ultrasn0w)
  6. Tap Add Source. Wait until it refreshes. If you typed it wrong, it will give an error.
  7. Go to Search and search for "ultrasn0w" and install it.
  8. Reboot your iPhone3G.

Incoming phone number detection issue


iPhone does not support Sri Lankan phone number formats (as many other unsupported countries). So if your address book contact has 071123456 and if you receive an SMS from +9471123456 then the SMS will not detect the contact name for that number. You can fix that after jailbreaking by installing a patch from Cydia. You don't have to do this if you don't have the issue.
  1. Connect your iPhone to internet (through WiFi or 3G).
  2. Open Cydia. (Cydia is automatically installed when jailbreaking)
  3. Wait until it refreshes its database.
  4. Go to search tab from the bottom panel.
  5. Search for "Caller ID Fix"
  6. Some results will appear. As at the time of writing the latest version was "Caller ID Fix for 2.2". I installed this on iPhone OS 3.0 and it worked for me.
  7. If it shows a fix for 3.0 then install that version. Otherwise fix for 2.2 will be OK.
  8. Tap on the item and install it. It will do some rebooting stuff after installing and your contacts should be identified correctly now.
Through Cydia you can install lot more interesting stuff.

Cycoder - Video recording application
Winterboard - Apply themes for iPhone
Categories - Group icons into folders
SBSettings - easy access panel to popular settings

Put any questions you may have on comments. Good luck!

Update
redsn0w torrent download link changed to http://thepiratebay.org/user/iphonedev/
.
.