uiwebview

Multiple UIWebView WebCore Crashes

╄→尐↘猪︶ㄣ 提交于 2019-12-03 05:47:32
I'm embedding YouTube videos using the power of the YouTube Helper Library . However, we're seeing multiple crashes in production related to WebCore and a couple related to JavaScriptCore. It might be important to note that these crashes are only happening on iOS 12 devices. See below for details of some of the crashes: 1. VideoFullscreenControllerContext::rateChanged(bool, float) Thread 0 name: Thread 0 Crashed: 0 WebCore 0x000000024227c270 VideoFullscreenControllerContext::rateChanged(bool, float) + 308 (WebVideoFullscreenControllerAVKit.mm:396) 1 WebCore 0x000000024227c164

Add “Open in iBooks” to UIWebView

坚强是说给别人听的谎言 提交于 2019-12-03 05:20:18
问题 I am developing a wrapper application for a site. Basically, it opens mobile version of a site in UIWebView. Some links on the site point to PDFs. When the same site is opened in Safari and a link to PDF is tapped a nice black stripe with "Open in iBooks" is shown over the PDF. Like on the picture below: How could I implement the same looking stripe in my app? EDIT: I am not asking about how to create a black button on translucent background. I am interested in reproducing the whole workflow:

Get Notification when a video starts or stops in UIWebView

元气小坏坏 提交于 2019-12-03 05:20:18
问题 Hello i am new to objective - c I'm having a problem with the UIWebView and MPMoviePlayerController : My UIWebView has a movie inside the html (it's a local html file), I'm using html5 and a video tag for the video. I want a notification when video starts or stops in UIWebView .... I have tried using MPMoviePlayerPlaybackDidFinishNotification , but it doesnt fire ... I have also tried to make the my main UIViewController 's view a view of my own, and intercept -didAddSubview: and

UIWebView loadHTMLString shows blank screen

孤人 提交于 2019-12-03 04:53:40
I have a strange problem with UIWebView's loadHTMLString, where it would only display a blank view when I called loadHTMLString with my content HTML string. It does not matter what the content of the htmlstring is, it simply does nothing. The strange thing is that it used to work a few weeks ago, when I tested it on the simulator and device. My code is below: NSMutableString *sHtmlBuf = [NSMutableString stringWithString:@"<body style=\"background-color: #000000; color: #FFFFFF; font-family: Helvetica; font-size: 10pt; width: 300px; word-wrap: break-word;\">"]; if ([m_oCallArray count] > 0 ||

iPhone UIWebview — Saving an image already downloaded

狂风中的少年 提交于 2019-12-03 04:38:58
问题 I have an iPhone app with an embedded UIWebview (Safari) control. I'd like to be able to store the images from certain webpages locally. Can I programmatically access the path where UIWebview downloads images? Or do I need to parse the HTML and then go find the image resource out on the net and download it again? 回答1: I do not know if you can access the preloaded images from Safari's cache... However you can easily find the image URLs without parsing HTML, by running a bit of javascript

UIWebView Delegate get MIME Type

拜拜、爱过 提交于 2019-12-03 04:37:25
The UIWebView does not automatically support processing of Passbook .pkpass files. In this technical note , Apple recommend implementing a check via the UIWebViewDelegate methods to sniff out the MIME type and process it accordingly. To add passes using a UIWebView, implement the appropriate UIWebViewDelegate methods to identify when the view loads data with a MIME type of application/vnd.apple.pkpass However, I cannot find anything within the UIWebView Delegate Protocol Reference that is capable of providing the MIME type. I can successfully download and process files directly using an

Loading remote html in PhoneGap or Cleaver (Cordova) on iOS

只谈情不闲聊 提交于 2019-12-03 04:36:50
问题 I am using an Cordova 2.4 component Cleaver and an embedded view in my native iOS 6 application. So far I have managed to create the project structure, link the Cordova libraries and set up the Hello World app that does work providing "Device Ready" feedback. This is all great but it loads all html from the www repository distributed inside the app itself (including all js libraries). What I really want yo do is this: 1 - popup the cleaver component (which is nothing else than an embedded

iOS UIWebView intercept link click

☆樱花仙子☆ 提交于 2019-12-03 04:30:34
Is it possible intercept when a user clicks a link in a UIWebView and retrieve the link? I wish to block the UIWebView from going to the clicked link and do something else. Thanks in advance. Yes, look at the UIWebViewDelegate Protocol Reference , specifically webView:shouldStartLoadWithRequest:navigationType: The NSURLRequest will let you know where the link they clicked is going to direct them. You would simply return NO on this method if you want to prevent the request from loading. 来源: https://stackoverflow.com/questions/8437305/ios-uiwebview-intercept-link-click

UIWebView JavaScript losing reference to iOS JSContext namespace (object)

青春壹個敷衍的年華 提交于 2019-12-03 04:22:40
问题 I've been working on a proof of concept app that leverages two-way communication between Objective C (iOS 7) and JavaScript using the WebKit JavaScriptCore framework. I was finally able to get it working as expected, but have run into a situation where the UIWebView loses its reference to the iOS object that I've created via JSContext. The app is a bit complex, here are the basics: I'm running a web server on the iOS device (CocoaHTTPServer) The UIWebView initially loads a remote URL, and is

Creating an IPhone Map application

瘦欲@ 提交于 2019-12-03 04:01:41
How can i create a map application for Iphone . I know that UIwebView can be used to display map . But is there any native API available on IPhone(which the native iphone map application uses)? Look at the simple framework from CloudMade: http://developers.cloudmade.com/projects/show/iphone-api I use it in a simple app that I created to locate your position. It's in the App Store under PinDrop in the Navigation section. The framework is really rough, but it worked for what I needed. When 3.0 comes out, I'll updated to use the Google maps. Till then, it works. I think you'll have to wait until