nsurl

NSString and NSUrl not converting properly

Hi All, So I am trying to retrieve data from an XML stream coming from a URL. This URL is configured on a search string the user inputs. Is there any reason why this code should not be working? NSString *searchString = "Geoff"; NSString *updatedURL = [NSString stringWithFormat:@"http://mysearchpage.com/searchQuery=%@", searchString]...

CFURLCreateDataAndPropertiesFromResource failed with error code -15

I'm trying to lead a TIFF image into a CGImageSource using CGImageSourceCreateWithURL. My URL is correct, is %20 encoded, is a path to an existing file, that file is a TIFF. However, the line: NSString *fullPath = [[[fileNames objectAtIndex:pageNum - 1] string] stringByAddingPercentEscapesUsingEncoding: ...

How to prepare an NSURL from an NSString continaing international characters?

I have to access a web server using a GET with international characters (Hebrew in my case but could be anything). So I make an NSString just fine but [NSURL URLWithString:urlString]; return nil. I realize I probably have to convert the international characters to percent codes. Is there a built in method in Objective-c to do so? ...

facetime:// url scheme

When trying to have my app open a facetime url (facetime://15555555555), it loads up a blank black screen. NSURL *facetimeURL = [NSURL URLWithString:@"facetime://15555555555"]; [[UIApplication sharedApplication] openURL:facetimeURL]; Has anyone had any success with this? ...

grabbing data from an internal file

I'm grabbing data from an external file using NSURL with the code below. If i wanted to grab this data from an internal file in my resources folder how would the code be different. here's the NSURL code: NSURL dataUrl = [NSURL URLWithString:@"https://sites.google.com/site//*/file.asc"]; NSString *fileString = [NSString stringWithConte...

How to uniquely identify nsmangedobject with string?

I'm using Core data and region monitoring. The only way to distinguish between monitored regions is with a NSString for identifier. I'd love to use NSManagedObjectID, but I can't get it to work. What I've tried: NSURL *objURL = [managedObjectID URIRepresentation]; NSError *err; NSString *identifier = [NSString stringWithContentsOfURL:m...

How to encode hebrew string (NSString) into a Unicode format in order to send as a URL in Objective-C

The title pretty much sums it up. I have a hebrew-containing String used in a NSUrl: NSString * urlS = @"http://irrelevanttoyourinterests/some.aspx?foo=bar&this=that&Text=תל אביב" I would like to convert in into: Text=%u05EA%u05DC%20%u05D0%u05d1%u05d9%u05d1 and then send it as a GET request. I have tried many encoding metho...

NSUrl bookmark data

what part of NSUrl has the bookmark query? eg: mypage.htm#part1 how can i get #part1? ...

Objective-c iphone App, problems with button to parsed hyperlink

Hi! Another problem for me with my application is a simple procedure. I want to have a button which, if you press, opens the link associated with the article in question. I have followed instructions that i understand, but I am having trouble understanding why the link will not work. - (IBAction)link:(id)sender { WebViewController *vi...

Using an NSString and UIImageView to load image from URL, failing on some URLs

I've got some code to load an image from a URL, it seems to work ok. Unless the URL contains curly brackets. This seems like it is a string formatting problem? I can't figure it out. ex @"http://site/image.png //works @"http://site/{image}.png //doesn't work NSString* mapURL = @"http://site.com/directory/{map}.png"; NSLo...

NSURL not working.

Hi, I wanted to ask if anyone could help he get this code to work. Nothing is showing up in my MySQL database. Thanks, enbr. NSString *urlstr = [[NSString alloc] initWithFormat:@"http://mysite.come/myapp/submitrating.php?name=%@&comment=%@&rating=%@", [selectedItem objectForKey:@"name"], comment.text, selecte...

How to test Radio url status ?

sometimes is up sometime is down, how to programmatic test that connection is available? ...

NSURL doesn't seem to want to accept my querystring...

Hi there I have this code NSLog(@"%@",URLRequestQueryString); NSString *sendToServerString = [NSString stringWithFormat:@"http://mydomain.co.uk/req.php%@",URLRequestQueryString]; NSURL *sendToServer = [[NSURL alloc] initWithString:sendToServerString]; NSLog(@"%@",sendToServer); NSLog(@"%@",sendToServerString); URLRequestQueryString is...

App loads on iphone4 but not on 3g..nil string parameter

Hey All, Please help..I am unable to figure out this wierd problem. My app has iAds and multitasking support. The app can be deployed onto the iphone and its running pretty fine but when I tried to deploy my app on iphone 3g(with iOS 3.1.2) it throws the following error on the console. I tried commenting out the code for iAds but not sur...

NSURLConnection or NSurl?

Hi, what is the difference between NSURLConnection and NSUrl? i mean if i am downloading a file, does it make and difference which one i use? Rgds for: NSString *myUrl = @"http://www.test.com/"; NSString *returnData = [NSString stringWithContentsOfURL:[NSURL URLWithString: myUrl]]; or NSString *myUrl = @"http://w...

Symbol not found: _OBJC_CLASS_$_NSURL error when launching on Mac OS X Leopard

I've just gotten a report from a user that a new build of my app crashes on his machine when he tries to launch it. The crash report is: Process: MyApp [222] Path: /Applications/MyApp.app/Contents/MacOS/MyApp Identifier: com.MyCompany.MyAppAppAndImporter Version: ??? (???) Code Type: X86-64 (Native...

Reading data from server script using URL

I am calling a login script on the server using http call from iphone. the script returns a string "Invalid" or "valid" based on given username/pswd. Here is what I am using: NSString *myurlstr = [[NSString alloc] initWithFormat:@"http://www.mysite.com/iph/login.aspx?username=%@&password=%@",uname,pswd]; NSString *resultstr = [NS...

_OBJC_CLASS_$_NSURL error with iPhone OS4.0

Hi, I have a OS3.1 project which now needs to be upgraded via SDK 4.0 But when I try to compile to a device runing 3.1 Im getting this linker error. dyld: Symbol not found: _OBJC_CLASS_$_NSURL Referenced from: /var/mobile/Applications/E93D0DD1-18EB-4D2E-B99E-23B74EBE42CC/RacingUK.app/RacingUK Expected in: /System/Library/Frameworks...

NSURL code to display an image from a sqlite table

Ii'm using this NSURL code to display an image. what I want to do is to insert a url from my database table in place of the static url shown in the code below: Does anyone know how I should proceed? NSURL *url = [NSURL URLWithString:@"http://www.nyapplecountry.com/images/photosvarieties/redrome04.jpg"]; UIImage *image = [UIImage imageW...

Check URL validity

Can someone confirm that checkResourceIsReachableAndReturnError method of NSUrl is working as expected. I have tried using it for known URLs and it is always returning FALSE. I am using XCode's iPhone Simulator 4.1. Thank you. ...