iphone web app ignores cookies when added to home screen - iphone

I have a mobile web app that uses cookies to keep a user logged in. Works fine in safari but when added to the home screen this is ignored, making users log in every time they start the app. Anyway around this?
Thx

This looks like a promising solution: http://rubygems.org/gems/rack_iphone_web_app

Related

Cannot get back to my app after posting to facebook/twitter

I have developers working on the backend of my app using phonegap and once the user clicks facebook/twitter share a browser pops up and you can log in and share but after
that you cannot escape back to the app, if you get out of the apps altogether then try and return to my app you're right back at the facebook/twitter screen instead of in my app. This is only happening on iphon because on android they have a back button. The only way to get back into the app is to restart the iphone/ipod to get back to open
the app from beginning. I cannot have this as the only option for
people to share from my app as it would be horrible and could ruin my
app before I launch it. They say their is no way to fix it but Im sure its fixable so I am trying to get any info on this that I can.
The other issue is the facebook post itself. currently it post like this
Sent from Appname(with link to app)
www.appname
Text here
but this is kinda counter intuitive because the actual message should
be on top otherwise it will get lost in the other text. They said
this is the only way facebook allows it. Is it possible to get it like this
Text here
Sent from appname(linke here)
www.appname.com
Again any help on these two issues would be great so I can pass the
info to my developers.

Mobile facebook login not logging in iPhone users?

I've got to be doing something very obvious wrong here, because I just can't bring myself to believe that facebook's mobile login isn't working correctly for iPhone users. If you have a look at these urls, you'll see that they work (after you replace the 'YOUR_APP_ID' and 'YOUR_REDIRECT_URL', of course) in web browsers & Androids, but on iPhones (3s and 4s) they take you right into facebook and you never see the Extended Permissions page or get redirected:
https://graph.facebook.com/oauth/authorize?type=user_agent&client_id=YOUR_APP_ID&redirect_uri=YOUR_REDIRECT_URL&display=wap&scope=email,user_location,read_friendlists,publish_stream,offline_access
https://m.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_REDIRECT_URL&scope=email,user_location,read_friendlists,publish_stream,offline_access
I mean, I'm sure they tested their mobile login stuff on an iPhone, right? Anyone know what I'm doing wrong?

Can an iPhone app generate web clips?

The safari browser lets you add an icon to the home screen as a bookmark to whatever webpage you happen to be on. I would want to do that same thing, but in an app I develop. So basically, the user would launch the app, do a bunch of stuff and somewhere along the way, a web clip would be created and pushed to their home screen (with their consent of course). Is this possible, or is it a feature exclusive to the Safari browser? It seems like this sort of thing could be done, but it also seems like it could be viewed as spam and therefore a reason for Apple to reject the app outright. Is this sort of thing feasible? If so, I would be very thankful for a link on where I could read up on how to go about it.
It seems unlikely that the iOS app security sandbox would allow an app to directly add web pages to the home screen.
Best bet might be to upload the webpage to some site, and then launch Safari with a URL to the webpage on that site, after requesting that the user manually "clip" that site using Safari.

iOS - being logged-in in a webView after logging in with the SDK

I'm building an iPhone app that has some social features. I've managed to get the user to log-in to Facebook within my application.
I've also implemented a webview that loads a facebook iPhone-optimized page. What I now want to do is my user to be logged-in within the webview without having to log-in twice (once in the app and once in the webview)
I've tried a few things playing around with the access_token in the URL but it didn't work.
Does anyone know if it is possible to implement that and how to do it?
Thanks in advance for your help
Short answer: You're probably not supposed to be able to do that.
The idea is that your app should only store an authentication token that lets you do stuff as your app (e.g. post to the wall as your app). On the web version, the user is logged in to facebook and facebook additionally passes an authentication token to your website; on the iOS version, I think you never get the Facebook session cookie, and I'm pretty sure you need the Facebook session cookie to be logged in to the web side of things (especially since it's designed for the browser — logging out of Facebook logs you out of Facebook Connect on all sites).
There are loads of things you can do to work around this — it's trivial to just ask the user for a username/password (and the whole idea of a "trusted UI" inside a UIWebView inside your app is flawed, despite Facebook's claims).
The "right" thing to do is to implement everything using calls to the iOS SDK so you don't have to bother with the web side of things.
were you testing your app on the simulator or on the device? The reason i ask is because im trying to get the app to stayed logged into fb which it does, sorta...it still pops a fb dialog saying it logged in fine and the user has to click on an OK button.
I havent had time to test it on the device but i think it may have to do with the fact that with the OAuth 2.0, with 3.2.x or >...if the fb is installed, it uses the fb-app login but if its not installed it uses the safari web login.
Since simulator doesnt have the fb app installed, it actually uses the safari web login (i humbly deduced) which would otherwise store a cookie and maybe it doesnt do so on the simulator..dunno, im still looking for the answer on that one :)

iPhone Bookmarks and Session variables (User has to log in twice)

I'm creating a web application meant to be viewed by iPhones, Blackberrys etc. My problem is that, when an iPhone user adds a link to the app on their home screen, they have to log in twice.
The cycle goes like this:
User bookmarks the app's homepage
User later goes to the homepage
They are brought first to the log in screen
After logging in, they are taken to the app's homepage
As soon as they click a link, Safari opens a new window in which they are brought to the log in page again
After logging in this time, everything works as normal
It seems like a problem with Session variables, though I can't seem to find any sort of elegant solution for it.
Also, the server is running ColdFusion.
Would it be possible to drop a cookie when the user first logs in?