GLBasic forum

Main forum => GLBasic - en => Topic started by: Gary on 2009-Oct-11

Title: another iPhone problem
Post by: Gary on 2009-Oct-11
Sorry for all the questions, hope i'm not annoying you all too much.

I have got the main framework of my project running on the PC so thought I would port it over to the iPhone to see how the graphics speed was on there. I did as I have done before, built it for iPhone, took the files to the mac and ran xcode but get the error

Unable to open project

Project /Users/garypearson/Desktop/RandomGold/XCode/GLBasic/iPhone.xcodeproj cannot be opened because the project file cannot be parsed.

anyone else had this problem and any ideas on how to fix it?

My xcode version is 3.2 and the other info is

64-bit

Component versions
Xcode IDE: 1610.0
Xcode Core: 1608.0
ToolSupport: 1591.0

Thanks again
Gary
Title: Re: another iPhone problem
Post by: Uncle on 2009-Oct-11
Sounds like your project file has been corrupted somewhere along the lines.

I would suggest closing XCode.  Deleting the project file, and anything in the XCode -> GLBasic -> Lib folder to be sure.  Then recompile the project again in GLB.  This will make brand new files for everything except your media. 

Let me know if this works.


Cheers,


Unc
Title: Re: another iPhone problem
Post by: Gary on 2009-Oct-11
Hi Unc

I have just tried that again and got the same error, very strange. Im not using that many commands, all I have used is showscreen, loadsprite, drawsprite, if, then, endif, while, wend, rnd, the set directory and set transparency commands and as far as I know none of them are unabailable to the iphone
Title: Re: another iPhone problem
Post by: Uncle on 2009-Oct-11
Very odd.  I don't think it has anything to do with the GLB code you wrote, more like the project file is unreadable to Xcode.  Can you actually load the project into XCode?  Perhaps you can post a screen shot?
Title: Re: another iPhone problem
Post by: Gary on 2009-Oct-11
nope it fails as soon as i try to load it into xcode

And I would post a screen shot but having only just got into the world of Macs I dont have a clue on how to take one   :'(
Title: Re: another iPhone problem
Post by: Gary on 2009-Oct-12
also I have tried building and running one of the demo projects and that is fine so I know the steps im taking are correct
Title: Re: another iPhone problem
Post by: MrTAToad on 2009-Oct-12
QuoteAnd I would post a screen shot but having only just got into the world of Macs I dont have a clue on how to take one
Use Grab from the Applications/Utilities directory.

Are you using the latest version of GLBasic ?
Title: Re: another iPhone problem
Post by: Uncle on 2009-Oct-12
All the commands you mention from what I know are perfectly valid, and compile ok on the iphone.  If you like I can try and compile your project on my mac to see what I get.  As a matter of interest what is your set up i.e. are you creating your code on separate pc and then doing a file copy over, or are you using another method like using a virtual machine on your mac.  Im using parallels, and I find that sometimes the files get corrupted when reading them into the XCode, especially if I leave XCode open when Im editing and compiling using GLB. 

Also what size is your Xcode Project file?  I think its an XML file isn't it, so it might also be interesting to open it up in and editor to see what is written in it?

EDIT : You can't read the project file in an editor, but on the make you can right click and show its package contents.  Then you view the individual text files contained within it.
Title: Re: another iPhone problem
Post by: Gary on 2009-Oct-12
http://www.garypearson.co.uk/screen.tiff (http://www.garypearson.co.uk/screen.tiff)

I am on the most up to date version of GLBasic but not on the xcode SDK, but l have run sample code and thats worked on this combination

I am writing it on a PC with windows vista, copying it to a memory stick and then copying that to the mac and trying to compile

project file is 16,470 bytes and seems to be an xml file and not corrupted
Title: Re: another iPhone problem
Post by: Uncle on 2009-Oct-12
Right Im about to hit the sack (early start in the morning).  All I can suggest is right clicking on the project file and select show package contents....  Then you will see several files contained within the package.  These can be opened in a text editor.  Perhaps you can compare this contents against the contents of a project file from the demos.  Hopefully then it will be easier to see what is different and what could be causing the problem?  Its an odd one for sure.
Title: Re: another iPhone problem
Post by: Gary on 2009-Oct-12
interesting, in the packages of the files that do open in xcode there are 3 files johnrambo.pbxuser, project.pbxproj and garypearson.pbxuser (that being my name). in my project that wont open I only have the first 2 files.

I am more than happy to send over the source if this helps

Gary
Title: Re: another iPhone problem
Post by: Uncle on 2009-Oct-12
Hi Gary,

I will send you a PM, and we can try and work through this today :)

Cheers,


Unc
Title: Re: another iPhone problem
Post by: Uncle on 2009-Oct-12
Ok, I got the project and exactly the same happens for me.  I tried deleting and recreating but still the same problem.  When I look at the contents of the Xcode Project file, I only see the 2 files you mentioned.  I think we need Gernot or Truidcare to look deeper into this one.
Title: Re: another iPhone problem
Post by: Kitty Hello on 2009-Oct-12
Try deleting the xcode directory and rebuild.
Also, try using a company name in project/options that has no spaces. Just guesses in the wild.
Title: Re: another iPhone problem
Post by: Gary on 2009-Oct-12
Ah company name does have spaces, I will give that a go, thanks
Title: Re: another iPhone problem
Post by: Gary on 2009-Oct-12
:( same thing when I took the spaces out

and thanks for confirming its not me being silly and missing something obvious Uncle :)
Title: Re: another iPhone problem
Post by: Gary on 2009-Oct-12
 :good: :good: :good: :good:  SUCCESS  :good: :good: :good: :good:

When I changed the company name I replaced the spaces by _ and it didnt work, I changed the space in the project name to _ and still nothing, but when I removed the _ and left just letters it compiles  :happy: :happy:

Many thanks again for all your help, especially Uncle and Gernot
Title: Re: another iPhone problem
Post by: Uncle on 2009-Oct-12
Glad you got to the bottom of that.  At least we know what to look out for in the future :)
Title: Re: another iPhone problem
Post by: codegit on 2009-Oct-12
Yes, thanks I will also make sure I dont use underscores in the naming.