I'm currently picking up a little on Objective-C to do some iOS development, for school project though. Since i have a MacBook (late 2009), apple developer account (free) and iPhone 3GS, it should not be that hard.. (i assumed)
I had very little C and C++ experience and knowledge, i'm just a hello world-level developer for both languages. That didn't stop me from downloading the 2.9 GB Xcode IDE and iOS4.1 SDK and try to write my first Hello World.
Followed a few guides like this and this, it wasn't that hard to print a hello world using the Interface Builder:
Just follow the guides step-by-step and try to grasp a few of the IDE (which is rather different from Visual Studio, NetBeans & SharePoint Designer)
After messing around with a few UIKit controls, i met a problem of not able to retract the keyboard on the simulator. Went around some forums and found that Apple gave a very good tutorial: UICatalog, which included most, if not all of the controls available in the API.
However, when i loaded the xcodeproj file, the compiler keep giving me the message: "Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain"
You can bring the build results up by pressing: command+shift+B
After a few attempts to search around the net for the solution, many suggested setting up Keychain Access (windows equivalent of the certificate manager) so that you have Apple Worldwide Developer Relations Certification, and the iPhone developer certificate, iPhone distributor certificate (if you want to put apps into iTunes), there are lots of things to do and pay (for distributing), but hey, i'm just trying to mess around with iOS 4.1, i'm not yet ready to go through all these.
I tried to set the code signing options under the project settings, but it still doesn't let me compile and run the simulator. Then for no reason, i looked at the build results window and saw that the build option was targetted for "device" instead of "simulator". I didn't change it to device (which requires you to do the above certificate signing set-up), it was the default setting, i changed it to "Simulator" then pressed command+B and everything went well, finally.
I'll be messing around more with Xcode and hope to be able to produce something and decide if i'll sign up for a distributor package with Apple @ US$99/yr. Stay tuned.
No comments:
Post a Comment