Any other Windows Devlopers have an iPhone?

biggeek

New Member
Aug 25, 2007
10
0
0
I'm kind of curious if I'm alone in this. My day job is writing code for PCs. The more native code I run on my iPhone, however, the more I wish I had a Mac to compile with... zOMG!11 What did I just say? Surely I cant be the only person feeling this clearly unnatural urge... Am I?
 

geordisjd

Zealot
Bronze
Jul 1, 2007
2,442
12
38
I'm kind of curious if I'm alone in this. My day job is writing code for PCs. The more native code I run on my iPhone, however, the more I wish I had a Mac to compile with... zOMG!11 What did I just say? Surely I cant be the only person feeling this clearly unnatural urge... Am I?
It isn't too late to change jobs. I heard Apple pays well.
 

biggeek

New Member
Aug 25, 2007
10
0
0
Supply and demand I suppose. All the other windows guys must be using phones running WindowsCE. *shrug* I still like the phone even if it comes from the other camp.
 

Norwest

New Member
Bronze
Jul 23, 2007
133
0
0
What are you coding / comipiling with on Windows? I do some basic stuff but not C.

I used to write personal progs for my Axim but haven't in a while.
 

scrowner

New Member
Bronze
Jul 4, 2007
120
0
0
LOL! I went out and bought a MAC Book just to start programming for the iPhone. I am hoping to have my first app by the end of labor day! I struggled for 2 weeks trying to get the toolchain working on a windows machine. I will have in working in a moment. It cost me 1K$ and now I am learning "french" using this Mac book that does not have a right click!
 

biggeek

New Member
Aug 25, 2007
10
0
0
Man, that's pretty bad - dropping a grand to write some code. I think my wife would give me the stink eye if I brought a Mac in the house. Ive also visted France. Do they still lack control keys too? Or was it Alt? Simple things the home button and shift + arrow keys. If I ever do this, Ill be writing the code on the PC and bringing it over on a flash drive to compile.
 

geordisjd

Zealot
Bronze
Jul 1, 2007
2,442
12
38
LOL! I went out and bought a MAC Book just to start programming for the iPhone. I am hoping to have my first app by the end of labor day! I struggled for 2 weeks trying to get the toolchain working on a windows machine. I will have in working in a moment. It cost me 1K$ and now I am learning "french" using this Mac book that does not have a right click!
What's a right click?
 

geordisjd

Zealot
Bronze
Jul 1, 2007
2,442
12
38
Leave 2 fingers on the track pad and click.

congrats on the MAC you can also install windows on it as well, try boot camp or parallels
That works only with newER trackpads. My MacBook Pro does that, but my older G3 and G4 ibooks don't.
 

geordisjd

Zealot
Bronze
Jul 1, 2007
2,442
12
38
Man, that's pretty bad - dropping a grand to write some code. I think my wife would give me the stink eye if I brought a Mac in the house. Ive also visted France. Do they still lack control keys too? Or was it Alt? Simple things the home button and shift + arrow keys. If I ever do this, Ill be writing the code on the PC and bringing it over on a flash drive to compile.
Alt? Sounds German... Home? Do you mean the Apple button? Shift+arrows(the 4 of them) do nothing on my keyboard.
 

biggeek

New Member
Aug 25, 2007
10
0
0
When I code, I edit a lot with the keyboard. Hold shift on a PC and use the arrows to select text. Crt + shift + left/right will select words at a time. Its the little things that keep me out of France.
 

Beau

New Member
Jul 31, 2007
26
0
0
I'm a Windows developer... ironically spent a few years as the lead on a PocketPC app.

Had a Mac Duo in the mid 90s through college as my university was Mac centric. Liked them but couldn't see the point in having one once I got out into the real world, needed my laptop for development purposes as well... think I'll be getting a MacBook Pro after Leopard comes out now that bootcamp seems viable.

That said, I only code for my job, not as a side hobby, so no iPhone software from this end :) I think it's way cool you guys are that motivated to code for this thing.
 

biggeek

New Member
Aug 25, 2007
10
0
0
Before this thread peters off, can someone point me to a resource that describes how to get the tool chain to compile on the PC? It sounds like pain, but I'd like to try.
 

scrowner

New Member
Bronze
Jul 4, 2007
120
0
0
This will push you in the right direction as opening the dmgs on windows is the big deal...

http://iPhone.fiveforty.net/wiki/index.php/Decrypt_Firmware

They now have links to windows stuff for this purpose.

Got the Mac, loaded up Xcode, loaded up the toolchain, got helloworld simple application, comiple/linked, placed on the iPhone, and it works! About 24 hours after getting the app. Now, I am off working on triangulation of the cell tower information to place a pin on google maps.

Yep, I blew a 1K on the Mac just to start programming apps for the iPhone. The Mac world is very different, but very interesting. I do not regret my $1K expense and my wife was with me when I got it. LOL.
 

biggeek

New Member
Aug 25, 2007
10
0
0
I had a second to play with this. If I'm fluddling through this info correctly, you need to extract the encrypted disk image known as 694-5262-39.dmg someplace on your drive in order to use the libraries? in the image.

The above link is pretty handy in terms of figuring out what needs to be done to do this. Mainly, it deals with decrypting the disk image via a program called vfdecrypt. This is all dandy until you compare the source on the Mac vs the source for the .exe:

if ((in = fopen(argv[1], "rb")) == NULL) {
fprintf(stderr, "Error: unable to open %s\n", inFile);
exit(1);
}

if ((out = fopen(argv[2], "wb")) == NULL) {
fprintf(stderr, "Error: unable to open %s\n", outFile);
exit(1);
}
The PC .exe version isn't even using the correct usage! This explains why I get "Error: unable to open" everytime I try to run:

vfdecrypt -i 694-5262-39.dmg -o decrypted.dmg -k 28c909fc6d322fa18940f03279d70880e59a4507998347c70d5b8ca7ef090ecccc15e82d
According to the source, the usage for the exe is:

vfdecrypt 694-5262-39.dmg decrypted.dmg
One kind of huge problem, however, HOW DO WE PUT IN THE KEY? Looking at the source, it takes exactly two parameters (no key). We know the key is in 38.dmg and I don't see it hardcoded into the .exe. Hence, the output of the vfdecrypt.exe is total crap. I tried to fix it, but the project is dependent on openssl and won't compile. (I'm not jumping down that rabbit hole, sorry)

To put an end cap on this thread:

If you want to develop for the iPhone, Windows users aren't welcome - go buy a Mac!
 

scrowner

New Member
Bronze
Jul 4, 2007
120
0
0
Yep, had the same issue with decypting the dmg. Hoping someone like yourself would take that extra step....Oh well...I just went and purchased a Mac book. I have been up and compiling apps for about a couple days now. Awesome fun! Very little information for the various API calls. So looking at various open source to put together an app of my own.
 

biggeek

New Member
Aug 25, 2007
10
0
0
Funny thing just hit me on the dmg. 39.dmg is the system partition - the one I can scp to and from. LOL
 

scrowner

New Member
Bronze
Jul 4, 2007
120
0
0
Funny thing just hit me on the dmg. 39.dmg is the system partition - the one I can scp to and from. LOL
Ah...did not think this was the same. You may be on to something. Even though I purchased the Mac, I may look at trying that...hehe.
 

bstills

New Member
Sep 23, 2007
1
0
0
how to get heavenly image

Yep, had the same issue with decypting the dmg. Hoping someone like yourself would take that extra step....Oh well...I just went and purchased a Mac book. I have been up and compiling apps for about a couple days now. Awesome fun! Very little information for the various API calls. So looking at various open source to put together an app of my own.
I ran into similar issues. I did some digging through the source code and found the solution.

You have to modify the source code directly. Read through this PDF:
http://www.google.com/url?sa=t&ct=res&cd=1&url=http://www.lucasnewman.com/phonedev.pdf&ei=Q_31RvL2PJ2QgAOh-6n_Aw&usg=AFQjCNHLAz8yu846WztWg8ANPMbzQWSY4A&sig2=XxQbcpblk30D0PpCh-0ppw

Use the following to get the key:
strings 009-769894.dmg | grep '^[0-9a-fA-f]*$' | awk '{ if (length($1) == 72) print ; }'

Basically what that is doing is extracting all strings that are 72 characters and that are hexadecimal strings.

In the source code for vfdecrypt.c you will find 2 places to place 2 different keys. One is 16 bytes, and the other is 20 bytes. Not that there are 2 ascii characters in hexadecimal represent 1 byte. So we have 36 bytes total. Hmmm, what a coincidence. So the first 32 characters belong to the first key and the remaining 40 belong to the second.

In the vfdecrypt.c code you will see 2 lines. Both start with convert_hex("-----

Replace the ------ characters with the corresponding keys.

Compile vfdecrpyt:
gcc -O2 vfdecrpyt.c -o vfdecrpyt -lcrypto

I got some warnings but they didn't seem to matter.

From there you can use ./vfdecrpyt 694-5298-5.dmg heavenly.dmg

That should do the trick.