Posts

Showing posts from May, 2011

[python] 'gcc-4.2' failed with exit status

Solution: add the following before the python command ARCHFLAGS="-arch i386 -arch x86_64" example: ARCHFLAGS="-arch i386 -arch x86_64" python setup.py build The Error occurs because the compiler tries to make the app for ppc architecture but after Xcode 4 the ppc compiler has been removed.

Using Accelerometer for Sprite Movement

via: http://www.cocos2d-iphone.org/wiki/doku.php/tips:using_accelerometer_for_sprite_movement init{ self. isAccelerometerEnabled = YES ; [ [ UIAccelerometer sharedAccelerometer ] setUpdateInterval : 1 / 60 ] ; } #define kHeroMovementAction 1 #define kPlayerSpeed 100 - ( void ) accelerometer : ( UIAccelerometer * ) accelerometer didAccelerate : ( UIAcceleration * ) acceleration { // use the running scene to grab the appropriate game layer by it's tag GameLayer * layer = ( GameLayer * ) [ [ [ CCDirector sharedDirector ] runningScene ] getChildByTag : kTagGameLayer ] ; // grab the player sprite from that layer using it's tag CCSprite * playerSprite = ( CCSprite * ) [ layer getChildByTag : kTagSpritePlayer ] ; float destX , destY ; BOOL shouldMove = NO ;   float currentX = playerSprite. position . x ; float currentY = playerSprite. position . y ;   if ( acceleration. x > 0.25 ) { // tilting the device

Great collection of iOS Resources

Learning Resource http://www.buildingiphoneapps.com/2011/04/great-learning-resources-for-ios.html [advanced]  http://oleb.net/blog/2011/04/best-ios-and-mac-development-related-links-march-2011/ [advanced]  http://nachbaur.com/blog/ios-development-link-roundup-part-1 Open Source [UIkit]  http://iosframeworks.com/ http://cocoacontrols.com/ [Crash Report]  http://code.google.com/p/plcrashreporter/ DTAttributedTextView  is used for displaying HTML-formatted comments without UIWebView libxml2 : for scraping enormego   and   three20 : pull-to-refresh Telekenesis : URL parsing from MWFeedParser : HTML entities atebits : smoothness News YC   ( http://newsyc.me/?? ) open source hacker news client https://github.com/newsyc/newsyc http://kstenerud.github.com/ObjectAL-for-iPhone/ http://opensource.apple.com/release/ios-43/ http://www.iphoneexamples.com/ [OpenGLES]  http://www.iphonedevsdk.com/forum/iphone-sdk-tutorials/14934-opengl-es-iphone.html