Hello World not working

Discussion in 'iOS Development' started by zacaj, Dec 26, 2007.

  1. zacaj

    zacaj New Member

    Joined:
    Sep 22, 2007
    Messages:
    211
    Likes Received:
    2
    Device:
    iPod touch
    Im not the best at Obj-C, but Im compiling the Hello World from http://iphone.fiveforty.net/wiki/index.php/UIKit_Hello_World
    , and then Im copying the Hello file and .plist file to Applications/Hello.app , and when I run hello on my touch, it shows a sideways, really pixelated pixture of two pieces of paper and a pencil, paintbrush, and a ruler, and after a few seconds it quits. Whats wrong?

    Oh, I saw somehting about changing the permissions to 755, but how do I do that?
  2. squimmy

    squimmy Member

    Joined:
    Dec 7, 2007
    Messages:
    56
    Likes Received:
    5
    Log into your touch using your SFTP client, right click on the .app folder and in most ftp clients their will be a "change permissions" or "properties" button which will allow you to change the permissions. I believe it should be changed to 775, not 755 though.
  3. jmiz9000

    jmiz9000 New Member

    Joined:
    Sep 29, 2007
    Messages:
    2,365
    Likes Received:
    19
    Device:
    iPhone 3GS (Black)
    sik u got ur touch
    now wat is this u making?
  4. zacaj

    zacaj New Member

    Joined:
    Sep 22, 2007
    Messages:
    211
    Likes Received:
    2
    Device:
    iPod touch
    Genesis. Main problem is my Genesis emulator is dependant on SDL's SDL_SetColors function, which I dont think UiKit has, and SDL seems to not me the best thing right now, but Im going to try it anyway.

    squimmy: Make the FOlder the stuff is in 775? Or the executable file? Would chmod +x Hello or chmod 775 Hello in linux work?
  5. wardak

    wardak New Member

    Joined:
    Oct 12, 2007
    Messages:
    37
    Likes Received:
    0
    Device:
    iPod touch
    Usually I just set the stuff in the folder to 0755 with WinSCP. Im pretty sure the pictures don't need the permission changed but i change them anyways.

    Are you sure you have the main program compiled right? When I was trying to compile, I normally ended up with just a white screen and I think once I deleted the files within the HelloWorld.App folder I ended up wtih that funny pixelated thing (I think the pixelated thing comes up when theres a shortcut without files and it can't find it)
  6. zacaj

    zacaj New Member

    Joined:
    Sep 22, 2007
    Messages:
    211
    Likes Received:
    2
    Device:
    iPod touch
    THat wont work because I dont have WiFi
  7. wardak

    wardak New Member

    Joined:
    Oct 12, 2007
    Messages:
    37
    Likes Received:
    0
    Device:
    iPod touch
    That sucks im not sure if the ipod will let you establish an Ad Hoc network either

    In the installer app Productivity > Mobile Finder as long as you dont have enable application launch you can navigate to the folder say HelloWorld.app and open the the folder, highlight, click modify (at bottom) and change permissions

    I see something about v-term 100 options so you might be able to set it via command line with the chmod but I have not tried that (not too good at linux type commands)
  8. zacaj

    zacaj New Member

    Joined:
    Sep 22, 2007
    Messages:
    211
    Likes Received:
    2
    Device:
    iPod touch
    Ill download that next time Im out. Or is there a direct downlaod anywhere? When I compile gpSPhone, it works fine, makes me think the programs wrong...
  9. MiG™

    MiG™ New Member

    Joined:
    Oct 10, 2007
    Messages:
    93
    Likes Received:
    0
    It must be, as the pen pencil is a splash screen for the app. Crashing means its not getting to the main function.

    Posting the code would be nice.

    Please Register or Log in to view images

  10. Scythal

    Scythal New Member

    Joined:
    Nov 27, 2007
    Messages:
    413
    Likes Received:
    4
    Device:
    iPod touch
    FYI, if that can still help anyone, I've put a guide to work around this problem here. It's for Windows but the same can apply to MacOS if you can transfer files with the USB cable and more importantly, rename them locally on the iPod (AFCRenamePath in MobileDevice.dll or the equivalent).

    It's basically based on the fact that if you copy a file with USB onto an existing file, it preserves the permission flags (including the Exec one!).

    I'm also messing with the following, and would greatly appreciate any insight if someone else knows how it works:

    The /System/Library/Lockdown/Services.plist allows you to add services you can activate from the USB connection with the AMDeviceStartService routine of the MobileDevice.dll.

    It would allow a change-of-permission bootstrap, or launching an application that changes a list of permissions from the USB alone, for example by adding this:

    Code:
    <key>com.scythal.chmod</key>
    <dict>
    	<key>Label</key>
    	<string>com.scythal.chmod</string>
    	<key>ProgramArguments</key>
    	<array>
    		<string>/bin/chmod</string>
    		<string>a+x</string>
    		<string>/path/to/my/file</string>
    	</array>
    </dict>
    
    or better, for example:
    Code:
    <key>com.scythal.chmod</key>
    <dict>
    	<key>Label</key>
    	<string>com.scythal.chmod</string>
    	<key>ProgramArguments</key>
    	<array>
    		<string>/usr/local/bin/mychmod</string>
    		<string>/var/root/batch.plist</string>
    	</array>
    </dict>
    
    It's just that I can't seem to make it work with the other service used to browse the iPod contents (com.apple.afc2). I can make it work alone, but I'd like the two of them working together in one program that would 1) create the batch.plist file and 2) call the /usr/local/bin/mychmod binary on the iPod.

    If someone knows how to make it stable...

Share This Page