0

Am new to iphone dev. I want authenticate a user before he goes to real portal through safari. I heard that we can not access safari;s cookies space to add a cookie... this is not working as well, may be can not run javascript... url in safari

Setting a cookie in an iPhone App

any workaround..

thanks us

Community
  • 1
  • 1
Deam
  • 1,007
  • 2
  • 17
  • 36

2 Answers2

0

Why don't you use a PHP script, create a session that will timeout in idk 2 minutes? and use that to authenticate

Antwan van Houdt
  • 6,989
  • 1
  • 29
  • 52
  • Why PHP? Why not Ruby on Rails? Why not Django? Why not ASP.net? Why not Sinatra? Why not C? Why not Objective-C? Why not a custom socket application piped to a [Malbolge](http://en.wikipedia.org/wiki/Malbolge) app in two directions? –  Mar 01 '11 at 15:35
  • @RadekS you mad? He wants to authenticate using safari, seems to me like a login form. So why not use PHP? – Antwan van Houdt Mar 01 '11 at 15:38
  • There are different things than only PHP. PHP is good, but this is not the only possibility. :) –  Mar 01 '11 at 15:39
  • well i want to authenticate but NOT exactly using safari, user should be auth b4 it goes to the url... – Deam Mar 01 '11 at 16:17
  • @RadekS you dont need to post such a weird comment then. Ofcourse there are many other technologies, you could even make your own webserver / scripting language. – Antwan van Houdt Mar 01 '11 at 17:19
0

If you control the website's protocol, you could pass information from an app to Safari by embedding it in the URL that the app uses to launch Safari, and have the site pass it back to Safari.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
  • no control over that, i just know the cookie info that has the sessionId. if i wud have then u meant that i should do somthing like [launch safari : @"http://mysite.com?username=sd&pass=asd".... ? – Deam Mar 01 '11 at 16:15