To get Xcode 3.1.3 working with iPhone OS 3.0.1, you’ll need to teach Xcode how to target iPhone OS 3.0.1.
Xcode will automatically recognize iPhone OS 3.0.1 and look for a new SDK at a set path. The problem is that SDK doesn’t exist. The good part is that the iPhone OS 3.0 SDK works perfectly for developing 3.0.1. The only apparent change is the SMS fix.
Assuming you’ve installed to /Developer, the iPhone OS 3.0 SDK is here:
/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)
When using Xcode with iPhone OS 3.0.1, Xcode looks for the iPhone OS 3.0.1 SDK here:
/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1
The trick, then, is to build a symbolic link that connects what Xcode is looking for with what it needs to find.
So what do you do? Assuming you’ve installed Xcode in the standard location, this is a Terminal command to fix the problem:
ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport\
/3.0\ \(7A341\) /Developer/Platforms/iPhoneOS.platform/\
DeviceSupport/3.0.1
(I’ve split this into three lines to make it easier to copy and paste with the \ line continuation character.)
This will not add a SDK to Xcode’s list, it will just teach Xcode to map your device to the 3.0 SDK.
A few other tips:
- If you still can’t debug restarting your iPhone may help. Most of the iPhones I’ve tried to debug on, I’ve had to restart first.
- If you get an error regarding code signing, try downloading your provisioning profile again and re-installing it. Also, select it again in your build settings.
Based on information from iPhone OS 3.0.1 Advisory.
Please explain where to give the above mentioned line
I’ve updated the post to make it clearer, thanks.
it didn’t work for me. But I’m not good with terminal.
I take it back. It did work for me. I need to run terminal when x code wasn’t running.
Looking at the script I wonder if you could get xcode to support 3.1?
3.1\ \(7C97d\)
I might try if I ever find the time
Did I say I managed to get it to work?
Thanks Steve
It might partially work, but I’m quite sure some of the SDK has changed shape with Xcode 3.1.
(And for some reason I’m having to manually approve comments again, I’ll fix that…)
I googled for the answer to this problem I’m having, and the blog I land on happens to have the exact same theme as mine. Thanks for the 3.0.1 tip, it worked.
Glad I could help! This info is actually in one of Apple’s docs, but neither Google nor Apple’s search could find it…
I picked this theme because it’s simple, both codewise and design. There’s a surprising amount of crappy themes for wordpress out there! This one seems clean enough to be a good start for customization.
Thanks for the tip: worked like a charm!
Did not work for me.
Here is the directpry with created links:
drwxrwxr-x 13 root admin 442 Aug 3 21:53 .
drwxrwxr-x 6 root admin 204 Jun 18 15:55 ..
lrwxr-xr-x 1 root admin 11 Jun 18 15:57 2.0 (5A345) -> 2.0 (5A347)
drwxrwxr-x 5 root admin 170 Jun 18 15:57 2.0 (5A347)
lrwxr-xr-x 1 root admin 11 Jun 18 15:57 2.0.1 (5B108) -> 2.0 (5A347)
lrwxr-xr-x 1 root admin 11 Jun 18 15:57 2.0.2 (5C1) -> 2.0 (5A347)
drwxrwxr-x 5 root admin 170 Jun 18 15:57 2.1
lrwxr-xr-x 1 root admin 3 Jun 18 15:57 2.1.1 -> 2.1
drwxrwxr-x 5 root admin 170 Jun 18 15:57 2.2
drwxrwxr-x 5 root admin 170 Jun 18 15:57 2.2.1
drwxrwxr-x 5 root admin 170 Jun 18 15:57 3.0 (7A341)
lrwxr-xr-x 1 olivier admin 65 Aug 3 21:50 3.0.1 -> /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)/
lrwxr-xr-x 1 olivier admin 65 Aug 3 21:53 3.0.1 (7A400) -> /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)/
Olivier, have you got Xcode installed to /Developer? If not, you’ll have to adjust the paths accordingly.
(Although since you seem to be familiar with Terminal, I think you might delete those symbolic links and create relative ones instead of absolute. It’s not as easy to explain since it’s more than one step, but it won’t care where Xcode is installed. Maybe I should change the tip to use relative links…)
Thank you steven, it works for me.
Hello,
thanks for the tip!
unfortunately, it does’nt change anything for me. One thing I don’t understand: when you guys say “it worked”, what do you mean exactly? Does a new entry “iPhone Device 3.0.1″ appears in the “Active SDK” combo box? Or, does the trick work another way?
I did enter the command in the terminal, it did create the link in the proper folder, and still, no “3.0.1″ choice in the combo box, and xcode is still complaining about the compatibility of my iPhone. Damn, what’s wrong with me?
thanks for any advice,
cheers,
neywen.
You don’t get another entry, the 3.0 entry should just start working. Did you install your tools to /Developer? If not, you’ll have to adjust the paths appropriately.
ALSO: Make sure you open up the Organizer and take a look at what it says about your iPhone. If I remember correctly, I had to enable my iPhone for development again after updating to 3.0.1. (That could be unnecessary, but it won’t hurt. And the Organizer is a great place to look for Xcode/iPhone problems in any case.)
I have run the lines above and the link was created, xcode is also installed under development. However it still gives me the message, and if i modify the name of iphoneos in the project properties to 3.0.1 the (missing) text appears. Should i do anything else for it to work?
What exactly does ” had to enable my iPhone for development again” mean? I can’t this to work again. I just get a yellow LED in Organizer and “This version…does not match…”.
Thanks a lot Steven, you’ve been a great help!
I thought that the command line trick was creating a new 3.0.1 entry in the sdk combo box, but no it just makes the 3.0 work using an iPhone with a 3.0.1 firmware.
As you said, I first had to enable my iPhone again, going to the Organizer, and push the button to “make this iPhone a development device”.
Then, I got a new error message while compiling and I understood I had to clean the build folder first.
Everything’s going nice since then.
Thanks!
Glad it helped. I should probably put a note in the article about restarting the iPhone. That always helps. (Kinda sad!)
I have followed the directions and still get the error when I copy and paste into terminal a second time it says file already exists so I guess I did it correctly but when I restart the iPhone and computer, then run Xcode, organizer gives me the same error about the OS version and cannot put my apps onto my iPhone device any longer.
Would appreciate any help, thank you!
OK, deleted and redid the copy and paste and it is now working but now doesn’t find the mobile provisioning files
Carl, you’ll probably have to add the provisioning file again to the organizer again.
Steven, Thanks, I see the provisioning files that I added back. They show up in the organizer window and when I get info on the project I set the distribution profile correctly and still get this error?
The iPhone “iPhone” doesn’t have the provisioning profile with which the application was signed.
Please add the provisioning profile via the Organizer, or check the “Code Signing Identity” build setting.
I had that problem, Carl, but earlier than 3.0.1. I think I ultimately just downloaded the profiles again from Apple’s portal site, and re-selected them in the project settings. But it was a while ago.
Steven, thanks again, that worked and all is right in the world again, well my world anyway
I don’t know if anybody can be helped by this entry, but maybe: first of all no commandline editing is necessary, we can command-alt-drag the folder to create an alias (which then has to be renamed) or we can even duplicate that folder… (which will clutter our diskspace)
But: either of the three solutions may cease to work, even after it had already worked fine… this is where i am coming in today, after several hours of being close to a very unhappy mail to apple – and you guys helped, but the final solution you provided, which is so simple like command-alt-dragging that folder, is not found that obviously in your text, so i frame it a little bit
—————————————
if the symbolic link to the framework exists, but the iPhone is still rejected:
RESTART YOUR IPHONE – XCode will love you for that :-/
—————————————
it was that simple, but i would never have thought of that, because the iPhone was detected and it also worked without any troubles (exept the compilation thingy)
Kilian, Apple suggests using ln rather than aliases. I don’t know why, but it’s possible aliases don’t work in all circumstances. (Or maybe Apple just thinks copy-paste is easier than a multi-step process.)