objective-c

Objective C: Terminal output into NSString

Hello! I'm trying to execute "whois search domainname.tld". I'm currently using system("whois search domainname.tld"); however i need to get the output into a NSString variable to output to the user. How can i do this? ...

Issue in @selector of Objective-C

Hello, [mobile_Obj AuthenticateMobileServer:self action:@selector(Handler:) AccountNO:@"123" UserName:@"Sun" Password:@"123***"]; In the above method call , can we have two threads running simultaneously?? One thread running: AuthenticateMobileServer method Second thread runnig: Handler method Please let me knw is it possible or...

Accepted Method for Retrying URL Request in Objective-C?

I have a connection request working using the stringWithContentsOfURL:encoding:error: method from NSString. I want to be able to retry the connection if it fails the first time. I was going to rewrite the function to use the timeout functionality of NSURLRequest, but I think I'd really like to use multiple retries before failing out. As...

Objective c: NSString NSData reading from file problem

I'm using: NSData *output1 = [NSData dataWithContentsOfFile:@"~/centralUtilOut.tmp"]; NSString *output = [[NSString alloc]initWithData:output1 encoding:NSUTF8StringEncoding]; NSLog(@"%@", output); [output release]; But nothing is in the debug window. This is in objective C. Note: centralUtilOut.tmp is a normal text file ...

OS X System Congiuration Settings, Set in Objective C

What would be the best method for configuring OS X Network Proxy preferences in Objective C? If anyone has any code examples that would be very helpful. Also - I have been searching all around the interwebs and can't seem to find a good source for setting OS X System preferences/settings with Objective C. Anyone have any good source...

Run Shell Command with custom input

Hi, How can i run a shell command in objective c with a variable E.G system("thisCMD thisParam %@", username); ...

How to suppress Objective-C warning "incomplete implementation of class 'SomeClass'"?

I have a class which routing many messages into inner component instance. So the class have only method definition, but no implementation. How can I suppress these warnings for those dynamic methods? -- edited -- My code sample: @interface SomeClass : NSObject { } - (void)mssageA:(id)value1 additionalOption:(id)value2; - (void)mssageB...

problem in importing csv CSV file

i am importing a csv file in my sqlite database table in objective and i have created my table with 10 field but csv contain different no of field in each line thats why sqlite is unable to import these field so is there any method to import csv file of different field length ...

Bulk Insert to Sqlite3 causing Db Error: Library routine called out of sequence

I need to load some configuration data after app updates for my iphone app. I bundle in a file with a bunch of SQL statements (800+) to run on first launch. It looks like I may be painted in a corner now. If I run it on the main thread at startup, it take so long to run that the app crashes due to the startup taking too long. If I ru...

appearing white shade while the view transitions? iwant to remove it

i used the following code for swap between views..bute there appears a white shade ..how can i remove the white shade? help me CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setDuration:1.8]; //[animation setTimingFunction:UIViewAnimationCurveEaseInOut]; [animation setType: kCAT...

UITabelView, detail view empty first time I mark a row

I have an diary app, based on UITableView and CoreData, all works just fine but there is one little tim thing that is strange. When I recompile the app and mark a row to see the details, the detail view is empty, if I go back and click the again it is populated as it should be. What is wrong here? ...

Why is dealloc for my class not being called?

I have a view controller. The view controller has a retained object called streamController, which is an NSObject subclass that handles all of the data I/O with my server. All is well, except I'm trying to figure out why some things are leaking on said streamController. I drop an NSLog in there and I never see it firing. I'm complete...

s = CGPDFStringCopyTextString(string); my code crashes with “EXC_BAD_ACCESS”. what shud i do

hey i'm trying to convert a pdf file to string and the search a string with "http:// " but my program is crashing at s = CGPDFStringCopyTextString(string); ----> with “EXC_BAD_ACCESS”. what shud i do ? thankx a lotttt if received help ...

what's the difference between "bundle display name" and "bundle name" in cocoa application's info plist

here is a good question but I just wonder the difference between "bundle display name" and "bundle name" in cocoa application's info plist. ...

How do I ignore the action of appearence of actionSheet when holding down a link for a seconds in UIWebView

I have noticed that the app "Reeder" is using the UIWebView but ignores this event. it displays a custom view instead of the original UIActionSheet view. ...

Saving objects as favourites using Core Data and XML parsing

I am working on a project where the app parses data from an XML file, saves it to a persistent store and populates a table view. Every time the app opens, if there is internet connection available, the persistent store gets recycled and the XML is parsed again as it gets updated quite frequently. If no internet connection is available I'...

Problem with the camera

Hi @ll I am currently developing an app which is using the UIImagePickerController for taking pictures with the build in camera. What I no want to do, is to provide the user a switch on bottom bar of the UIImagePickerController to be able to switch between the front and the rear camera (if available of course). I know how it's possible...

Memory Management

Hi all, I need a clarification.That is, is it possible to know what is the space available to run application in the iPad? Thanks in Advance, Sekhar Bethalam. ...

Fast way of converting float of range -1 to 1 to short?

I need to repeatedly convert 1024+ consecutive 4 byte floats (range -1 to 1) to 2 byte shorts (range -32768 to 32767) and write to disk. Currently I do this with a loop: short v = 0; for (unsigned int sample = 0; sample < length; sample++) { v = (short)(inbuffer[sample * 2] * 32767.0f); fwrite(&v, 2, 1, file); } And this wor...

Draggable UIImgeView Rotation

I have a UIImageView object that I rotate with frame property and CFAffineTransformMakeRotate and then I want ot move it with moving origin of its frame, but my image moves and reshape strangly. @implementation TimberView - (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { // Retrieve the touch point CGPoint pt = [[to...