IPhone SDK Beta and Unix Tools

Does anyone know how to compile Unix tools for the iPhone with the SDK? All I seem to be able to find is, "install the toolchain". That doesn't help.
Specifically, I'd like to compile ettercap-ng. I know ettercap has ARM sources and even an ARM .deb in the apt-get repo (for debian). Given all that, it shouldn't be hard to do.
I've already got some dev tools on my actual iPhone, and I can use a terminal emulator to issue the compile and make commands.
I'm trying to compile ettercap-NG 0.7.3, and every time I do, (cd /{ettercap source here} && ./configure) I get:
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
Seeing as that's as far as I seem to be able to get on the actual handset, does anyone know how to use the SDK on a MacBook (Leopard 10.5.3 so on and so forth) to do it, and then transfer it over?

Mark, You have to be a registered iPhone developer to have the beta level firmware that allows direct access to the iPhone via the SDK. As far as accessing the BSD file structures the only way AFAIK thats currently possible is to hack the phone. And of course we cannot discuss that on this forum....
Try over here: http://www.appstoredeveloper.com/forum/index.php?sid=fdd5a5f29c264bd57440ba989ee 4b054
or here: http://www.modmyifone.com/forums/iphone-ipod-touch-sdk-development-discussion/

Similar Messages

  • IPhone SDK (Beta 5) - AudioQueue Problem playing MP3

    Dear community,
    i have a problem using the iPhone SDK (Beta 5). I want to playback a simple MP3-file. So i checked a lot of examples, read documentation and found a least the "AudioQueueTest" example. This is an simple example which is able to play MP3, WAV, ... from the command line. I ported the example to a simple application on the iPhone. Now the problem:
    If i playback a WAV file in the iPhone simulator, everything works fine. If i want to playback an MP3 file, it doesn't work and i don't know why. I stepped through the debugger and found out that the application freezes at the command "AudioQueueNewOutput".
    Do you have the same problem? What i am doing wrong? Is it no possible to create a background thread playing back a local MP3 file?
    Thank you!

    Did you get PCM recording on actual iPhone hardware? With Beta5, my PCM recording works fine in the simulator, but on the hardware, all the buffers I receive contain only 4 bytes of audio data!
    Here's my source code - if anyone can spot anything wrong, I'd be enormously grateful!
    #import "AudioAppDelegate.h"
    #import "AudioViewController.h"
    #import "AudioToolbox/AudioQueue.h"
    #define BUFFER_CT 4
    #define BUFFER_BYTES 8192
    AudioQueueRef audioInQueue;
    static void AudioInCallback(void* aqData,AudioQueueRef aq,AudioQueueBufferRef buffer,const AudioTimeStamp* startTime,UInt32 numPackets,const AudioStreamPacketDescription* desc)
    OSStatus result;
    printf("received %d bytes\n",buffer->mAudioDataByteSize);
    result=AudioQueueEnqueueBuffer(audioInQueue,buffer,0,NULL);
    if(result)
    printf("AudioQueueEnqueueBuffer returned %d\n",result);
    static void StartAudio(void)
    OSStatus result;
    AudioStreamBasicDescription format;
    // 11KHz, 16-bit stereo
    memset(&format,0,sizeof(format));
    format.mSampleRate=11025;
    format.mFormatFlags=kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
    format.mFormatID=kAudioFormatLinearPCM;
    format.mBytesPerPacket=BUFFER_BYTES;
    format.mBytesPerFrame=4;
    format.mFramesPerPacket=format.mBytesPerPacket / format.mBytesPerFrame;
    format.mChannelsPerFrame=2;
    format.mBitsPerChannel=16;
    result=AudioQueueNewInput(&format,AudioInCallback,NULL,CFRunLoopGetCurrent(),kC FRunLoopCommonModes,0,&audioInQueue);
    printf("AudioQueueNewInput result was %d\n",result);
    for(int i=0;i<BUFFER_CT;i++)
    AudioQueueBufferRef buffer;
    result=AudioQueueAllocateBuffer(audioInQueue,format.mBytesPerPacket,&buffer);
    printf("AudioQueueAllocateBuffer result was %d\n",result);
    result=AudioQueueEnqueueBuffer(audioInQueue,buffer,0,NULL);
    printf("AudioQueueEnqueueBuffer to in result was %d\n",result);
    Float32 gain=1.0;
    AudioQueueSetParameter(audioInQueue,kAudioQueueParam_Volume,gain);
    result=AudioQueueStart(audioInQueue,NULL);
    printf("AudioQueueStart result was %d\n",result);
    }

  • IPhone SDK Beta 4 - How to send emails with attachments?

    Hello everyone!
    This is my first post Please be so kind to point me in the right direction.
    Using the official iPhone SDK Beta 4, I am trying to show the compose email screen not only with a subject and body fields, but also with an attached PDF file that I generated. I know that many apps available in the Installer.app can do that, but can the SDK do that as well?
    Generating a mailto URL doesn't seem to be the answer since the RFC 2368 doesn't support attachments as far as I understand. All my attempts to hard-code a mailto URL that could trick the Mail application into composing a message with an attachment have failed...
    Could you give me a hint or maybe copy paste some code to help me with attaching files to emails?
    Thank you so much in advance,
    Eugene

    I tried the following :
    NSError *error;
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *path = [documentsDirectory stringByAppendingPathComponent:@"export.csv"];
    if ([records writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:&error] == NO) {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Export error" message:@"An error occured while writing the file."
    delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
    [alert show];
    [alert release];
    static NSString *email = @"[email protected]";
    NSString *outMailtoPath = [NSString stringWithFormat:@"mailto:%@?subject=Review&body=%@&attachment=%@", email, @"test", path, nil];
    NSURL *url = [NSURL URLWithString: [(NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)outMailtoPath,NULL,NULL,kCFStringEncodingUTF8) autorelease]];
    [[UIApplication sharedApplication] openURL:url]

  • [iPhone SDK] OpenGL and gDrawElements

    Trying to learn OpenGL at the same time I'm learning the iPhone SDK
    I made a simple cube and was trying to display it on the iPhone, what I get is just a unrecognizable blob on the screen. Any suggestions on what I'm doing wrong? thanks.
    glTexCoordPointer(2, GL_FLOAT, 8 * sizeof(GL_FLOAT), Box_vertex);
    glNormalPointer(GL_FLOAT, 8 * sizeof(GL_FLOAT), Box_vertex + 2);
    glVertexPointer(3, GL_FLOAT, 8 * sizeof(GL_FLOAT), Box_vertex + 5);
    glEnableClientState(GLTEXTURE_COORDARRAY);
    glEnableClientState(GLNORMALARRAY);
    glEnableClientState(GLVERTEXARRAY);
    glDrawElements(GLTRIANGLES,Box_polygoncount*3,GL_UNSIGNED_SHORT,Boxindex);
    float Boxvertex[Boxvertexcount][8]={
    {0.00000, 1.00000, 0.00000, 0.00000, 1.00000, -0.50000, -0.50000, 0.50000},
    {0.00000, 0.00000, 0.00000, 0.00000, 1.00000, -0.50000, 0.50000, 0.50000},
    {1.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.50000, 0.50000, 0.50000},
    {1.00000, 1.00000, 0.00000, 0.00000, 1.00000, 0.50000, -0.50000, 0.50000},
    {0.00000, 1.00000, 0.00000, 0.00000, -1.00000, 0.50000, -0.50000, -0.50000},
    {0.00000, 0.00000, 0.00000, 0.00000, -1.00000, 0.50000, 0.50000, -0.50000},
    {1.00000, 0.00000, 0.00000, 0.00000, -1.00000, -0.50000, 0.50000, -0.50000},
    {1.00000, 1.00000, 0.00000, 0.00000, -1.00000, -0.50000, -0.50000, -0.50000},
    {0.00000, 1.00000, -1.00000, 0.00000, 0.00000, -0.50000, -0.50000, -0.50000},
    {0.00000, 0.00000, -1.00000, 0.00000, 0.00000, -0.50000, 0.50000, -0.50000},
    {1.00000, 0.00000, -1.00000, 0.00000, 0.00000, -0.50000, 0.50000, 0.50000},
    {1.00000, 1.00000, -1.00000, 0.00000, 0.00000, -0.50000, -0.50000, 0.50000},
    {0.00000, 1.00000, 1.00000, 0.00000, 0.00000, 0.50000, -0.50000, 0.50000},
    {0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.50000, 0.50000, 0.50000},
    {1.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.50000, 0.50000, -0.50000},
    {1.00000, 1.00000, 1.00000, 0.00000, 0.00000, 0.50000, -0.50000, -0.50000},
    {0.00000, 1.00000, 0.00000, 1.00000, 0.00000, -0.50000, 0.50000, 0.50000},
    {0.00000, 0.00000, 0.00000, 1.00000, 0.00000, -0.50000, 0.50000, -0.50000},
    {1.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.50000, 0.50000, -0.50000},
    {1.00000, 1.00000, 0.00000, 1.00000, 0.00000, 0.50000, 0.50000, 0.50000},
    {0.00000, 1.00000, 0.00000, -1.00000, 0.00000, -0.50000, -0.50000, -0.50000},
    {0.00000, 0.00000, 0.00000, -1.00000, 0.00000, -0.50000, -0.50000, 0.50000},
    {1.00000, 0.00000, 0.00000, -1.00000, 0.00000, 0.50000, -0.50000, 0.50000},
    {1.00000, 1.00000, 0.00000, -1.00000, 0.00000, 0.50000, -0.50000, -0.50000},
    int Boxindex[Boxpolygoncount][3]={
    {0, 1, 2},
    {2, 3, 0},
    {4, 5, 6},
    {6, 7, 4},
    {8, 9, 10},
    {10, 11, 8},
    {12, 13, 14},
    {14, 15, 12},
    {16, 17, 18},
    {18, 19, 16},
    {20, 21, 22},
    {22, 23, 20},
    };

    Thanks for the reply. i did try that suggestion, but the cube still isn't rendering to anything even remotely resembling a cube. I was pretty sure I did a sizeof(GLUNSIGNEDSHORT) and got 4 on NSLog, but I could be wrong. I exported this data out of Cheetah 3D. Perhaps there is a better program for exporting 3d data for iphone? I'm at a loss for what else could be wrong. Probably I am missing one gl comand or parameter, I just can't figure out what it is.

  • IPhone SDK Beta 2 Interface Builder Add a UIViewController

    Hi,
    I am trying the new SDK (beta 2). I didn't try the beta 1 before, because of the lack of IB. However, I am having a problem when trying to code a simple Hello World with a button, with a classic MVC design.
    If I use a UIViewController as a view controller, it compiles fine, but when I hit the button, it crashed. If I code it, or if I subclass the UIView and use it as a view controller, it works.
    Is there any difference of coding compared to a "classic" cocoa app ?
    I hope everything is clear.
    Thanks for your help.
    Have a great day.

    scottjg wrote:
    I've written a tutorial on how to setup a basic Hello World MVC app at: http://ihatetheiphonesdk.blogspot.com
    hope it helps!
    thanks. That helped me!
    A couple of issues though:
    1. I could not "*right click*" and bring up the outlet popups. I had to control-click to do that.
    2. the steps for connecting up outlets for viewController and window did not exist already for me as selectable outlets
    "-Connect our App Delegate's viewController outlet to our view controller, and the window outlet to our window:"
    I added them manually to the app delegate and then ran the connections. Then, I had to add
    +" IBOutlet UIWindow *window;+
    +IBOutlet UIViewController *viewController;"+
    to my HelloWorldAppDelegate.h file (along with any other code that I compared to your files)

  • Interface Builder not starting (iPhone SDK beta 6)

    Hi,
    I have upgraded my OS to 10.5.3, uninstalled SDK beta 5 and installed SDK beta 6. Since then I cannot start Interface Builder (the icon bounces 3 or 4 times and the application hangs). I tried to reinstall it again and nothing changed.
    Is that a known problem with beta 6? I have a friend who does not experience this problem. Any workaround?
    Thanks and best,
    Rodrigo

    How can it be possible? you invest some money believeng you will start something great and develop allied with the biggest intrepeneur of the world,and... boom. what you see.... isnt really what u get. Why this beta 6/7 Interface Builder crashs when u scroll around too see some v2.0 aspects of the i-phone? just some secret aspects or a little glitch on the final build ? lets see if we can have a taste for it... i was really anxious...

  • IPhone SDK UISegmentedControl and hiding view

    Hello,
    Im slowly getting to grips with the iPhone SDK but having a problem today, I have a UISegmentedControl setup to a toggleSetting function but this toggleSetting calls a url in the background for some data, but this freezes my application while the web request is taking place, this can take around 2 seconds and so I made another view (loadingView) with a loading screen thats animated and I want to show this whis the connection is taking place and then hide it again once complete.
    I don't have any problems with showing or hiding the view until the web request happens.
    When my app loads I call \[loadingView setHidde:YES] which hides my view straightaway, then my toggleSettings method is below, but this does not cause the view to show while the quest is taking place, I think it is showing an hiding it instantly as if I just ask to show it, it will show but only after the web call is complete. Anyone got any pointers???
    <code>
    -(IBAction)toggleSetting:(id)sender
    [loadingView setHidden:NO];
    UISegmentedControl *segmentedControl = (UISegmentedControl *)sender;
    NSInteger segment = segmentedControl.selectedSegmentIndex;
    if(segment==0) {
    NSURL *url = [NSURL URLWithString:@"http://myurl"];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [NSURLConnection sendSynchronousRequest: request returningResponse: nil error: nil ];
    [loadingView setHidden:YES];
    </code>

    I don't have code handy but take a look at the class reference for NSURLConnection and related calls.
    NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self startImmediately:YES]; would be a good start.
    You want to use a call that will create some callbacks to update you when a connection is confirms, how many bytes are transfered, etc. so be sure to write the call functions.

  • IPhone SDK Calendar View Control/Tool??

    I guess I was expecting something in the iPhone SDK toolkit to display a full calendar (as in the iPhone calendar application) rather than just a date picker.
    Does anyone know of any Cocoa code that displays calendars like in the iPhone Calendar application that could be used with the iPhone SDK?
    Thanks.

    I did not say it was "difficult", it was just not as easy as it might seem. Our programmer cranked out the core class in a few days, but testing revealed the periodic quirks as I mentioned. So, I would encourage you to continue.
    I am reluctant to tell you my app as I am sick of the trash talk and complaining about the pricing and do not want to read any more on this discussion group. The calendar looks almost exactly like Apple's but without the animation on month changes or fast month changing (and there are no appointment functionality).
    With no disrespect to you or Shanghai, the buildings are works of art, the people are friendly, but the air quality is terrible and my son hates to take a breath there.

  • [iPhone SDK beta 7] screen capture error?

    As of beta 7 of the SDK, I get the following error when I try to capture a screenshot of my device via Xcode: "Could not communicate with the device, connection failed".
    Anyone else encounter this? Or is it working for you?
    Thanks.
    Message was edited by: Abra Dabra

    Me, too. Xcode 3.1. I am using the old-fashioned screen capture technique (holding power while pressing home), but it's not nearly as nice and the fact I can't do the other worries me a bit.
    Has anyone been able to do this since iPhone 2.1 came out?

  • IPhone SDK beta 4: error running app on device

    My app ran fine on my iPhone up until beta 4. I've fixed in in accordance with the changes to the SDK, and it runs perfectly on the simulator. I've also followed the directions in the Program Portal to use code signing for the app.
    When I try to compile it for the device, I get the following errors:
    cc1obj: error: /var/folders/pA/pAvrzjzKGQe5O6saRJWAXE+TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/iCrosswordPrefix-ayguzoobuyunjzbvsayctaqnkcfp/iCrosswordPrefix.pch: No such file or directory
    cc1obj: error: one or more PCH files were found, but they were invalid
    cc1obj: error: use -Winvalid-pch for more information
    I get about 7 copies of those errors, once per header file in my app.
    Does anyone know what this means, or how to fix it?
    Thanks,
    Eliza

    Sorry, I'm an idiot; I didn't clean my targets before compiling. After cleaning targets, it installed and ran without any trouble.
    Message was edited by: Eliza Block

  • [iPhone SDK Beta 6] Simulator only can't find Frameworks

    I'm scratching my head on this one. I can load an example project and it runs in the simulator, no problem. My own project, however gives me this:
    warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
    and something similar for every other linked framework. Eventually, this leads to nothing working and the app quitting out. Works fine on the device, and again, it works with the example projects, so the files aren't actually missing or misplaced.
    Instead it seems like something in my build settings or a similar problem. The rub is that I've gone through every build setting and parameter of a working example project line by line to make sure they match, but my project still won't compile in the simulator.
    The only caveat is that I'm not using a .nib or .xib file as all the examples are transitioning to now. I don't see how that's relevant in the smallest way, however.
    Can anyone with more experience or knowledge about XCode projects give me some insight to what I might be missing? It's driving me a little insane.

    Well, I really don't know what the problem was specifically, but I narrowed it down to drawing the render buffer from OpenGL. It seems that, only on the simulator, if I do this too quickly after the window is created and all that it causes the problem.
    The console results were weird talking about missing frameworks which seems completely unrelated to what problems were happening.
    So... no help to anyone else I guess, but I completely rebuilt the project restructured my program like the demos with a nib and everything and it still turns out it had nothing to do with that. I was able to fix my original with one line commented out. 2 days for one line. weeee.
    Message was edited by: aaronsullivan

  • IPhone SDK with iPod Touch 2G problem

    I installed the SDK last night but when I went to plug in my iPod Touch 2G, I got the error message: 'Unable to locate a suitable developer disk image. Please re-install the SDK'
    I have reinstalled the SDK many times but still get the same error message. Any help appreciated.
    Thanks

    {quote}He's talking about the iPod Touch, not a regular iPod{quote}
    Yep, I know. Do a Google search for "Unable to locate a suitable developer disk image". Found this on the comments of [this blog post|http://www.tbradford.org/2008/03/iphone-sdk-beta-2-possible-ppc-fix.html]:
    {quote}
    If anyone else runs into the "Unable to locate a suitable developer disk image." problem, there's a package called "DeveloperDiskImage" in the iPhone SDK that needs to be installed.
    As of 2.1, these are the extra packages that you need to install manually:
    iPhoneSDKHeadersAndLibs
    iPhoneSimulatorPlatform
    iPhoneHostSideTools
    iPhoneDocumentation
    DeveloperDiskImage
    {quote}
    Another [blog post|http://khakionion.blogspot.com/2008/09/iphone-sdk-21-doesnt-include-ipod-t ouch.html#links] says:
    {quote}
    The problem is that the huuuuuge iPhone SDK 2.1 installer doesn't come with the iPod touch 2.1 firmware image. Suck. Fear not, though: All you have to do is force iTunes to do a firmware restore, which will download the appropriate image. On next launch, Xcode will find it and everything will work great.
    {quote}

  • Cannot use AddressBook Framework for iphone SDK

    I am trying to use the AddressBook Framework with iPhone SDK, and I added the following framework to my xcode project:
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/System/Lib rary/Frameworks/AddressBook.framework
    When I compile, references to classes such as ABAddressBook and ABPerson cannot be resolved. ('ABPerson undeclared ...'). However, It seems the C interface to AddressBook is defined.
    I am using the framework in the iPhone SDK directory, and I have #import <AddressBook/AddressBook.h> in my header file, but it is not working for me. Any tips would be appreciated.

    It does explain the OP's problems
    Conserning add and checking if there are changed records in the addressbook I hear people complain about it and got refered to apple to report it as a bug for the sdk.
    And since we still are limited when it comes to mentioning the api I will rather link something someone else wrote on the topic before.
    Have a look here: http://forums.macrumors.com/showthread.php?p=5495200 that should give you some of the basics.

  • Iphone sdk iTunes

    I am a bit new to this forum so I hope not to commit any major faux pas' in this post:
    I am just reading the iPhone sdk documents, and trying to wrap my head around the possibilities.
    I am trying to figure out if there is a way to access the music that the user has on their device. Is it possible to read that XML from a users iTunes directly, or somehow interact with the file system to find all of their music?
    Thanks for any and all guidance. Much will be appreciated and returned.

    Same question. Is there any way to ask the user to select a song that's on the iPhone?

  • IPhone iPhone SDK (build 9M2199a, beta 8) Security.h Security-Framework

    Hi!
    I've downloaded and installed the iPhone SDK (build 9M2199a, beta 8).
    Now, i'm trying to write code to use the Keychain in iPhone but "SecItem.h" in "Security.h" (Security-Framework) is missing so the Attributes (kSecClass, ...) can't be found and the code doesn't compile.
    Where i can get it ?
    Thanks for help.
    Message was edited by: iPhoneProj

    I had the same issue. The security code seem to only work if you build for Device|Debug. You can't run the code in the simulator.

Maybe you are looking for

  • Put the same form layer over identical pdf's

    Hi All, At first sight I couldn't find a topic which describes what I would like to do. We are using a printed PDF as a checklist / customer service report for our projects. This PDF has always the same structure, and is automaticaly generated via ou

  • Can't preview NEF files in Bridge to see/sort/rate

    I've purchased CS6 and cannot view my new nikon d800 NEF files in Bridge.  I can see them in Lightroom, but have always used bridge to sort/rate my images before importing them.

  • Nokia 2330

    I have friend in South Africa and he ask me if he can install skype in his 2330 classic cell phone?

  • How to manage the stock in differnt UOM

    I want to manage the inventory stock in two different UOM's as the scenario is i am issuing the materials in kg to subcontractor and receiving the materils in pcs from subcontractor. how should i do in sapb1.

  • Clips out of order in CS5 Media Browser

    Could someone please explain to me why my clips in media browser are completely out of order from the way they were shot?  I transferred the files directly into a file on the computer then called up those files from the media browser.  They don't app