Compiling with XCode and iOS4

Hi,


I’ve done a lot of programming on Windows, but I have to admit I’m a bit of a newbie with compiling on the Mac, so it’s quite likely that I’m missing something simple.





I’m trying to get some of the examples to compile from the download, but most of them complain that "There is no SDK with the name or path’iphoneos4.0’ "





I have the latest download of XCode. If I go to the about menu, I get this information:





Version:     3.2 (10M2309)


Location:     /Developer


Applications:


Xcode:     3.2.4 (1708)


Interface Builder:     3.2.4 (804)


Instruments:     2.7 (3014)


Dashcode:     3.0.2 (333)


SDKs:


Mac OS X:


10.5:     (9L31a)


10.6:     (10M2309)


iPhone OS:


3.2:     (7B500)


4.1:     (8B117)


iPhone Simulator:


3.2:     (7W367a)


4.0:     (8A306)


4.1:     (8B117)





This shows that I am missing the iPhone OS 4.0, although I do have version 4.0 of the iPhone Simulator. I don’t know if that’s usual or not.





I’m aware of the “Base SDK for All Configurations” setting in the “General” tab of the project Information panel, and also the Base SDK setting in the Architectures region of the “Build” tab. Changing these settings makes no difference, and the main window still has the message “Base SDK Missing” in the drop down box at the top left.





I was able to compile the main OGLES2Tools project without any problem (although I do get a lot of errors if I try to compile with 4.1)





Anyway, I’m mainly interested to know why I can’t stop the examples complaining about iPhoneos4.0. If anyone has any ideas, I’d be very grateful for some ideas.





Thanks a lot,





Andy





Between iPhone OS 3.2 and iOS 4 there was something of a break in compatibility for XCode projects. We tried to set the 2.7 POWERVR SDK projects to use the latest Apple SDK at the time of release (4.0), but produce binaries compatible with version 3.0.

The problem is that 4.0 is no longer the most up to date version and installing 4.1 doesn’t also install 4.0. This leaves XCode reporting a missing SDK.

The solution that I have applied here is to set the Base SDK in the project settings and the target settings for each project (including the PVR Tools project) to iOS Device 4.1, by hand. We’re trying to find a better way of doing this - suggestions are welcome.

Note that to deploy to iPad you will have to set the iOS Deployment Target to 3.2 or earlier (at least until Apple updates the OS for the iPad).

If this doesn’t allow the examples to run and you stil have errors, can you please post them here and I will try to help you with them.



Thanks for your prompt reply Gordon, I’ll try your suggestions and get back to you.

All the best,
Andy