Author Topic: XCode iPhone + Simulator  (Read 3418 times)

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2671
    • View Profile
XCode iPhone + Simulator
« on: 2010-May-01 »
Hi,

Just an idea but would it be possible to miss out the GCC compilation phase on Windows and just pump straight 'C' source code into an XCode project?

Pluses/Minuses...

+ Able to use the simulator.
+ Inline Objective-C(?)
+ Allowing access to the full Apple SDK

- GCC compilation error messages would only show up on the Mac
-?

Anything to add?
« Last Edit: 2010-May-01 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: XCode iPhone + Simulator
« Reply #1 on: 2010-May-01 »
- No License check for kungphoo.

MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2671
    • View Profile
Re: XCode iPhone + Simulator
« Reply #2 on: 2010-May-02 »
Yes, that's a problem I never thought of...  ;/
« Last Edit: 2010-May-02 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: XCode iPhone + Simulator
« Reply #3 on: 2010-May-02 »
You have full ObjC access yet and use all of apples apis.
just copy headers and libs and frameworks from your mac to glbasic compiler folder.

but simulator, sorry no support for that.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2671
    • View Profile
Re: XCode iPhone + Simulator
« Reply #4 on: 2010-May-02 »
Interesting, I (wrongly?) assumed that the GCC that shipped with GLB was not ObjC compatible, only C/C++.  And I'll, take your advice with the frameworks too Truci. ;)

Very handy tips, thank you!


Ian
« Last Edit: 2010-May-02 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: XCode iPhone + Simulator
« Reply #5 on: 2010-May-02 »
it is fully objc compatible. You only have to get the libs headers and frameworks, because shipping of it are not legal, so doit yourselfe.

created some cocoa touch thingies directly on glbasic with objc.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline mykyl66

  • Mr. Polyvector
  • ***
  • Posts: 114
    • View Profile
Re: XCode iPhone + Simulator
« Reply #6 on: 2010-May-04 »
Not sure what this kungphoo thing is but in my dreams I see a huge advantage in seeing and doing final edits of my code directly in xcode without have windows grabbing ram and the back and forth of bits and pieces between os x and windows.

Maybe one day. Of course if the mac ide ends up being usable by the rest of us that would at least allow me to dump windows finally and fully.

Mike

Offline aonyn

  • Mr. Polyvector
  • ***
  • Posts: 136
    • View Profile
Re: XCode iPhone + Simulator
« Reply #7 on: 2010-Sep-09 »
@ trucidare,

I have looked at the developer folder on my mac, where xcode is installed, and also the compiler folder for glbasic, but I am not entirely clear what I need to put where.
I have some guesses, but I am not entirely clear, and was wondering if I could please request a bit of help getting started using the iphone api.

Thank in advance!

regards,
Dave
For by grace are ye saved through faith, and that not of yourselves: it is the gift of God: Not of works, lest any man should boast. -Ephesians 2:8-9

Offline Chris

  • Mc. Print
  • *
  • Posts: 5
    • View Profile
Re: XCode iPhone + Simulator
« Reply #8 on: 2010-Sep-20 »
@ trucidare,

I have looked at the developer folder on my mac, where xcode is installed, and also the compiler folder for glbasic, but I am not entirely clear what I need to put where.
I have some guesses, but I am not entirely clear, and was wondering if I could please request a bit of help getting started using the iphone api.


Did you get an answer for where to take the headers and libs and frameworks from and where to put them to?

I may need to do something similar.

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: XCode iPhone + Simulator
« Reply #9 on: 2010-Sep-20 »
Writing a PN is more efficient to get an answer from me.

For including objc things to your game you only open your xcode project created with glbais add new .mm files to it and start coding like without glbasic. to call the functions in glbasic you need to wrapp it like extern "C" void mow() {} and in glbasic you must only do IMPORT "C" void mow()

then you can simply use mow in glbasic code like a normal glbasic function. beware you need to provide the .mm file everytime.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline Gary

  • Dr. Type
  • ****
  • Posts: 313
    • View Profile
Re: XCode iPhone + Simulator
« Reply #10 on: 2010-Sep-21 »
Just out of interest what is the reasons for the simulator not working? Seems strange that the code will run on the actual device but not the simulator. Would be very handy if it could as I dont have my iPad yet but want to start developing and want to go the step futher than just running on a pc as a windows app

Offline aonyn

  • Mr. Polyvector
  • ***
  • Posts: 136
    • View Profile
Re: XCode iPhone + Simulator
« Reply #11 on: 2010-Sep-21 »
Thanks trucidare,

I will experiment with it as I have time, and I hope you don't mind, I may take you up on the offer for PM questions if I get stuck (I promise to try not to be annoying about it)  :)

regards,
Dave
For by grace are ye saved through faith, and that not of yourselves: it is the gift of God: Not of works, lest any man should boast. -Ephesians 2:8-9

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: XCode iPhone + Simulator
« Reply #12 on: 2010-Sep-21 »
The reason is the lib could be only compiled for arm platform - i386 wont work, so we couldnt provide libs for simulator. sorry for that :/
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC