0

I want to open a url which I have already logged into in Chrome, and this line of code successfully opens it in Chrome:

[[NSWorkspace sharedWorkspace] openURL:url]

However the source page is not coming through using this line of code:

NSString *webSource = [NSString stringWithContentsOfURL:url usedEncoding:&encoding error:&error];

Is there any special case with this. How can I get the view page source programatically?

Jsdodgers
  • 5,253
  • 2
  • 20
  • 36
ramo
  • 609
  • 2
  • 8
  • 14
  • For a browser connection that has authentication, if you're not seeing a session ID or some other unique identifier thing as part of the URL, then there's almost certainly some token or authentication bits being set via a cookie in your Chrome browser which can't magically transfer to your native app. – Michael Dautermann Jul 29 '13 at 23:40
  • find out if there's a way to pass along the authentication token via a parameter in the URL, which you can then incorporate into the URL you pass to your program. – Michael Dautermann Jul 30 '13 at 01:48

0 Answers0