uiwebview

What happens to cookies of webview on closing the application?

大兔子大兔子 提交于 2019-12-06 04:31:01
问题 i am using a webview in an app which has keep me signed in functionality like facebook app.so in order to implement i need that the cookie should be persistant.I just wanted to know whether ios persists the cookie by default when the app is closed or i need to save the cookie manually before closing the app to implement keep me signed in functionality. any help would be deeply appreciated. Thanks 回答1: You want to use a NSHTTPCookieStorage object to manage the cookies. The short answer to your

Clear the credentials from UIWebView

佐手、 提交于 2019-12-06 03:49:57
问题 What i am doing here is, fetching a URL which has authentication. Hence, i use the function - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; When it faces authentication, i present a UIAlertView to enter the username and password and if user has entered it correctly, this method is called. - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response; in this method, i make the login

UIWebView load fails with custom URL scheme

為{幸葍}努か 提交于 2019-12-06 03:43:22
I have a UIWebView that is handling an OAuth authentication flow in my app. The callback URL that the OAuth service uses points to a custom URL scheme I've set up in my app, let's call it mycustomurlscheme . So once the user authenticates successfully, the OAuth service redirects them to the URL mycustomurlscheme://oauth/success?oauth_token=xxxxxxxxxxxxxxxxxxxx&oauth_verifier=xxxxxxxxxxxxxxxxxxxx . When the UIWebView requests this URL, the app behaves correctly; namely, the application:openURL:sourceApplication:annotation: method in my app delegate gets called, and I dismiss the UIWebView and

UIWebView doesn't detect phone number links

北慕城南 提交于 2019-12-06 03:36:11
I'm building an app with a UIWebView in it. The webView should load html that includes tel: links: <a href="tel:123456789">call me</a> The webView doesn't make the "call me" link to be clickable. I tried webView.dataDetectorTypes = UIDataDetectorTypePhoneNumber But doesn't work. I looked in all the stackOverflow Q&A's and found no answer specific to this problem. Thanks for your help, Nur replace <a href="tel:123456789"> call me </a> with <a href="tel://123456789">call me</a> Hope it works for you. Below code worked for me Add the web view web = [[UIWebView alloc] initWithFrame:WEBVIEW_FRAME];

UIWebView landscape rotation does not fill view

夙愿已清 提交于 2019-12-06 03:15:46
问题 I am having an issue with my UIWebView. When the view loads it loads in either orientation fine, fills the whole page perfectly etc. However say if I load it in portrait then rotate the device the webview does not fill all the way across to the right hand side and I cannot for the life of me figure out why. This is my view did load method - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib if ([[UIApplication sharedApplication]

How to keep logged in session in UIWebview?

旧街凉风 提交于 2019-12-06 03:05:53
问题 I am using UIWebView in my app. I want to load a a URL on first webview, from that user can login his account. After login then User came out of the webview and do other stuffs in iOS native views. Later when he call the same URL, he must be logged in. How is it possible ? I hav seen this in Gmail when I logged in my account in one tab, and close it my GMAIl account is logged in safari whenever I open any tab. I have tried something below, but not working. Please suggest me a solution -(void

YouTube Embed player in Iframe doesn't work in iOS6

不问归期 提交于 2019-12-06 02:57:40
问题 I really need your help. Working on an iOS app. I want to play youtube. I understood from reading many many blogs and posts, that we need to use an iframe in order to play a youtube video. However, on some videos I get: " This video contains content from XYZ. It is restricted from playback on certain sites. Watch on YouTube " I read this question: Youtube in iOS5 - done button Tapped which gives the link to youtube api: https://developers.google.com/youtube/player_parameters They recommend to

iOS 7 UIWebView 304 cache bug, blank pages

最后都变了- 提交于 2019-12-06 02:34:09
问题 I have a problem I have discovered in my app that has a UIWebView. iOS 7 caches a blank body 304 response, resulting in blank pages being shown when the user refreshes the UIWebView. This is not good user expierience and I'm trying to figure out how to solve this on the iOS side, as I do not have control over how Amazon S3 responds to headers (that's who I use for my resource hosting). More details of this bug were found by these people: http://tech.vg.no/2013/10/02/ios7-bug-shows-white-page

User-Agent not changing in NSMutableURLRequest

心不动则不痛 提交于 2019-12-06 01:55:59
I know there may be several issues about this, but i´m facing a problem when i try to set a new "user agent" for my UIWebView . Here is what i am doing right now: NSURL *myUrl = [NSURL URLWithString:auxUrl]; NSMutableURLRequest *myRequest = [NSMutableURLRequest requestWithURL:myUrl]; NSMutableString *auxUserAgent = [[NSMutableString alloc] initWithString:[myRequest valueForHTTPHeaderField: @"User-Agent"]]; [auxUserAgent appendString:@"(iOS)"]; [myRequest setValue:auxUserAgent forHTTPHeaderField:@"User-Agent"]; NSLog(@"UA : %@",[myRequest valueForHTTPHeaderField: @"User-Agent"]); I am trying to

How can I change the UIWebView background color after sliding down UIWebView to fix the iOS7 status bar overlay issue?

依然范特西╮ 提交于 2019-12-06 01:06:13
问题 I'm writing a Phonegap 3.0+ app. There is an issue with the status bar overlapping views in iOS7 which user Ludwig Kristoffersson provided a working answer here Now that I have UIWebView with a 20px top margin, how can I change the UIWebView background color? I need the area behind the status bar to be the same background color as the "people" toolbar. I have almost no experience in Objective C, and have been looking through possible SO questions to find a working solution but with no success