Search posterous

Search all posts and users. Type a name, type a favorite song title, whatever! See what comes up.
  

More posterous blogs











More recommended blogs »

Here are posterous posts filed under xcode...

jimthedim says...

Well I found a non-answer. That is I found a way to stop it.

Go to Preferences -> Debugging and switch off lazy loading.

I found this answer here:

http://www.innerexception.com/2008/05/in-xcode-orange-breakpoint-means-gdb.html


Links to iPhone Apps:

Weight Monitoring:
http://itunes.apple.com/gb/app/weight-monitor/id333177401?mt=8
Polygon Puzzle: http://itunes.apple.com/gb/app/polygon/id338129363?mt=8

Filed under: xcode

obleo says...

iSimulate is an application/library pair designed to solve the issue of not being able to use multi-touch and the accelerometer in the iPhone Simulator. iSimulate wirelessly sends multi-touch events, the accelerometer data, and the GPS location to the iPhone Simulator.

This is ratter useful for recording video trailers of iPhone Apps using video screen capture.

We got this, really for doing video trailers. I had only used still screens before and wanted to move over to more of a video preview. That actually recorded the events of the device, with a clean view for the record.

Another developer suggested taking a look at this. All I can say it well worth a spot in my tool box. Check it out for your self maybe you find it useful also.

It really a pretty smart and useful tool, for any iPhone app developer. It is much better than just using it for the application of taking video trailers. If you very used the iPhone Simulator, you would understand, just by watching the above video.

Go check it out. Worth the time, and price.

More Info @ http://www.vimov.com/isimulate/

Filed under: X-Code

what2day says...

Because what I really need to do is learn yet another programing language I'm taking an iPhone Development class at machine project with Chandler McWilliams as the instructor.

He recommended the book Cocoa Programming for Mac OS X and since fellow-student Matthew Iadarola got it out of the library we decided to give the first example a shot: the random number generator.

It had to be adapted some for the iPhone since this is not an iPhone book, but we got it done.

I posted the code for M.I., heavily commented, here. I also uploaded the Buttons example from class b/c I reference it in my comments. 

There are two versions, functionally virtually identical, but the UI layout in one is much more streamlined. It's all about design.

images: v2, v1, icons

     
Click here to download:
Hello_Random_Number_on_the_iPh.zip (454 KB)

Filed under: Xcode

Darren says...

She does this fairly often, I think I would be annoyed if it wasn't so cute.. She likes to chase the mouse cursor around the screen, and bat at word ballons when they popup.

   

Filed under: xcode

Yesterday, as I was working on an AppShaker update, I came across a really tricky problem, that I think quite a few of you might experience so I'm detailing it here.

What happened is that I updated to the latest version of ASIHttpRequest, and also to the latest version of XCode 3.2 for iPhone OS 3.1 and again my project stopped compiling. More precisely it was the following code from ASIHttpRequest.m that was generating an error : 

// Obtain the list of proxies by running the autoconfiguration script
#if !TARGET_OS_IPHONE ||  __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_2_2
CFErrorRef err2 = NULL;
NSArray *proxies = [(NSArray *)CFNetworkCopyProxiesForAutoConfigurationScript((CFStringRef)script,(CFURLRef)theURL, &err2) autorelease];
if (err2) {
return nil;
}
#else
NSArray *proxies = [(NSArray *)CFNetworkCopyProxiesForAutoConfigurationScript((CFStringRef)script,(CFURLRef)theURL) autorelease];
#endif

Basically it was always compiling the "else" clause, despite the fact that I was compiling (or at least it seemed so) for OS 3.0, so we should be normally be in the first part of the clause. It was then failing because the version of the method being called was not the proper one. When looking at the error in detail, especially the command line that was being called, this is what was being generated in the case of compiling with the simulator :

CompileC "build/AppShaker.build/Debug-iphonesimulator/AppShaker Lite.build/Objects-normal/i386/ASIHTTPRequest.o" Classes/ASIHttpRequest/ASIHTTPRequest.m normal i386 objective-c com.apple.compilers.gcc.4_2
cd /Users/loom/Documents/work/iphone/AppShaker
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=20000 -isysroot /var/folders/95/95xwCQ0mEeivSCrcsKn1i++++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs/iphonesimulator-iPhoneSimulator3.0-aljhdklevtyfaoefjftiofmwffte -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote "/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphonesimulator/AppShaker Lite.build/AppShakerLite-generated-files.hmap" "-I/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphonesimulator/AppShaker Lite.build/AppShakerLite-own-target-headers.hmap" "-I/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphonesimulator/AppShaker Lite.build/AppShakerLite-all-target-headers.hmap" -iquote "/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphonesimulator/AppShaker Lite.build/AppShakerLite-project-headers.hmap" -F/Users/loom/Documents/work/iphone/AppShaker/build/Debug-iphonesimulator -I/Users/loom/Documents/work/iphone/AppShaker/build/Debug-iphonesimulator/include -I../fbconnect-iphone/src "-I/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphonesimulator/AppShaker Lite.build/DerivedSources/i386" "-I/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphonesimulator/AppShaker Lite.build/DerivedSources" -DLITE_VERSION -include /var/folders/95/95xwCQ0mEeivSCrcsKn1i++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/AppShaker_Prefix-audfaisngyebyfexxpoauqdgjasw/AppShaker_Prefix.pch -c /Users/loom/Documents/work/iphone/AppShaker/Classes/ASIHttpRequest/ASIHTTPRequest.m -o "/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphonesimulator/AppShaker Lite.build/Objects-normal/i386/ASIHTTPRequest.o"

and when compiling for the device, I got the following command line :

CompileC "build/AppShaker.build/Debug-iphoneos/AppShaker Lite.build/Objects-normal/armv6/ASIHTTPRequest.o" Classes/ASIHttpRequest/ASIHTTPRequest.m normal armv6 objective-c com.apple.compilers.gcc.4_2
cd /Users/loom/Documents/work/iphone/AppShaker
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch armv6 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -isysroot /var/folders/95/95xwCQ0mEeivSCrcsKn1i++++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs/iphoneos-iPhoneOS3.0-gxzvuzxhrjrauieejvpvjxrjejlf -fvisibility=hidden -gdwarf-2 -mthumb -miphoneos-version-min=2.0 -iquote "/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphoneos/AppShaker Lite.build/AppShakerLite-generated-files.hmap" "-I/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphoneos/AppShaker Lite.build/AppShakerLite-own-target-headers.hmap" "-I/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphoneos/AppShaker Lite.build/AppShakerLite-all-target-headers.hmap" -iquote "/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphoneos/AppShaker Lite.build/AppShakerLite-project-headers.hmap" -F/Users/loom/Documents/work/iphone/AppShaker/build/Debug-iphoneos -I/Users/loom/Documents/work/iphone/AppShaker/build/Debug-iphoneos/include -I../fbconnect-iphone/src "-I/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphoneos/AppShaker Lite.build/DerivedSources/armv6" "-I/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphoneos/AppShaker Lite.build/DerivedSources" -DLITE_VERSION -include /var/folders/95/95xwCQ0mEeivSCrcsKn1i++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/AppShaker_Prefix-bgsrygfnnblyztcpvkeymcpfoigy/AppShaker_Prefix.pch -c /Users/loom/Documents/work/iphone/AppShaker/Classes/ASIHttpRequest/ASIHTTPRequest.m -o "/Users/loom/Documents/work/iphone/AppShaker/build/AppShaker.build/Debug-iphoneos/AppShaker Lite.build/Objects-normal/armv6/ASIHTTPRequest.o"

Then I looked at the system defininition for the __IPHONE_OS_VERSION_MIN_REQUIRED constant :

#ifndef __IPHONE_OS_VERSION_MIN_REQUIRED
    #ifdef __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
        // compiler sets __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ when -miphoneos-version-min is used
        #define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
    #endif
#endif

What is really interesting is that some nice engineer documented here in the comment that the environment constants comes from the -miphoneos-version-min command line option. So immediately I looked at the above command lines to figure out what the value was for those. In the case of the device compilation, indeed we can find it, and it's value is : 

-miphoneos-version-min=2.0

In the case of the simulator, strangely it isn't generating the same command line and is instead directly defining the minimal OS version directly, as seen in the extract below :

-D__IPHONE_OS_VERSION_MIN_REQUIRED=20000

Why the two environment compile differently is still a mystery to me so if any readers can shed some light they are more than welcome. 

When I saw the value being at minimal 2.0 I wondered where it could come from. I looked at my project build variables and I saw that I had multiple values for the IPHONEOS_DEPLOYMENT_TARGET variable, so I cleaned it up and removed all different levels. So basically this was what it looked like in the main project Info screen :

As it is NOT in bold, it means that the definition is using the default project compiler value, so I thought that was probably ok.

So I googled "iphoneos-version-min" and came across the following source code (http://www.opensource.apple.com/source/gcc_42/gcc_42-5566/gcc/config/darwin-driver.c?f=text), which is basically GCC patches contributed by Apple to the GNU compiler project. The interesting part is the following extract :

  /* For iPhone OS, if no version number is specified, we default to
     2.0.  */

As this was the behavior I was seeing, I suspected that probably the default in the project info must not be correct. So I tried the following, which worked (!) : I went back to the project info, selected the "iPhone OS Deployment Target", the selected "iPhone OS 2.0" (or any different value, it doesn't matter, and then reselected "iPhone OS 3.0". This had the effect of making a definition at the project level, which is confirmed by the fact that the setting is now in bold, as illustrated below : 

I then selected "Build -> Clean All Targets" and rebuilt all targets, and that was it !

So there it was, another obscure behavior of XCode. If others have this problem, please comment this blog entry, and I might then make a bug report to Apple, because this is really tricky to figure out.

Filed under: XCode

jsmp says...

Maybe this has to do with the new XCode but I am loving that finally I can use quick-look to quick read my Code in a less ugly way (syntax highlight yaw! \o/ )


 

Filed under: xcode

Today I just upgraded my development machine from Leopard to Snow Leopard, and upgraded the XCode environment from 3.0 to 3.2. Here are the steps I needed to perform : 

The SDK 3.0 is the only one supported, so if you had projects that were compiling against earlier SDKs, you will have to update them. Here are the basic steps to upgrading your project to a Snow Leopard environment : 
1. Download the Snow Leopard SDK & Install it
2. For each project, In the project info, switch the base SDK to 3.0
3. In each target, check in the info that the SDK is also 3.0
4. For each target, switch the compiler from GCC 4.0 to GCC 4.2 (or you get an obscure compilation error : UILocalizedIndexedCollation error: syntax error before 'AT_NAME' token)
5. Empty the cache in XCode
6. Clean all targets

This should be everything. Of course feel free to comment this post if you find any more steps or if I have missed something.

Filed under: XCode

obleo says...

A Stanford computer science class is available to the general public free online. The full 10 week course includes videos and pdf's. Online viewers of the Stanford course will see the same lectures as the on-campus students, but will not receive credit for the course.

23 videos around a hour each and 17 pdf docs.

see it, download it (with iTunes) @ http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.2024353965.02024353968

Filed under: xcode

kielrene says...

Renaming Xcode projects isn't as easy as it should be. For some reason, Apple decided to make it overly complicated to rename it once you've set the name. Thankfully there's a shell script out there that works very well. 

Filed under: Xcode