Filed under: Developer, iPhone
iPhone SDK beta 2 now hitting the streets
After a brief false alarm earlier today, it looks like beta 2 of Xcode 3.1 (including the iPhone-ready version of Interface Builder) is actually released. A word of warning: Apple's servers are getting hammered right now, and it may pay to wait a while before downloading the 2.1 GB package.While you wait, you can peruse the release notes for Xcode and for Interface Builder. Never hurts to read the documentation. Have a good weekend, all you iPhone coders!
P.S. One of our loyal tipsters, PJ, noted that he sent us an email about 36 hours ago with his surmise (based on a link he saw, behind the Apple developer site login wall, to a Beta 1 -> Beta 2 diffs manifest) that the revised iPhone SDK might be imminent. PJ, for the record, you guessed right.
Thanks Nik + PJ


![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 2 of 2)
Spiced Ham said 12:20AM on 3-28-2008
Add ppc to RealArchitectures in:
/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/iPhone Simulator Architectures.xcspec
Note: is not /Developer, then you need to make a link from /Developer/Platforms to /Platforms, as the WebKit framework used by the iPhone simulator expects to find CoreGraphics under /Developer/Platforms. If you don't do this, the simulator will fail to run.
Spiced Ham said 12:24AM on 3-28-2008
Doh! In my previous comment, all paths not prefixed with /Developer should have been prefixed with "(Xcode Root)". I made the mistake of using angle brackets instead of parentheses and the text was stripped since it looked like an HTML tag...
Spiced Ham said 1:23AM on 3-28-2008
Actually, it appears that the correct way to do it is change line 12 to read:
Name = "Standard (iPhone Simulator: i386 ppc)";
and line 16 to read:
RealArchitectures = ( i386, ppc );
Then add the following before the last line:
// PowerPC
{ Type = Architecture;
Identifier = ppc;
Name = "PowerPC";
Description = "32-bit PowerPC";
PerArchBuildSettingName = "PowerPC";
ByteOrder = big;
ListInEnum = NO;
SortNumber = 106;
},
kornhornio said 6:27PM on 3-27-2008
The new simulator accepts keyboard input. I'm pretty sure I remember having to point-and-click the virtual keyboard in the first beta.
Reply
tuaw reader said 7:03PM on 3-27-2008
I was able to utilize the keyboard for input into the soft keyboard in the simulator in the first beta.
looking forward to downloading this tonight and trying out my builds.
Rory said 7:19PM on 3-27-2008
Be warned the new SDK seems to break the Build & Go function in Xcode!
Reply
cedsoft said 4:33AM on 3-28-2008
You should download the Apple examples again, most of them have been updated to work with the new sdk.
There are also some bug correction regarding them.
Except that, xcode + iphone simulator (not aspen anymore) work fine.
Daniel Beckham said 9:19PM on 3-27-2008
I've downloaded the sdk twice now. The first time, the DMG file gave me a CRC error while verifying, the second time, I get an odd error about "codec overrun". Anyone else having trouble mounting the disk image?
This is the first time I've ever had a corrupted DMG file, from any one, ever. What gives?
Chris said 12:44AM on 3-28-2008
Does it error out or just crash? The Build and Go function is kinda.....important.
Spiced Ham said 2:45AM on 3-28-2008
Build and Go works fine for me on PowerPC
imode said 12:18AM on 3-28-2008
anyone able to get Interface Builder running? The iPhone template doesn't seem to generate a NIB file.
Reply
Spiced Ham said 1:57AM on 3-28-2008
Yes. I manually created a Cocoa Touch Window NIB, added a table view to the window, and added the NIB to the CocoaTouchDemo project. I set this as the Main Nib File in the Target Properties. I then modified main.m to simply do this:
int main(int argc, char *argv[])
{
return UIApplicationMain(argc, argv, nil, nil);
}
I then instead instantiated the application delegate in the NIB (after reading in its .h file). I changed its instance variables so that they are declared as IBOutlets and then wired everything up in IB. Finally, I removed all of the code from applicationDidFinishLaunching:, except the last two lines, which show the window and reload the table. Everything seemed to work as expected in the simulator. This was all done on a PowerPC machine.
Wayne Pascoe said 2:10PM on 3-28-2008
@SpicedHam
How did you manually create the NIB file?
Is there a doc somewhere explaining the correct way to use IB for iPhone apps ?
Spiced Ham said 1:31PM on 3-29-2008
@Wayne
I meant that I just went into IB and created a new Cocoa Touch NIB (actually XIB: New... > Cocoa Touch > Window). Then I saved it into the project folder, at which point I believe I was automatically asked if I wanted to add it to the target in that project, which I did.
I should not have removed the auto-release pool in main.m as I indicated above; unlike with AppKit, apparently an outer pool is required by UIKit (why??). Just set the app delegate name to nil in the call to UIApplicationMain() if you're instantiating it in the NIB like I did.
Chuck said 8:27AM on 3-28-2008
Well I've been playing with the new firmware version and while it has fixed quite a few bugs, there are still some annoying (and some new) bugs. I still get two of every contact when I use an exchange server and the contacts crash all the time with the exchange server. Plus if you have a change server set up you can't set the check time for the rest of your email accounts unless you delete the exchange account, set the check time, then re-add the exchange account. Couple of annoying bugs. Though the rest of the firmware seems to run a lot better so it's a step in the right direction.
Reply
thenry said 12:13AM on 4-01-2008
I followed the (below) advice from Spiced Ham, and it does build.
But it still gives the error:
"This application cannot be run in the iPhone Simulator. Please change Active SDK to "Device" and ensure a device is connected."
Any suggestions?
Thanks
-----
Add PPC to: /Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/iPhone Simulator Architectures.xcspec
Name = "Standard (iPhone Simulator: i386 ppc)";
and line 16 to read:
RealArchitectures = ( i386, ppc );
Then add the following before the last line:
// PowerPC
{ Type = Architecture;
Identifier = ppc;
Name = "PowerPC";
Description = "32-bit PowerPC";
PerArchBuildSettingName = "PowerPC";
ByteOrder = big;
ListInEnum = NO;
SortNumber = 106;
},
Reply
thenry said 11:39PM on 4-01-2008
So, actually, this did all work. I was running into the limitation of simulating OpenGL-ES. Non OpenGL applications seem to build and simulate fine on PPC. Thanks for the tips.
baquiano said 3:52PM on 5-30-2008
re: Spiced Ham
You rock! Thanks for the info.
After spending thousands of dollars on Apple hardware and developing software for their different OS's for the past 9 years, it's only fair that this can work on PPC.
Reply