uiwebview

Web Audio API with IOS and Phonegap causes crash on resume from background

吃可爱长大的小学妹 提交于 2020-01-05 07:33:11
问题 This might be a shot in the dark but here it goes: I have an HTML5 game running great on iPhone using Phonegap. I added audio using Web Audio API (which as of ios 6 is supported). This too works well, except when I exit the app then re-open the app (from being "Backgrounded"). Upon resuming, the app now pauses then crashes. Some other info I first noticed this after using the howler.js framework for audio. I removed this and tried the most basic barebones example of Web Audio API and the

iOS - web view cookies not set

て烟熏妆下的殇ゞ 提交于 2020-01-05 05:54:10
问题 I am trying to set cookies in my iOS like this: let url = URL(string: "url")! let jar = HTTPCookieStorage.shared let cookieHeaderField = ["Set-Cookie": "key1=value1, key2=value2"] let cookies = HTTPCookie.cookies(withResponseHeaderFields: cookieHeaderField, for: url) jar.setCookies(cookies, for: url, mainDocumentURL: url) let request = URLRequest(url: url) viewerWebKit.load(request) Then I am printing them like this: viewerWebKit.configuration.websiteDataStore.httpCookieStore.getAllCookies( {

UIWebView does not persist authentication on iOS3.2/iOS4

夙愿已清 提交于 2020-01-05 04:57:13
问题 I made an application that uses UIWebView to display a site that uses basic authentication. It stopped displaying the content since iOS3.2 (on both iPhone and iPad). My approach for authenticating users are: create a NSURLConnection implement didReceiveAuthenticationChallenge to provide the credential implement didReceiveResponse to receive the response and load the request in a UIWebView, i.e. [webView loadRequest:] Ever since iOS3.2, the authentication was broken; UIWebView doesn't seem to

webViewDidFinishLoad not being called with loadHTMLString

元气小坏坏 提交于 2020-01-05 04:52:31
问题 So this loads when the app launches NSString *youTubeVideoHTML = [NSString stringWithFormat:@"<html><head>" "<meta name = \"viewport\" content = \"initial-scale = 1.0, user-scalable = no, width = 200\"/></head>" "<body style=\"background:#FFFFF;margin-top:0px;margin-left:0px\">" "<div><object width=\"320\" height=\"200\">" "<param name=\"wmode\" value=\"transparent\"></param>" "<embed src=\"http://www.youtube.com/v/%@&app=youtube_gdata\"" "type=\"application/x-shockwave-flash\" wmode=\

uiwebview height calculation in swift

混江龙づ霸主 提交于 2020-01-05 04:32:49
问题 i have a scrollview and want to add multiple webviews dynamically into it. need to get height of webview. i have used below code. but it does't work always.some times showing wrong height. func webViewDidFinishLoad(aWebView: UIWebView) { let screenSize = UIScreen.mainScreen().bounds let screenWidth = screenSize.width var frame = aWebView.frame frame.size.height = 1 frame.size.width = screenSize.width aWebView.frame = frame let fittingSize = aWebView.sizeThatFits(CGSizeZero) frame.size =

iOS UIWebView totally fails to understand more than one @font-face?

血红的双手。 提交于 2020-01-05 04:11:27
问题 Notice this simple css/html which is being displayed in a local UIWebView: there's the simulator showing it... Notice there are two @font-face definitions. But ... only the second one works. If you swap them around, only the second one works. So here ... @font-face { font-family:'aaa'; src: local('SourceSansPro-Regular'), url('SourceSansPro-Regular.ttf') format('truetype'); } @font-face { font-family:'bbb'; src: local('SourceSansPro-BoldIt'), url('SourceSansPro-BoldItalic.ttf') format(

How to call https url in uiwebview (swift)?

纵饮孤独 提交于 2020-01-04 14:22:50
问题 I have https url with self-sign certication in UIWEBView ,but it does not work. Error is NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)... how can I to allow any certication in uiwebview by swift Do you have any idea that fix this problem? 回答1: i find a way to do this,but i think this is not a good way. step 1------use NSURLConnection in override func viewDidLoad(){} section request = NSURLRequest(URL:url) let urlConnection:NSURLConnection = NSURLConnection

UiWebView delegate methods not getting called

≯℡__Kan透↙ 提交于 2020-01-04 08:22:14
问题 I am trying to play youtube embedded video in webView it plays when i don't set delegate and If i set delegate video dosen't load and delegates methods are also not getting called. Here is MY Code: .m class #import "EmbeddedVideoVC.h" @interface EmbeddedVideoVC (){ MBProgressHUD *hud; } //@property (weak, nonatomic) IBOutlet UIWebView *webView; @property (weak, nonatomic) IBOutlet UIView *viewSelf; @property (strong, nonatomic) NSTimer *controllersTimer; @property (assign, nonatomic)

UiWebView delegate methods not getting called

爱⌒轻易说出口 提交于 2020-01-04 08:21:09
问题 I am trying to play youtube embedded video in webView it plays when i don't set delegate and If i set delegate video dosen't load and delegates methods are also not getting called. Here is MY Code: .m class #import "EmbeddedVideoVC.h" @interface EmbeddedVideoVC (){ MBProgressHUD *hud; } //@property (weak, nonatomic) IBOutlet UIWebView *webView; @property (weak, nonatomic) IBOutlet UIView *viewSelf; @property (strong, nonatomic) NSTimer *controllersTimer; @property (assign, nonatomic)

autofill username and password in an HTML page opening in UIWebView

那年仲夏 提交于 2020-01-04 06:23:45
问题 How to find login form using RegsEx when using UIWebView to autofill data ? I have used following code to get all form data: int NoOfForms = [[self.browser stringByEvaluatingJavaScriptFromString:@"document.forms.length"] intValue]; NSMutableArray *formData = [[NSMutableArray alloc] initWithCapacity:0]; for (int i = 0 ; i < NoOfForms ; i++) { // total number of elements in each form int elementsInForm = [[self.browser stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document