iPhone Touch demo and howto compile

Previous topic - Next topic

doimus

Out of curiosity:
What happens if you do SETSCREEN 160, 240, 1 on iPhone, ie. if you set the screen at 1/4 size (or any other non-native res)? Does it rescale to full-screen or it just doesn't work?

Uncle

Just tried.  It seems to ignore any sizes that aren't 320 x 480.  Nothing is rescaled, and the program just run normally (like if you had selected 320 x 480).

MikeHart

@Uncle: Can you try to add 480x320 to the configuration file in the iphone section and let me know if it still runs in 320x480? Somewhere I saw an inline code for switch to landscape mode but cannot find the post.

MikeHart

Hi Andrew,

I have a question. In your video, you just changed the domain part in the bundle identifier inside the plist, but not build name and exe name.
I always got an code sign error if I didn't fill this in by hand. I have an app ID specially for this app Im creating. What did you do different so
you don't needed to do this?

Michael

Hark0

Hi!

I install the SDK and view your video many times.

I follow all of your steps.... but.

I have this error with your sourcecode (perfect on win32):
Code (glbasic) Select
Building target “iPhone” of project “iPhone” with configuration “Debug” â€" (2 errors, 1 warning)
Checking Dependencies
Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'iPhone-Info.plist'.
Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'iPhone-Info.plist'.
    cd /Users/hark0/Desktop/iTouchMouse/XCode/GLBasic
    setenv MACOSX_DEPLOYMENT_TARGET 10.5
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -L/Users/hark0/Desktop/iTouchMouse/XCode/GLBasic/build/Debug-iphonesimulator -L/Users/hark0/Desktop/iTouchMouse/XCode/GLBasic/Lib -F/Users/hark0/Desktop/iTouchMouse/XCode/GLBasic/build/Debug-iphonesimulator -filelist /Users/hark0/Desktop/iTouchMouse/XCode/GLBasic/build/iPhone.build/Debug-iphonesimulator/iPhone.build/Objects-normal/i386/iPhone.LinkFileList -mmacosx-version-min=10.5 -lstdc++ -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework AudioToolbox -framework CoreLocation -framework OpenAL -lGLBasiciPhone-egl -lpng-gf -lPROGRAM -o /Users/hark0/Desktop/iTouchMouse/XCode/GLBasic/build/Debug-iphonesimulator/iPhone.app/iPhone
ld warning: in /Users/hark0/Desktop/iTouchMouse/XCode/GLBasic/Lib/libGLBasiciPhone-egl.a, file is not of required architecture
ld warning: in /Users/hark0/Desktop/iTouchMouse/XCode/GLBasic/Lib/libpng-gf.a, file is not of required architecture
ld warning: in /Users/hark0/Desktop/iTouchMouse/XCode/GLBasic/Lib/libPROGRAM.a, file is not of required architecture
Undefined symbols:
  "_iPhoneDeviceID", referenced from:
      _main in main.o
  "_GLB_iPhone_call_main", referenced from:
      _main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
  "_iPhoneDeviceID", referenced from:
      _main in main.o
  "_GLB_iPhone_call_main", referenced from:
      _main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (2 errors, 1 warning)


TIA in advance.
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

kaotiklabs

Try to build on release mode. First error will probably disappear.
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

MrTAToad

And compile for the device and not simulator

Hark0

http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

Hark0

WELL...

SORRY FOR THE FIRST POST!!! (I have 2 hours fighting with certificates & keychains).


I just set to Release and Device 3.1.2.... and works PERFECT!!!!

THANKS!!!!

:good:
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

kaotiklabs

Great!!  =D

De nada hombre, un placer.
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

MrTAToad

QuoteI have 2 hours fighting with certificates & keychains)
They are a real pain.

shawnus

Uncle,

A video is worth a thousand FAQs!- thanks- this is very helpful & very considerate of you to go to the effort of producing this.

Kind regards, Shawn

Billamu

I've been compiling this to my iPhone, and the app opens, does nothing and then closes again.

I've heard it will close the app if something doesn't work. Its Windows build runs no problems, AFAIK I've made sure the files it accesses are written in the correct case.

I am using an iPhone 2G with XCode 4.0.1, compiling for iPhone iOS 3.0. I am using V8.078 of GLBasic.

Any help on this would be greatly appreciated.  :)
I'm an Aries. I have lots of Ram.

Billamu

I can verify it's not the loading of the sprite, it seems to be doing that just fine. I think it has something to do with polling the touchscreen.
I'm an Aries. I have lots of Ram.

backslider

in the glb-code you could use STDOUT "position" and then xcode will write your positions into the debug console. Then you can see where your program is crashing.