Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone ($4.99)

dotnetIQ ($4.99)

Your First iPhone App ($1.99)

iPocket Tools 9 in 1 ($0.99)

Catch-Me (Free)

Alien Strike ($0.99)

Historic Olympic Medal-Table ($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 03-24-2009, 04:33 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 99
Smile Running iphone SDK on non intel macs?

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?
Sunny Day is offline   Reply With Quote
Old 03-24-2009, 05:15 PM   #2 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 99
Default

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.
Sunny Day is offline   Reply With Quote
Old 03-25-2009, 01:19 PM   #3 (permalink)
New Member
 
Join Date: Feb 2009
Location: Houston, TX
Posts: 40
Default

Quote:
Originally Posted by Sunny Day View Post
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.
shaendra is offline   Reply With Quote
Old 03-25-2009, 04:50 PM   #4 (permalink)
I am evil trapper
 
Join Date: Jul 2008
Location: London
Posts: 290
Default

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

Code:
#!/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
Code:
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!


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
__________________
Black or Red - Possibly the first ever iPhone drinking game! Try it tonight.
Kings - My second drinking game, bigger and better!

Last edited by trapper; 03-25-2009 at 04:54 PM.
trapper is offline   Reply With Quote
Old 03-25-2009, 04:56 PM   #5 (permalink)
New Member
 
Join Date: Feb 2009
Location: Houston, TX
Posts: 40
Default

Quote:
Originally Posted by trapper View Post
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
shaendra is offline   Reply With Quote
Old 03-26-2009, 03:29 PM   #6 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 161
Default

Quote:
Originally Posted by shaendra View Post
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....
will.ray is offline   Reply With Quote
Old 03-28-2009, 10:51 AM   #7 (permalink)
I am evil trapper
 
Join Date: Jul 2008
Location: London
Posts: 290
Default

Quote:
Originally Posted by will.ray View Post
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.
__________________
Black or Red - Possibly the first ever iPhone drinking game! Try it tonight.
Kings - My second drinking game, bigger and better!
trapper is offline   Reply With Quote
Old 03-28-2009, 02:41 PM   #8 (permalink)
New Member
 
Join Date: Mar 2009
Posts: 1
Default Iphone SDK 3.0

Quote:
Originally Posted by trapper View Post
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.
thenight is offline   Reply With Quote
Old 04-04-2009, 03:39 PM   #9 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 87
Default

Quote:
Originally Posted by trapper View Post
I develop, test on device, and even submit apps to the store all on my G4.

The codesign script is the key.
Quote:
Originally Posted by trapper View Post
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

Code:
#!/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
Code:
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!


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
pmvinuelas is offline   Reply With Quote
Old 04-04-2009, 05:28 PM   #10 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 161
Default

Quote:
Originally Posted by trapper View Post
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!
will.ray is offline   Reply With Quote
Old 04-04-2009, 06:12 PM   #11 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 87
Default

Quote:
Originally Posted by trapper View Post
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
pmvinuelas is offline   Reply With Quote
Old 04-04-2009, 09:15 PM   #12 (permalink)
Registered Member
 
Join Date: Mar 2009
Posts: 161
Default

Quote:
Originally Posted by pmvinuelas View Post
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...
will.ray is offline   Reply With Quote
Old 04-05-2009, 10:19 AM   #13 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 87
Default

Quote:
Originally Posted by will.ray View Post
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!
pmvinuelas is offline   Reply With Quote
Old 06-02-2009, 01:24 PM   #14 (permalink)
New Member
 
Join Date: Jun 2009
Posts: 1
Default

Quote:
Originally Posted by Sunny Day View Post
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?
Illini is offline   Reply With Quote
Old 08-10-2009, 11:50 AM   #15 (permalink)
New Member
 
Join Date: Aug 2009
Posts: 1
Default This is great

Quote:
Originally Posted by trapper View Post
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
droidsculptor is offline   Reply With Quote
Old 09-03-2009, 04:58 AM   #16 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 1
Default iPhone SDK for PowerPC

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
Phil is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements
» Stats
Members: 21,495
Threads: 35,777
Posts: 156,730
Top Poster: smasher (2,448)
Welcome to our newest member, AnuSambath
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:01 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0