We just upgraded to Xcode 7 and when we run our e-reader app in a simulator with 9.0 it crashes in WebCore
WebCore::FrameView::contentsSizeRespectingOverflow:
We have to turn through a few pages (10 or 20) to reproduce it. The strange thing is I can't reproduce it on a device or when running on simulator with 8.4.
I know it helps to set the scalesPageToFit property of UIWebView to NO, but we are already doing that.
Has anyone else seen this issue and was able to come up with a work-around?
Thank you
Same here. That is my radar. Please also file one.
It might have been fixed in 9.1 beta 4 but I am getting a memory related crash in my test app on that version.
I have this issue too (I see in crashlitycs) but I can't reproduce it - I'm still work on it. Do You have any progress ?
I find this issue, maybe Yours:
https://openradar.appspot.com/22889402
------------------------------------------------------------------
Probably I find working workaround.
I create new viewcontroller object only once, and switch off scale for pages that have own mobile version. Issue happen when uiwebview want scale page and page is originally fit for screen - when website is "big" issue not happen. But that I say - probably.
In crashlitycs I dont have this issue for 4 days, but this is not long time, so we will see.
Related
Further to my earlier question
Migrating iOS Hybrid App from UIWebView to WKWebview
I have made good progress and only have a few loose ends to tidy up. The overall performance improvement over UIWebView is outstanding.
In UIWebView it was possible to set the focus on a text field programatically using
webView.keyboardDisplayRequiresUserAction = NO ;
However this is not available in WKWebView and ever since 2016 programmers have been developing an updating work arounds (swizzles) to overcome this.
I have tried implementing the latest of these I could find on Stack Overflow, which I found at https://stackoverflow.com/a/55344531/5948260
However as I am very inexperienced at coding in XCode please could someone tell me exactly how I add the above solution to my project. I have tried in vain to find examples of how exactly to do this i
on GitHub or elsewhere but to no avail.
So far I have tried copying the code provided in the above answer into a .m file and adding it to my project, but I got 20 or so errors, I then added an import statement for Foundation and most of these went away but XCode complained that it did not know what class WebViewInjection is. Also must there be a corresponding header file?. Must there be a corresponding interface statement? How does the method defined in the answer get invoked?
As I could not answer any of these, I also tried adding the method into my ViewController class. Whilst this was accepted with no errors, it had no effect on my app, ie. the keyboard did not come up automatically.
I would also want the webview to resize to appear above the keyboard and not to scroll to where the text field is as this seems a very messy solution to me.
All help very gratefully received.
I have now managed to get the keyboard displayed by adding
[self allowDisplayingKeyboardWithoutUserAction];
to viewDidLoad
I kept the allowDisplayingKeyboardWithoutUserAction method declaration inside my ViewController but changed the + infront of the method declaration to a - and this seems to have worked.
I still do not know how to resize the webview when the keyboard is displayed.
I'm testing my app on an iPod Touch running iOS 9 (on iOS 8.4 it was working for other functions: FaceTime, copy to contacts, etc.). I have a textview with phone number detection and I receive the following error:
Warning: Attempt to present <_UIRotatingAlertController: 0x16250e00> on whose view is not in the window hierarchy!
Assertion failure in -[UITextView startInteractionWithLinkAtPoint:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3505.16/UITextView_LinkInteraction.m:377
Any fix to this?
Not a perfect solution but very simple and may help a desperate developer:
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange {
[[UIApplication sharedApplication] openURL:URL];
return NO;
}
You will lose the Copy, Open URL, Cancel popover on long press but you SHOULD at least be able to open url same as you would previously. In iOS 9, this still opens a browser window inside your app for standard URLs (which is nice).
This seems like an Apple bug (posted to radar already).
We were seeing very similar error when trying to open links in a modal view since Apple is trying to display a new modal alert view. Outside of modal view data detection worked just fine in iOS 9 for us.
This looks quite similar to a bug we recently had to fix for PSPDFKit where presenting sheets did not work when the rootViewController was already presenting another controller. (Is your rootViewController maybe not set?)
You can read the source code here. This might help you to figure out where the issue is for you:
https://gist.github.com/steipete/b00fc02aa9f1c66c11d0f996b1ba1265
And please dupe rdar://26295020 so this will get hopefully fixed in time for iOS 10. (The bug exists since iOS 8 and was first reported on iOS 8b5.)
I've created small library containing a custom window/stage to use for all my applications to have a constant and uniform look.
Basically it's just a undecorated stage with a AnchorPane which contains the customized Minimize/Maximize/Close and Resize controls.
The only problem is the method which is performed when the Minimize button is pressed. Nothing happens when running the app on my main system (Arch Linux), it looks like the application is frozen, here's a visual example:
Example image uploaded on Imgur, haven't got enough reps yet to post images
Minimize method code:
void minimizeWindow() {
window.setIconified(true);
}
On Windows 7 x64 everything works fine, the application gets iconified and also can be enlarged again.
I think this is a bug in JavaFX itself or a compatibility problem with GTK3.
Someone know how to fix this problem or got a workaround for this until this officially gets fixed?
Thanks in advance.
This is a known issue. This has already been fixed but there are few related left-overs jiras and this fix will be most-probably released with Java 9.
The release may be pushed forward, depending on the fix of the other related bugs.
You can view the details and follow up the same here :
[Linux] Stage.setIconified(true) not working with TRANSPARENT or UNDECORATED stage
We're currently developing an Xbox One and a Windows 8.1 app, which share the same codebase, and I'm running into an issue with the 'pointerover' (or hover-state) in of a listView item in the WinJS.UI.ListView.
The listview item has an eventListener, pointerover. However, this only seems to work on the first 10 items in the WinJS.UI.ListView although I see 16 items on screen, and the WinJS.UI.ListView gives me:
indexOfFirstVisible = 0
indexOfLastVisible = 15
The eventListener my listItem has, is:
mediaTile.element.addEventListener("pointerover", function (that) {
that._allItemsListView.currentItem = { hasFocus: true, index: this.tileIndex };
}.bind(mediaTile, this));
When I add a breakpoint, it get's hit but only for the first 10 items although there are 16 items on screen.
Does anyone know what I'm missing here?
Thanks in advance!
My guess is you're getting bitten by ListView visualization. Perhaps tiles higher than 10 don't yet exist when you bind your event listener, but they appear on screen quickly enough that it isn't obvious.
I'm not expert enough to advise a concrete way around this. Conceptually you could listen for an event when new items are added to the list (on the list itself) and then add your pointerover event to the new items.
Yes, that seemed to be the case when you look at it from a distance; another developer took over, and we also migrated from WinJS 1.0 to WinJS 2.0, which seems to solve a lot of these problems.
Up until today I'm not sure what the exact problem was; we also played with the fetch limit of the datasource and this also seem to have played a part in solving the problem.
I'm sorry I can't be more thorough in my answer; I would have to ask the developer (if he still remembers) what the problem was, but afaik the major improvement was moving to WinJS 2.0.
I am using this line of code to start the Video Component:
videoComponent = VideoComponent.createVideoPeer("capture://video");
The code I have works perfectly on a Nokia phone but I have another phone by OLG and this line always fails. Both "capture://video" and "capture://image" don't work.
Does anyone know how to find out whats the proper string to put there or all the possibilities?
I would search it but I don't know what to type into Google.
VideoComponent in LWUIT 1.5 had many bugs and since LWUIT is effectively abandoned it will probably never be fixed and never really worked well. With Codename One we migrated to a more traditional Media approach, I would recommend migrating to Codename One.