I'd like to use NSURL's parameterString method to parse out the parameters of a URL I've been passed. It says URL must conform to RFC 1808 but now wondering if ours do?!? We use something like:
http://server/path/query?property1=value1&property2=value2
but RFC 1808 never mentions the ampersand (&) as a valid parameter separator (...
I have a rather unusual issue here. The code below is running fine and the data is sending to the source fine, but none of the NSURLConnection triggers are returning anything. The only items being logged are in the function that the request is sent in. Any ideas?
// code starts above here
NSData *myRequestData = [ NSData dataWit...
I have the following string...
NSString *googleSearchString = @"http://www.google.com/search?q=lyrics+%22Tænder+På+Dig%22+%22Jakob+Sveistrup%22";
Notice that it has some accented characters. When I try to turn that into a url the returned url is null...
[NSURL URLWithString:googleSearchString];
So normally the url works except when...
I'm working through Cocoa smoothly, but this problem seems so basic it cancels out all the cool stuff I learned. :/
I have a generated file path, and it needs to be in NSURL format. From research, this is the code I wrote:
NSLog(@"Old path = %@", pathToFile);
NSURL *xmlURL = [[[NSURL alloc] init] fileURLWithPath:pathToFile];
NSLog(@"Ne...
When Connected:
I have a simple HTML page with some image elements that reference images in a subdirectory as in (src="images/someimage.jpg"). This page displays fine when accessed remotely via an internet connection.
When Offline:
I store the above HTML page locally to the apps documents directory for offline viewing. The local HTML...
I'm using an OpenPanel to get a file path URL. This works:
[oPanel beginSheetModalForWindow:theWindow completionHandler:^(NSInteger returnCode)
{
NSURL *pathToFile = nil;
if (returnCode == NSOKButton)
pathToFile = [[oPanel URLs] objectAtIndex:0];
}];
This doesn't, resulting in an 'assignment of read-only variable' error:
NSUR...
I posted a much longer question a few minutes ago, and as it usually goes as soon as I posted it I realized what was going on, so I deleted it since most of the post was irrelevant. Then I went back to Google.
Turns out I'm having almost the same exact problem as described in this post, unanswered from June. http://www.iphonedevsdk.com/...
Hi,
I have an NSURL:
serverCall?x=a&y=b&z=c
What is the quickest and most efficient way to get the value of y?
Thanks
...
I am using the new NSURL bookmark data API introduced in OS X 10.6 to store an "alias" to a file system resource. When I use
+[NSURL URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:]
to resolve the bookmark data, I get nil if the file no longer exists. Since I am not passing NSURLBookmarkResolutionWithoutUI...
Hello,
I have a strange behave:
After making a few changes in my code, I got an unasked URL in the NSURL. Actually, this URL was valid in a test I made yesterday, but the system remembers this URL and I cannot changed it even in another app.
When I strted a new app with the followung code:
int main(int argc, char *argv[]) {
NSURL ...
I want to check if an NSString is a valid URL so I can parse it to an NSURL variable... is there an easy way to do this? :)
CRASH
For some reason the app crashes when checking.....
NSURL *shortURL = [[NSURL alloc] initWithString:data];
if(shortURL == nil)
{
NSLog(@"INVALID");
}
else {
NSLog(@"COOOL");
}
The console gives me t...
If you call:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://test.com"]];
it seems to automatically quit your app -- bypassing the dealloc, viewDidDisappear, or any other functions.
Is there a way to put any code between this call and the Safari (or Phone or Email) launch, without having to put a timer before...
Im researching the best plan of attack for creating a form that gathers information from the user and sends this dates to a server.
I thought I would run my thinking past you all and get some feed back.
To create the actual form I plan on using a table view and navigation controller much like the from used to create a new contact in the...
I am downloading some very large data from a server with the NSURLConnection class.
How can I implement a pause facility so that I can resume downloading?
...
Hello community,
i have the following problem sometimes my openURL-Dialog works perfectly, then i looked at the variable from the url and that is the variable:
www.brehm-gmbh.de
but some other times there are some crazy elements at the end of the variable like this:
www.adamczyk-fenster.de%E2%80%8E
i get this pages from an .asc fi...
Hi!
I have a NSManagedObject subclass named Tour. I stored the reference to it using this code:
prefs = [NSUserDefaults standardUserDefaults];
NSURL *myURL = [[myTour objectID] URIRepresentation];
NSData *uriData = [NSKeyedArchiver archivedDataWithRootObject:myURL];
[prefs setObject:uriData forKey:@"tour"];
Now I want to retrie...
It seems dead simple, as to create an NSURLConnection I usually do this:
NSURL *theURL = [NSURL URLWithString:urlString];
NSURLRequest *req = [NSURLRequest requestWithURL:theURL];
NSURLConnection *connection = [NSURLConnection connectionWithRequest:req delegate:self];
But how can I get the URL back in the delegate methods? Short of ha...
I have a large data set (some 3500 objects) that returns from a remote server via HTTP. Currently the data is being presented in an NSCollectionView. One aspect of the data is a path pack to the server for a small image that represents the data (think thumbnail for simplicity).
Bindings works fantastically for the data that is already r...
Ok ! Coming to the point directly.
What I want to do is explained as follows.
I have an url of MP3 file. ( for example Sound File )
Now, When user starts application.
Download should start & for that I have implemented following methods.
-(void)viewDidLoad {
[super viewDidLoad];
NSURL *url=[NSURL URLWithString:@"http://xyz.pqr.com/ab...
I am trying to launch the App Store without launching Safari with all the redirects and I am getting an error about "Request for member 'iTunesURL' in something not a structure or union."
I am new to a lot of this so thank you for being patient with me. I think it has something to do with me calling "self.iTunesURL" since it doesn't th...