Question or issue on macOS:
I have read that the iPhone SDK (part of Xcode 3) is restricted to Mac’s with the intel chipset. Does this restriction apply to only the simulator part of the SDK or the complete shebang?
I have a Powerbook G4 running Leopard and would very much like to do dev on it rather than fork out for a new machine.
It is also worth clarifying that I am interested in development for personal reasons and therefore accept that I would need a certified platform to create a submission for the App Store.
How to solve this problem?
Solution no. 1:
As things have moved on since the original post on 3by9.com, here are the steps that I had to follow to get the environment working on my PowerBook G4.
BTW, I would like to say that I realise that this is not a supported environment and I share this for purely pedagogic reasons.
- Download and install the iPhoneSDK (final version)
- After the install finishes, navigate to the packages directory in the mounted DMG
- Install all of the pkg’s that start with iPhone
- Copy the contents of
/Platforms
to/Developer/Platforms
(should be two folders starting with iPhone) - Locate ‘
iPhone Simulator Architectures.xcspec
‘ in/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications
and open in a text editor. - Change line 12 to:
Name = "Standard (iPhone Simulator: i386 ppc)";
- Change line 16 to:
RealArchitectures = ( i386, ppc );
- Add the following to line 40 onwards:
// PowerPC { Type = Architecture; Identifier = ppc; Name = "PowerPC"; Description = "32-bit PowerPC"; PerArchBuildSettingName = "PowerPC"; ByteOrder = big; ListInEnum = NO; SortNumber = 106; },
- Save the file and start Xcode
- You should see under the New Project Folder the ability to create iPhone applications.
- To get an app to work in the simulator (and using the WhichWayIsUp example) open Edit Project Settings under the Project menu
- On the Build tab change the Architectures to: Standard (iPhone Simulator:i386 ppc)
- Change Base SDK to Simulator – iPhone OS 2.0
- Build and go should now see the app build and run in the simulator
Solution no. 2:
The iPhone SDK is documented to require an Intel-based Mac. Even if some people may be able to have gotten it to run on some other hardware doesn’t mean that it will run correctly, that Apple will fix bugs you report, or that it is a supported environment.
Solution no. 3:
If you actually want to run your binary on the device, not just the simulator, you need the advice from the following page:
http://discussions.apple.com/thread.jspa?messageID=7958611
It involves a Perl script that does a bit of ‘magic’ to get the code signing to work on PowerPC. Also you need to install Developer Disk Image from the SDK packages. When all is said and done you can use a G4 to develop on the real device and even the debugger works. But I think Instruments doesn’t work.
Solution no. 4:
I have a Powerbook G4 running Leopard and would very much like to do dev on it
Not sure what sort of application you are developing, but if you jailbreak your iPhone, you can:
- develop applications using Ruby/Python/Java which won’t require compiling at all
- compile on the phone(!), as there is an GCC/Toolchain install in Cydia – although I’ve no idea how long that’ll take, or if you can simply take a regular iPhone SDK project and SSH it to the phone, and run
xcodebuild
)
You should be able to compile iPhone applications from a PPC machine, as you can compile PPC applications from an Intel Mac, and vice-versa, there shouldn’t be any reason you can’t compile an ARM binary from PPC.. Wether or not Apple include the necessary stuff with Xcode to allow this is a different matter.. The steps that Ingmar posted seem to imply you can..?