PDA

View Full Version : Where is the OS X iPhone Disk Image?




shadowband
Jul 13, 2008, 03:47 PM
I'm stuck at step 1 of the "Installing OS X iPhone" section of the iPhone Developer Program User Guide.

Step 1: Download the OS X iPhone Disk Image (.dmg) from the iPhone Dev Center for the apple device you are using.

I've scoured the site to no avail. I did find something on the apple forums that stated the following:

The disk image used to be available when beta versions were being distributed. The only way to get the v2.0 firmware (iPhone OS) is to use iTunes and upgrade to the latest version. You have to click "other" although the correct firmware version is selected, then find the ISPW file that is in the /user/library/itunes/ folder and point to that. Then you can follow the how to and everything starts making sense. Apple's how to is just out of date on this.

I've scanned my entire hard drive for all .ispw files, and still no dice. I'm at a dead end at this point, so any suggestions are welcome. Thanks.



Cromulent
Jul 13, 2008, 04:29 PM
I'm stuck at step 1 of the "Installing OS X iPhone" section of the iPhone Developer Program User Guide.

Step 1: Download the OS X iPhone Disk Image (.dmg) from the iPhone Dev Center for the apple device you are using.

I've scoured the site to no avail. I did find something on the apple forums that stated the following:

The disk image used to be available when beta versions were being distributed. The only way to get the v2.0 firmware (iPhone OS) is to use iTunes and upgrade to the latest version. You have to click "other" although the correct firmware version is selected, then find the ISPW file that is in the /user/library/itunes/ folder and point to that. Then you can follow the how to and everything starts making sense. Apple's how to is just out of date on this.

I've scanned my entire hard drive for all .ispw files, and still no dice. I'm at a dead end at this point, so any suggestions are welcome. Thanks.

Go to http://developer.apple.com/iphone/ login and then the download link is on the top of the page. It will be grayed out until you do login though.

shadowband
Jul 13, 2008, 04:38 PM
OK - I just figured this out, so I'll post my own reply to help out anyone else with this issue.

My iPhone is a new 3G model, and it shipped with build 5A345; however, the current version is build 5A347. Attempting the check for new SW via iTunes results in a "software is up to date" message (which is incorrect). In order to force a SW update to the latest rev, select "Restore", which accomplishes two items:

1) it force installs the latest SW rev (5A347 in this case)
2) it downloads the iPhone Disk image!

A local iPhone disk image is required to "restore" the iPhone into a development platform, and item 2 (above) resolves this issue.

Cromulent
Jul 13, 2008, 04:46 PM
OK - I just figured this out, so I'll post my own reply to help out anyone else with this issue.

My iPhone is a new 3G model, and it shipped with build 5A345; however, the current version is build 5A347. Attempting the check for new SW via iTunes results in a "software is up to date" message (which is incorrect). In order to force a SW update to the latest rev, select "Restore", which accomplishes two items:

1) it force installs the latest SW rev (5A347 in this case)
2) it downloads the iPhone Disk image!

A local iPhone disk image is required to "restore" the iPhone into a development platform, and item 2 (above) resolves this issue.

Ah, sorry thought you meant the SDK. My mistake.

nealgoldstein
Jul 17, 2008, 08:53 PM
Thanks for figuring this out. I just ran across the same thing and was about (with great trepidation) to try what you did.

Thanks for your courage

Cheers
Neal

bkphat
Jul 17, 2008, 09:05 PM
If you restore on iTunes when you do this, does everythign get erased from your phone? Also, if you restore into development mode, can you still dl and use other apps from the iTunes store?

thanks

richard.puckett
Jul 17, 2008, 10:10 PM
You can instruct iTunes to back up your device before "restoring". After you're up to date you can continue using your phone as a regular device.

Forever Knight
Aug 18, 2008, 05:17 AM
A local iPhone disk image is required to "restore" the iPhone into a development platform, and item 2 (above) resolves this issue.

Hi shadowband,

I did follow the steps you described to get the current version of my iPhone (2.0.1. Build 5B108) using iTunes’ backup/restore option. Unzipped the ipsw file and extracted the 3 *.dmg files (018-3881-4.dmg 24K, 018-3884-4.dmg 200K, 018-3885-4.dmg 18K) Not sure which one to choose, hence randomly chose 018-3885-4.dmg, renamed it as DeveloperDiskimage.dmg and copied it to the appropriate folder. XCode started fine, except threw me an error 0xE8000001 while attempting to upload the application I wrote to the phone!

Could you explain how you made it to work in your environment?

Cromulent
Aug 18, 2008, 05:24 AM
As far as I am aware this is old news.

Forever Knight
Aug 18, 2008, 05:53 AM
As far as I am aware this is old news.

mmm… in that case I may have to wait till I get the approval from Apple; enrolled 2 weeks ago for that $99 package, no reply so far…

Cromulent
Aug 18, 2008, 08:35 AM
mmm… in that case I may have to wait till I get the approval from Apple; enrolled 2 weeks ago for that $99 package, no reply so far…

Well you need to be fully paid up to deploy programs on the iPhone hardware anyway. Nothing has changed there. All that has changed is you no longer need to download a disk image from the Apple website in order to activate development mode on your iPhone. Just copy across the provisioning profile in Xcode as described in the documentation.

Forever Knight
Aug 19, 2008, 02:53 AM
Just copy across the provisioning profile in Xcode as described in the documentation.

Thanks for the clarification. BTW, Where is that "provisioning profile" installed in the Xcode path? Why can't I use it right now if nothing needs to be downloaded?

Cromulent
Aug 19, 2008, 04:20 AM
Thanks for the clarification. BTW, Where is that "provisioning profile" installed in the Xcode path? Why can't I use it right now if nothing needs to be downloaded?

You should be able too. Have you followed the instructions provided to the letter? It is very easy to make a mistake and it can bugger you up. I recommend going over the instructions again and making sure you did everything correctly.

Forever Knight
Aug 20, 2008, 04:08 AM
Have you followed the instructions provided to the letter?

I went through the instructions several times, All steps succeeded very nicely except this one step where it says "1. Download the OS X iPhone Disk Image (.dmg) from the iPhone Dev Center for the Apple device you are using." under the heading "Installing OS X iPhone". And thats why I have to resort to extracting the .dmg file from the ipsw file manually!

Cromulent
Aug 20, 2008, 01:53 PM
I went through the instructions several times, All steps succeeded very nicely except this one step where it says "1. Download the OS X iPhone Disk Image (.dmg) from the iPhone Dev Center for the Apple device you are using." under the heading "Installing OS X iPhone". And thats why I have to resort to extracting the .dmg file from the ipsw file manually!

Skip that step. It relates to when the iPhone OS was in beta and is no longer necessary. At least that is what I was told when I asked the same question here :).

OUfan316
Aug 20, 2008, 05:50 PM
im still confused. i cant find the OS X iPhone Disk Image (.dmg). Where do I download it?

Forever Knight
Aug 20, 2008, 06:30 PM
Skip that step.

Skipped that step, backed up and restored the phone (and hijacked the *.ipsw file that iTunes backed up in that process), renamed the ipsw to zip and extracted the *.dmg file from it, renamed it to DeveloperDiskImage.dmg, created a folder called DiskImages under the Platforms/iPhoneOS…. and copied it there. Now the Xcode is quiet without popping that annoying dialog ‘diskimage folder not found’, ‘diskimage is not found’ etc., whenever the phone is connected.

But when I build, as expected (since I am using a G4 environment) one of the build-phase where the code signing is taking place fails! I understand that is because the build script assumes an intel environment instead. I found a way around to fix this but to do that I need that ‘codesign’ file in project/usr/bin folder. Not sure how to generate this file, I thought by assigning the correct provisioning profile in the project’s build settings it should automatically be generated from the certificates that already assigned in keychain! Apparently it is not! Any clues?

dejo
Aug 20, 2008, 06:38 PM
im still confused. i cant find the OS X iPhone Disk Image (.dmg). Where do I download it?
It's downloaded and installed when you update your iPhone / iPod Touch in iTunes. As stated before, you can skip this step; it is a leftover from the pre-2.0-release days.

Cromulent
Aug 20, 2008, 07:19 PM
Skipped that step, backed up and restored the phone (and hijacked the *.ipsw file that iTunes backed up in that process), renamed the ipsw to zip and extracted the *.dmg file from it, renamed it to DeveloperDiskImage.dmg, created a folder called DiskImages under the Platforms/iPhoneOS…. and copied it there. Now the Xcode is quiet without popping that annoying dialog ‘diskimage folder not found’, ‘diskimage is not found’ etc., whenever the phone is connected.

Forget the whole ipsw file and the diskimage. It is all sorted now. As long as you have the latest iPhone OS installed from iTunes (2.0.2) it will be fine.

Forever Knight
Aug 20, 2008, 08:19 PM
As long as you have the latest iPhone OS installed from iTunes (2.0.2) it will be fine.

Given below is the repost of yet another unhappy iPhone developer who refuses to go for that expensive Intel OS X machines just to push the apps to the device! It looks like he did succeed in his attempt but unfortunately I am stuck in the very beginning: as where did he get this codesign file in his /usr/bin folder (and I am not even sure which ‘usr/bin’ folder he is referring to as there are many such allover the place!). If you could shed some light on it (being a happy Mac developer :)) it will be a great help. Thanks.

<repost>
The following was posted on Apple Discussions: Re: iPhone SDK CodeSign Error
On Wed Jul 30 01:39:44 CDT 2008, Tiku wrote:
Subject: Re: iPhone SDK CodeSign Error

The trick seems to be to convert the thin binary into universal binary and then signing it and then returning it back to thin again (although the phone will actually run universal binaries, but thin is a bit smaller). Converting binaries to universal and back with lipo will not break the code signing!

If you feel adventurous, this is how I managed to get it working:
mv /usr/bin/codesign /usr/bin/codesign.orig
Then with you favorite editor create a new /usr/bin/codesign with following contents:
#!/usr/bin/perl
#
$appDir=$ARGV[$#ARGV];
@tmpAry=split(/\//,$appDir);
$baseAppName=$tmpAry[$#tmpAry];
$baseAppName=~s/\.app$//;
$realAppName="$appDir"."/$baseAppName";

$sign=0;
for($b=0;$b<$#ARGV;$b++) {
if($ARGV[$b] eq "-s") {
$sign=1;
}
}

$mums=`file $realAppName`;
if($sign==1 && $mums=~/executable arm/) {
#print "Signing armv6..\n";
$dev="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/";
$tmp="$appDir"."/tmpbin";
`$dev/lipo -create $realAppName -output $tmp`;
`mv $tmp $realAppName`;
system("/usr/bin/codesign.orig",@ARGV);
`$dev/lipo -thin armv6 $realAppName -output $tmp`;
`mv $tmp $realAppName`;
system("rm $appDir"."/CodeResources");
system("cp $appDir"."/_CodeSignature/CodeResources $appDir"."/CodeResources");
exit 0;
} else {
exec '/usr/bin/codesign.orig',@ARGV;
}

Someone with actual perl/sh skills might want to rewrite whole thing :P (and can't figure out how to get identation working, so try to fix them yourself)

Only mysterious part is the CodeResources symbolic link, it will not upload itself into the device (instant error 0xe8000001, that kept me awake for some time), that's why I've removed it and copied the CodeResources from _CodeSignature.
</repost>

Cromulent
Aug 20, 2008, 08:27 PM
Given below is the repost of yet another unhappy iPhone developer who refuses to go for that expensive Intel Mac machines just to push the apps to the device! It looks like he did succeed in his attempt but unfortunately I am stuck in the very beginning: as where did he get this codesign file in his /usr/bin folder (and I am not even sure which ‘usr/bin’ folder he is referring to as there are many such allover the place!). If you could shed some light on it (being a happy Mac developer :)) it will be a great help. Thanks.

There is only one /usr/bin :).

Forever Knight
Aug 20, 2008, 08:39 PM
There is only one /usr/bin :).

There is one in /Developer/user/bin
and another one in /Developer/Platforms/iPhoneOS.Platform/usr/bin
and yet another one /Developer/Platforms/iPhoneOS.Platform/Developer/usr/bin
but none of them has that 'codesign' file he is using in the first move command:

mv /usr/bin/codesign /usr/bin/codesign.orig :confused:

Cromulent
Aug 20, 2008, 08:50 PM
/usr/bin is the path - therefore there is only one of them :).

Take note of the post date. That was all done using the beta SDK. Things could have changed since then.

Edit : Oh and codesign does exist there.

Forever Knight
Aug 20, 2008, 10:08 PM
/usr/bin is the path

So, the path is from the root! I dont have that in my HD!
I was trying to upload the snapshot of finder window to a photo-site and provide you with a link but its not working!! but anyway, I only see the following folders in the root:

Applications
Developer
Documentation
Examples
Library
System
Users

thats all... and I am running OS X 10.5.4


codesign does exist there. Is that a generic file installed during Xcode installation? if so, would you mind emailing me? BTW, my Xcode version 3.1, came along with iPhone SDK package. Should I have to install Xcode separately again?


Update: Sorry for the trouble, its my ignorance in UNIX file system - used the Terminal app and found that folder and that file. Thanks, will post the out come of the abovementioned adventure

Cromulent
Aug 20, 2008, 10:14 PM
So, the path is from the root! I dont have that in my HD!

Well, you obviously need to use the Terminal for this kind of stuff. The Finder hides a huge number of system folders from you. Plus you always have a root folder by definition, it is the root of all other folders. No root folder = unformatted and unpartitioned hard drive.

Forever Knight
Aug 21, 2008, 12:01 AM
Well, you obviously need to use the Terminal for this kind of stuff.

Yes indeed, and at last managed to compile withe the codesigning through that script! Of course, have to learn a lot of shell commands, including sudo, chmod and what not! Well it paid off in the end. Thanks.

As usual, every time I attempt to run the application (upload & run) that same old dialog keeps coming "Developer/Platforms/iPhoneOS.Platform/DiskImages missing!". So I manually created that folder and pupulated it with the my phone's dmg. Now Xcode trys to upload...

Well, with a message "Waiting for the device to be ready in 5 seconds..." but after 5 minutes it comes with an error 01 lol. at least 99% worked!

Thanks

Cromulent
Aug 21, 2008, 12:42 AM
As usual, every time I attempt to run the application (upload & run) that same old dialog keeps coming "Developer/Platforms/iPhoneOS.Platform/DiskImages missing!". So I manually created that folder and pupulated it with the my phone's dmg. Now Xcode trys to upload...

They are already there for me and I've never downloaded the iPhone OS from Apples site or done any mucking around with ipfw files. Are you sure you installed the SDK correctly? Maybe it is just because you are running it on a PPC machine and it screwed it up.

Forever Knight
Aug 21, 2008, 06:22 AM
Well, you obviously need to use the Terminal for this kind of stuff.

Yes I did, and thanks for all the help at last it WORKED!!

Ok here is the key stuff:
(1) that DeveloperDiskImage.dmg file is a must indeed, since I installed the code in a G4 machine, the Xcode installer simply ignored that stuff!! I installed it manually.
(2) Those two lines "system("rm $appDir"."/CodeResources");
system("cp $appDir"."/_CodeSignature/CodeResources $appDir"."/CodeResources");" in the abovementioned script I re-posted is a must, although the author himself is not sure why he needs them!!
(3) Apple has to release a revised documentation else there will be lots of unhappy programmers 'bricking' their iPhones :)

Thanks again.

p.s. keep the OS X 10.5.x cd handy for a reinstall, for many shell commands are run with 501 grant using sudo!! lol

James Nachbar
Aug 26, 2008, 02:21 AM
I went through these steps, skipping the "download" step, first backing up my iPhone 3G to iTunes, then "restoring" to the most current version (which erased all the data on my 3G), then using iTunes to "restore" the data that had been on the 3G before the OS "Restore" (using the Backup I had just made).

No need to download any OS X, no problem following the rest of the steps to load my app onto my 3G, no problem getting my new app to run on the iPhone.

Having done that, I am not sure that this step was even necessary, as long as you have the most current version of the iPhone OS (2.0.2 at present, I believe) on your 3G.

Next time, I would try skipping this step altogether, just using iTunes to make sure my iPhone has the most current version of the OS.

The one thing I do know for certain is that Apple should update their documentation! There is simply no excuse for them to have instructions on their website to download a file from their website that does not exist on their website!


James Nachbar
http://www.plastic.org

Cromulent
Aug 26, 2008, 03:35 AM
Next time, I would try skipping this step altogether, just using iTunes to make sure my iPhone has the most current version of the OS.

Correcto :). You managed to say what I was trying to say all along in a much better way.

trapper
Sep 2, 2008, 03:43 PM
Yes I did, and thanks for all the help at last it WORKED!!

Ok here is the key stuff:
(1) that DeveloperDiskImage.dmg file is a must indeed, since I installed the code in a G4 machine, the Xcode installer simply ignored that stuff!! I installed it manually.
(2) Those two lines "system("rm $appDir"."/CodeResources");
system("cp $appDir"."/_CodeSignature/CodeResources $appDir"."/CodeResources");" in the abovementioned script I re-posted is a must, although the author himself is not sure why he needs them!!
(3) Apple has to release a revised documentation else there will be lots of unhappy programmers 'bricking' their iPhones :)

Thanks again.

p.s. keep the OS X 10.5.x cd handy for a reinstall, for many shell commands are run with 501 grant using sudo!! lol
So you got it all working on PPC then? I'm fairly familiar with terminal and the various unix commands but aren't having much luck getting any of my code successfully signed. Also got the problem with the missing diskimages when plugging my phone in - have tried renaming and copying over each of dmg files from one of the ipsw's but this just changes the error to the one others were having above.

I can however compile my code unsigned and ssh it over to my phone and sign there with ldid, this is cool to try my apps out but no good for debugging - and apple obviously wont accept them into the store ;)

Any ideas where I should go from here?

Forever Knight
Sep 3, 2008, 05:42 AM
The DeveloeprDiskimage is a set of two files, it is packed under the name DeveloperDiskImage.pkg! Mount the iPhoneSDK on your desktop, examine the list of packages it has, it is there. Just install that package on the correct path and you are done!

I can however compile my code unsigned and ssh it over to my phone and sign there with ldid, this is cool to try my apps out

BTW, I am curious to try what you did; could you brief the steps clearly? Thanks.

trapper
Sep 3, 2008, 09:35 AM
Ahh so obvious!! 'DeveloperDiskImage.pkg' lol - I must have missed it when I originally installed due to the name not containing 'iphone' (like the rest of the packages skipped out when PPC is detected) So if it all works out when i try it tonight, then it will be only the codesign binary holding me back! :D

To copy over manually and test you need to do the following.

Jailbreak phone and install openssh + ldid using cydia. Then open terminal and…
scp -r ./MyApp.app root@192.168.1.2:/Applications (copy app to phone)
ssh root@192.168.1.2 (connect to phone)
chmod +x /Applications/MyApp.app/MyApp (make app executable)
ldid -S /Applications/MyApp.app/MyApp (create fake codesign for app)
killall SpringBoard (restarts springboard)

ps; root password is alpine

Visualizer
Sep 4, 2008, 08:44 AM
Hi shadowband,

..... XCode started fine, except threw me an error 0xE8000001 while attempting to upload the application I wrote to the phone!

Could you explain how you made it to work in your environment?

I got the same problem here. I have done all what was explained in the docs to get the certificate, and the provisioning profile and so on. (Expect restoring my new iPhone which has OS 2.02) And I registerred all needed in the "Code Singning" Part within Xcode Project Settings.. However by testing the "Hello World" Example on my iPhone by "Build&Go" it prompts the same Error "0xE8000001". This, and all other applications do not work on that iPhone!

And the fact is: I sendet several mails to ADC but never get any answer at all! WHAT A SUPPORT FOR PAYING DEVELOPERS....
:confused:

Forever Knight
Sep 5, 2008, 01:15 AM
I WHAT A SUPPORT FOR PAYING DEVELOPERS....
:confused:

Tell me about it! useless support, they don't even reply to their own news group!!

I am sure it has something to do with the credentials because I exported my private key from the keychain (from the ‘all’ working mac) and imported it to another mac just as Apple suggested in their iPhone Dev manual, but get the error “0xE8000001” that you quoted!! exactly identical environment just the key was imported that’s all, but iPhone application install doesn’t work!!! Last resort, gonna reinstall OS X 10.5.x LOL.

Jailbreak phone and install...
Thanks trapper for Jailbreaking advice, LOL, I am not gonna do it!! I though you did it ‘without’ jailbreaking!