Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Running iphone SDK on non intel macs?

Sunny DaySunny Day Posts: 142Registered Users
edited September 2009 in iOS SDK Development
I'm trying to run the sdk for a non intel mac, its a G4 powermac, its said that the sdk is for intel macs, but people have got it running on non intel macs, part of the problem is I think I'm new to using a mac, Ive been a windows user for years, so I am probably doing something wrong in ignorance. I intend to use the unity engine, G4 is fine for that, that's why I bought one, but right now I need to run the Apple Iphone SDK as well.

The steps I took are. Download the sdk, in downloads on computer I then click on the dmg file, click on the iphone sdk, it installs it, then I go
Local Disk/Developer/Applications/Xcode/ Xcode hammer icon is shown in dock, click it, from top bar menu - New Project.

Then we have a file open saying choose template, but the templates here are for the mac, shouldn't there be an icon for Iphone?

I went back to the dmg and opened packages, then clicked each one with iphone in the title, installed them one at a time, repeated above, I still don't see anything saying iphone, only mac.

Am I doing this correctly, am I launching the right things to open the templates so we can make an iphone app. What am I doing wrong?
Post edited by Sunny Day on

Replies

  • Sunny DaySunny Day Posts: 142Registered Users
    edited March 2009
    I fixed it, you do the following

    1. After downloading the iPhone SDK Beta 2, run the installer and let it install what it will let you.
    2. Open the “Packages” folder from iPhone SDK disk image, and manually install all of the packages with the “iPhone” preface.
    3. After installing all of the iPhone packages, there should be a “Platforms” folder in the root of your hard drive (or where you chose to install them). Move all the contents of this folder to the /Developer/Platforms folder on your hard drive.
    4. Launch Xcode, and you should be presented with the iPhone options as before.
  • shaendrashaendra Posts: 40Registered Users
    edited March 2009
    Sunny Day wrote: »
    I fixed it, you do the following

    1. After downloading the iPhone SDK Beta 2, run the installer and let it install what it will let you.
    2. Open the “Packages” folder from iPhone SDK disk image, and manually install all of the packages with the “iPhone” preface.
    3. After installing all of the iPhone packages, there should be a “Platforms” folder in the root of your hard drive (or where you chose to install them). Move all the contents of this folder to the /Developer/Platforms folder on your hard drive.
    4. Launch Xcode, and you should be presented with the iPhone options as before.

    Yup, that'll get you there. However, I found out the hard way that you can only get so far on a G4. Compiling for the simulator (Build & Go) is easy enough, but if you switch to some kind of deployment executable (either an ad hoc or, presumably, for the app store) trying to do it on a G4 will not seem to work. I futzed with things many different ways, and could not got it to compile on the G4 for deployment.

    If someone knows how, please post how here. I gave up, and went ahead and ordered a refurbished Intel-based mini.
  • trappertrapper Posts: 299Registered Users
    edited March 2009
    Ok guys I ran into this same problem last year when I was starting to develop for the iPhone. The whole lot is universal binaries (and will work fine if you use the tips above) apart from one little thing - codesign is intel only.

    You can work around this with a bit of tinkering as follows...

    rename /usr/bin/codesign to /usr/bin/codesign.orig

    now create a new codesign file and fill with the following perl script
    #!/usr/bin/perl 
    #
    $appDir=$ARGV[$#ARGV];
    $appDir=~s/ /\\ /g;
    @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;
    }
    

    set as executable and you should now be able to run 'on device' quite happily

    btw; one little trick that got me for a while

    See the two lines here
    system("rm $appDir"."/CodeResources");
    system("cp $appDir"."/_CodeSignature/CodeResources 
    
    For some reason the iPhone won't follow the symbolic link to CodeResources so instead we need to copy the location BUT when you actually want to codesign something properly you must comment these two lines out.
    ie you want to submit your app to apple for the app store! :D


    ps; please note, I have never tried this on any SDK other than the initial 'final' release, so it might not work with any of the newer versions. Let me know if it does though, then I can upgrade too :P
    <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=294154344&mt=8"; target="_blank">Black or Red</a> - Possibly the first ever iPhone drinking game! Try it tonight.<br />
    <a href="http://itunes.apple.com/WebObjects/MZStore.woa/
  • shaendrashaendra Posts: 40Registered Users
    edited March 2009
    trapper wrote: »
    Ok guys I ran into this same problem last year when I was starting to develop for the iPhone. The whole lot is universal binaries (and will work fine if you use the tips above) apart from one little thing - codesign is intel only.

    Ah, trapper. I saw some of your posts from last year related to working on a non-Intel, and tried to contact you via PM, but I don't know if it ever went through. Thanks for posting this! I'll give it whirl on the G4 that's at my disposal and see if it does the trick. A bit late since the Intel mini is on the way, but hey at least I'll know better now!

    Thanks so much :)
  • will.raywill.ray Posts: 181Registered Users
    edited March 2009
    shaendra wrote: »
    Ah, trapper. I saw some of your posts from last year related to working on a non-Intel, and tried to contact you via PM, but I don't know if it ever went through. Thanks for posting this! I'll give it whirl on the G4 that's at my disposal and see if it does the trick. A bit late since the Intel mini is on the way, but hey at least I'll know better now!

    Thanks so much :)


    I got the dev environment running on a G4 with the above instructions, and the simulator works, but you can't submit to the app store or test on a real device unless you are on a real intel mac. I could be wrong, but that is my understanding....
  • trappertrapper Posts: 299Registered Users
    edited March 2009
    will.ray wrote: »
    I got the dev environment running on a G4 with the above instructions, and the simulator works, but you can't submit to the app store or test on a real device unless you are on a real intel mac. I could be wrong, but that is my understanding....
    I develop, test on device, and even submit apps to the store all on my G4.

    The codesign script is the key.
    <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=294154344&mt=8"; target="_blank">Black or Red</a> - Possibly the first ever iPhone drinking game! Try it tonight.<br />
    <a href="http://itunes.apple.com/WebObjects/MZStore.woa/
  • thenightthenight Posts: 1New Users
    edited March 2009
    trapper wrote: »
    I develop, test on device, and even submit apps to the store all on my G4.

    The codesign script is the key.


    Do you know how to fix this problem.

    " could not find an appropriate Developer Disk Image to mount"

    and I can't see the OS 3.0 on device Support.
  • pmvinuelaspmvinuelas Posts: 87Registered Users
    edited April 2009
    trapper wrote: »
    I develop, test on device, and even submit apps to the store all on my G4.

    The codesign script is the key.
    trapper wrote: »
    Ok guys I ran into this same problem last year when I was starting to develop for the iPhone. The whole lot is universal binaries (and will work fine if you use the tips above) apart from one little thing - codesign is intel only.

    You can work around this with a bit of tinkering as follows...

    rename /usr/bin/codesign to /usr/bin/codesign.orig

    now create a new codesign file and fill with the following perl script
    #!/usr/bin/perl 
    #
    $appDir=$ARGV[$#ARGV];
    $appDir=~s/ /\\ /g;
    @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;
    }
    

    set as executable and you should now be able to run 'on device' quite happily

    btw; one little trick that got me for a while

    See the two lines here
    system("rm $appDir"."/CodeResources");
    system("cp $appDir"."/_CodeSignature/CodeResources 
    
    For some reason the iPhone won't follow the symbolic link to CodeResources so instead we need to copy the location BUT when you actually want to codesign something properly you must comment these two lines out.
    ie you want to submit your app to apple for the app store! :D


    ps; please note, I have never tried this on any SDK other than the initial 'final' release, so it might not work with any of the newer versions. Let me know if it does though, then I can upgrade too :P

    Trapper: I am new to macs but i have succesfully created and tested my app on the simulator you say to "rename /usr/bin/codesign to /usr/bin/codesign.orig"

    How do i do this. Where do i find it? Can you explain this part to me alittle more so i can actually get my app out there?

    Your a badass for helping me!

    Thanks
  • will.raywill.ray Posts: 181Registered Users
    edited April 2009
    trapper wrote: »
    I develop, test on device, and even submit apps to the store all on my G4.

    The codesign script is the key.

    yeah, I was able to install on my G4 with the script mod but i thought i wasnt going to be able to test on device, so i traded up. if you can get it going on a G4 that is good, I am not as good at mac i guess and there is enough to learn about xcode and objective c without trying to make it even harder... i love me imac anyway! it is sweet!
  • pmvinuelaspmvinuelas Posts: 87Registered Users
    edited April 2009
    trapper wrote: »
    I develop, test on device, and even submit apps to the store all on my G4.

    The codesign script is the key.

    I found the file but i have no idea how to edit the file in terminal. Can anyone explain to me how to edit this file so i can update the file correctly.

    Any help would be greatly appreciated. I have been working on this for two days now and cant get anywhere!?

    Thanks
  • will.raywill.ray Posts: 181Registered Users
    edited April 2009
    pmvinuelas wrote: »
    I found the file but i have no idea how to edit the file in terminal. Can anyone explain to me how to edit this file so i can update the file correctly.

    Any help would be greatly appreciated. I have been working on this for two days now and cant get anywhere!?

    Thanks

    hmmm why don't you edit with textedit? if you have a real reason to edit in terminal, type "vi filename" and you will go into the vi editor. google vi for commands...
  • pmvinuelaspmvinuelas Posts: 87Registered Users
    edited April 2009
    will.ray wrote: »
    hmmm why don't you edit with textedit? if you have a real reason to edit in terminal, type "vi filename" and you will go into the vi editor. google vi for commands...

    I figured out how to edit the file. I also made sure to download the diskimage package. My problem is still that the organizer dosnt recognize the iphone. Also when i created my certificates the organizer wont properly read them. It keeps saying there is a signing issues.

    Can someone help give me a step by step list of how to do this? I think i may have to start all over but i want to make sure that this time im not making a mistake.

    Any help would be greatly appreciated!
  • IlliniIllini Posts: 1New Users
    edited June 2009
    Sunny Day wrote: »
    I fixed it, you do the following

    1. After downloading the iPhone SDK Beta 2, run the installer and let it install what it will let you.
    2. Open the “Packages” folder from iPhone SDK disk image, and manually install all of the packages with the “iPhone” preface.
    3. After installing all of the iPhone packages, there should be a “Platforms” folder in the root of your hard drive (or where you chose to install them). Move all the contents of this folder to the /Developer/Platforms folder on your hard drive.
    4. Launch Xcode, and you should be presented with the iPhone options as before.

    I tried this but it still didn't work for me. Am I missing something?
  • droidsculptordroidsculptor Posts: 1New Users
    edited August 2009
    trapper wrote: »
    I develop, test on device, and even submit apps to the store all on my G4.

    The codesign script is the key.

    I know this is an old post but......
    Does anybody know if it works with the latest devkit?

    cheers

    Droid
  • PhilPhil Posts: 1New Users
    edited September 2009
    Hi,

    I'm using Power PC G4 to develop for iPhone, could install the SDK but now when starting ("build and go") simple apps, even the presets, error messages occur and the simulator doesn't launch.

    When starting the iPhone Simulator.app out of the finder, the Simulator also does not start... What could be the problem?

    Many thanks
    Phil
Sign In or Register to comment.