xboxscene.org forums

Author Topic: Iphone Sdk Final  (Read 751 times)

openxdkman

  • Archived User
  • Hero Member
  • *
  • Posts: 550
Iphone Sdk Final
« on: July 13, 2008, 12:23:00 PM »

If you put aside the worldwide publishing process thru Apple approval, the 'regular' way to run homebrew on Iphone appears more friendly than the xn/a solution. It costs the same price but only once (I think).
Once you paid $99 (1x/year), you can go through a few procedures and you are able to compile and run on your Iphone, turned into 'Development State'. So for homebrew maker sharing their sources, everyone will be able to compile and run it on one's Iphone turned into this special state. (Dunno if phone abilities are preserved yet, but I will know it soon). Also for the ones who don't want to pay at all, they will be able to run it through the software emulator on their macbook. If you don't know yet, the Sdk requires an intel based mac (a macbook is enough for the task -I know it's expensive, but well...-). To have people use it on normal Iphone for free, you have to go through Apple approval procedure, that's another story that I don't need to talk about since it completely depends on the homebrew code you submit to Apple.

It seems there is a trap though. So I wanted to warn everyone.
It's clearly written in the documentation (available once you pay and enroll), that you MUSTN'T upgrade your iphone to 2.0 OS and turn it into 'Development State' BEFORE you go through the procedure that declare it as a registered authorized test Iphone. If you upgrade to 2.0 OS Before and turn it into 'Development State' it will become disabled. Also there is an activation done through the network carrier (so I think the phone ability is preserved and used in the procedure that turns it into 'Development State', but I will try to confirm when I can).

So if you plan to develop, don't upgrade to 2.0 yet. Pay the fee. And read carefully all the documentation.

I will try to give more hints as I progress myself thru the procedure.

For me, knowing what the Iphone is able to do with 3D rendering is important.
The future 3D library I will write for PC0 machines (but also consoles) will probably be divided into layers.
For now I need to know what will be the common lowest layer (minimum power for basic homebrew games).
This layer will probably be a set of common abilities given by the Iphone, the NDS and the PSP.
Logged

openxdkman

  • Archived User
  • Hero Member
  • *
  • Posts: 550
Iphone Sdk Final
« Reply #1 on: July 14, 2008, 08:28:00 AM »

Success!

The 'regular way' for Homebrew on Iphone really works well!
Steve, you delivered what you promised! Good boy! Thanks a lot.

So, after paying $99, (1x per year), I could turn my activated 1.1.2 regular Iphone into an updated activated 2.0 regular Iphone, but marked as Development Iphone.
You can restore normal 2.0 anytime and turn it back to normal Iphone.
But frankly, there is no difference beside the ability to run your own code (finally!). It still works as a phone, or low speed internet browser (thru EDGE network). Everything's ok!

I will now give the list of actions involved in the procedure (given on apple site, but there are a few big mistakes/vague infos there that took me to insane confused situations at very critical moments...).

- buy a macbook (around $1000 I guess...), upgrade it to last OS & iTunes
- become registered apple developper (free : http://developer.apple.com/)
- download and install iphone sdk (free, main application is named XCode)
- subscribe to standard developper program ($99 1x per year)
- you will receive a 1st completely insane confusing email
(no need to look for the download link you are asked to click, doesn't exist)
- you receive a 2nd email later (24h), an activation email. click the link
- A new link 'Program Portal' will appear in the iphone dev center
- Create your private key with the application named 'KeyChain access'
(existing on all macbooks but becareful, its name is localized)
- Create the 'Certificate' (used to sign your code, allowing apple to identify)
(not instant, follow instructions, approve it, 'pending issuance' will vanish)
- Create the 'APP ID' (a numeric unique value for your application(s), use '*')
- Register the UDID (I only tried with 2.0. Xcode shows a long numeric ID)
(EDIT:iTunes can show it, but it's hidden. Click on 'Serial number')
(here I updated from 1.1.2 to 2.0 using iTunes, to see it, but I couldn't)
- If you were with fw<2.0, just upgrade to 2.0 but through XCode only.
- If you were already with 2.0, restore again to 2.0 but through XCode only.
(while restoring the iPhone, XCode will add the registered UDID somewhere)
(it's written that it needs to be a regular activated iPhone with network ok)
- Create a 'Provisioning File' (just a file that references APP ID, UDID, etc...)


All is ready for homebrew compilation :

Inside any sample projects made for the final Sdk, hit Infos button and
select both the signing certificate and the provisioning file. Now you can select your iPhone instead of just the simulator and the application runs on your iPhone!

An icon is automatically created on the iPhone (I tried GLSprite sample and an icon GLSprite appeared showing the tiny blue sapphire).

If launched from XCode, the application can even be debugged in real time, through the USB link, while running on the iPhone!
If you unplug the iPhone you can run the application through it's new icon! Homebrew ready!

The certificate has an expiration time of 6 month it seems. Normally you should be able to request another one without paying again.
You can turn up to 100 iPhones into development iPhones with same account.

There is a similar procedure for submitting code for world wide distribution through applestore. But your code is to be very clean, gentle and well documented! (not exactly nowadays homebrew...)
The interest of the approval by apple is of course that people can get if for free without paying for standard developper program and without the need to own a macbook. But there will be of course unapproved interesting stuff.

So it's really friendly for owners of iPod, iPhone and iPhone 3G.
They locked iPhone to avoid large distribution of unapproved code world wide, but you are really free to write and run your own nasty unapproved code for your own needs (and you can publish their source to share it with other standard program subscribers)!

That really smells good homebrew to me!

No ETA on the completion of my study of Open GL ES.
Once done, it will give me clues about the appropriate lowest 3D library layer structure I should use to have iPhone homebrew compatible with other platforms homebrew.

EDIT :
Actually iTunes can show the long identifier (40 hex chars.). But it's hidden.
You have to click Serial number and it switch to Identifier... Hard to guess...
Logged