Posts Tagged ‘development’
Single Xcode project for iOS and Mac OS X
Thursday, September 16th, 2010In Xcode 3.2.4, it’s trivial to create same project for iOS and Mac OS X. Just add a new target into your existing project; if your project is for OS X, then create a new Cocoa Touch Application target. If your project is for iPhone, obviously, craete a new Cocoa Application target. Then do a Get Info on your new target, and choose the appropriate Base SDK. For simplicity, let’s presume you’re adding an OS X target to an iPhone project.
However, after doing this, you’ll quite probably find that despite the choice of Base SDK in your target (you used Get Info on it, didn’t you?), Xcode has locked the target SDK onto whatever your project originally used. That is, now you’ll find it locked onto iPhone, despite switching to the OS X target using the Overview dropdown (in the top left of your Xcode project).
So how do you actually switched the now-locked SDK? Quite simple. Hold the option key while clicking in the Overview box. Instead of only two-entries device list (if you have an iPhone target selected), and then Active Configuration, Active Target, Active Executable and Active Architecture, by holding the option key while clicking on Overview you’ll also find the Active SDKs list. By switching it to the appropriate OS, you’ll be able to compile the application.
Of course, now comes the hard part: actually porting the code to the new platform.
E49PEQSG669E
iPhone development: Bits/c++config.h: No such file or directory
Tuesday, April 27th, 2010Developing for iPhone with some C++ code? Suddenly getting this error after installing a beta SDK?
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:65:0 Bits/c++config.h: No such file or directory in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h
Note the bolded folder. Change into it and make a symlink from arm-apple-darwin9 to arm-apple-darwin10. Please note that Apple has fixed this already at one upgrade of beta SDK (I had this error before too, but I still didn’t get 4.0 beta 2 so I didn’t check) so it’s reasonable to assume they will do this again.
cd Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/usr/include/c++/4.2.1/
ln -s arm-apple-darwin9 arm-apple-darwin10
PS I don’t think posting this violates any NDA. Especially since origin for this solution is also public.
Sorting folder in Xcode
Wednesday, March 3rd, 2010About writing a Logo interpreter, part 3
Saturday, September 12th, 2009- Ok, token is of type “procedure name”, that’s cool.
- Once we’ve established that, let’s examine not what’s immediately afterwards, but the second one afterwards. C++ equivalent: *(it + 2) if iterator it is pointing to the procedure name itself.
- It’s a token of type “operator”? Cool! Let’s kick into special “eliminate-the-operator” mode.
- Grab the left side, grab the right side, calculate calculate calculate!
- Eliminate operator token and right side token. Replace left side token with the result of the operation.
This concludes the first series that I’ve began writing in late evening on September 9th, and finished in 0:49 on September 10th. Information provided so you don’t get surprised if the series doesn’t continue — remember, this is autopublished
About writing a Logo interpreter, part 2
Friday, September 11th, 2009Image source: The Turtle Farm at the Cayman Islands by Ev Nucci. CC-PUBLICDOMAIN. Source code manually colorized.
About writing a Logo interpreter, part 1
Thursday, September 10th, 2009You may or may not know about programming language Logo. It’s an interpreted language compared by some to Lisp whose best known feature is so-called turtle graphics. Turtle graphics mean there’s a small icon of a turtle (or alternatively just a triangle) which moves around the screen with commands such as FORWARD 10, and rotates around the screen with commands such as RIGHT 90. The other thing it’s really good with are lists of data, and recursion.





