iOS7 UIWebView wont load page, but it loads on iOS6 - ios

I have an app with multiple webViews, on iOS6 it loads perfectly (sometimes I have to manually refresh the webviews content, and it works fine), but on iOS7 (the same code, the same sdk-ios7sdk) the webViews loads the first time, then if i hit refresh i get -999 error code, if i navigate to a page, then refresh the webviews data, then go back to view the webview, it works...
Here's the error message:
Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed.
(NSURLErrorDomain error -999.)" UserInfo=0x9ba3220
{NSErrorFailingURLKey=file:///Users/jakaba/Library/Application%20Support/
iPhone%20Simulator/7.0/Applications/.../myapp.app/page.html,
NSErrorFailingURLStringKey=file:///Users/jakaba/Library/Application%20Support/
iPhone%20Simulator/7.0/Applications/.../myapp.app/page.html}
Any idea?
Thank you in advance!

I would look at this question:
How do I fix NSURLErrorDomain error -999 in iPhone 3.0 OS
The error code you're seeing is caused by two simultaneous requests on the UIWebView. This can be caused by a couple of things. Is your HTML doing any redirects? How are you loading the content into the UIWebView?
Anyway, take a look at the question I've linked to and see if it helps you. As to why you're seeing this on iOS 7 and not 6 - WebKit is improved in 7, and you may be encountering a race condition you didn't before due to speed.

Related

Receiving error: {"status":-1,"error":"The operation couldn’t be completed. No space left on device"} using 'cordova-plugin-advanced-http'

I have recently been receiving the following error from 'cordova-plugin-advanced-http'.
{"status":-1,"error":"The operation couldn’t be completed. No space left on device"}
Using this plugin within my project, most of the time, all API calls are successful, however, sometimes, I receive this error message. Not on any particular API call either. I can't for the life of me figure out why nor have I found much online to narrow the problem down.
The project uses:
Ionic 6.19.1
Capacitor 3.5.1
Angular 13.3.8
I have recently updated all three frameworks because this problem was occurring on older versions too but updating them has not resolved the issue.
All devices using my project are iPads (IOS).
Has anyone come across this problem before, know why I am receiving this error, or know how to fix the issue?
Thank you in advance!
UPDATE
The device is printing the following error when a call fails with the above error code:
finished with error [28] Error Domain=NSPOSIXErrorDomain Code=28 "No space left on device" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask
Solution
Hey team - came across a similar post, where the answer solved my problem. Check it out if you're stuck on in similar situation:
https://forum.ionicframework.com/t/downloading-appflow-update-on-ios-gets-to-16-then-errors-with-the-operation-couldn-t-be-completed-no-space-left-on-device/222534

UIDocumentInteractionController only shows file name and size when previewing

I have a very weird situation. My app tries to preview a pdf file using UIDocumentInteractionController and it sometimes works and other ones don't. I can not see any difference when it works and when it doesn't.
Some clues:
The file is big (> 45 MB). With smaller files it works
The file exists and the url is correct (checked before trying to preview it)
Some memory warnings appear. But they also appear sometimes than UIDocumentInteractionController is able to open the file. So I don't think it's related
I'm testing on devices (iPad running iOS 8, but base sdks of app is iOS 7), not in simulator
The only warning I see always that it doesn't work and I don't see when it works is the following:
: Received unkown error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo=0x14583dd0 {Message=Service Connection Interrupted}
In order to narrow the problem I've done an app that the only thing that it does is to preview a file. After testing I've discovered:
On iOS 7 it always works perfectly
On iOS 8 sometimes it works, but if you try with bigger files (>100 MB) it doesn't work
It seems an iOS 8 bug, but if any of you have any idea it would be really appreciated.

AFNetworking 1.3.1 often goes to failure Block in iOS 8

I'm using AFNetworking to upload some content to server using AFHTTPRequestOperation. It is working good in iOS 7 but in case of iOS 8 mostly this call goes to failure.
I'm getting this error:
Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.), NSErrorFailingURLKey.
Can you please help me to resolve this issue?
NSURLErrorDomain error -999 is NSURLErrorCancelled
You can review the error codes here
You might get this error due to a request timing out, or resubmitting the same request more than once. Without further code there isn't much to expand on, but have you ensured that you haven't lost your wifi settings since upgrading to iOS 8?
BTW you can use NSErrorFailingURLKey to find the failing URL - try putting it straight into Safari and see what happens
Your issue is being discussed here :
https://github.com/AFNetworking/AFNetworking/issues/2314
it seems to be related to keepalive implementation in iOS8, no solution available on client side for now, if you can configure the http server, disabling http keepalive should solve your issue ...

iOS 8 custom keyboard crash when debugging

Issue
Most times, when I try to debug my custom keyboard extension, I receive the following error and then the keyboard disappears (presumably crashes, so the system removes it from screen and replaces it with the standard keyboard)
plugin com.db.Trype.TrypeKeyboard interrupted
(Note: Trype is the name of my keyboard.)
Process
I am debugging the keyboard the following way:
I have the keyboard extension as a target.
I've modified the TrypeKeyboard scheme to run my app executable on launch.
The keyboard has been added in the Simulator's Settings App.
I've tried different version of Xcode-Beta and tried restarting the simulator, computer, etc., all to a varying degree of temporary success.
Anyone else run into this error and have a suggestion?
Update:
Here is an accompanying error message. Maybe there is some way to print out more of the UserInfo?
viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3
"The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)"
UserInfo=0x7fc99c900a50 {Message=Service Connection Interrupted}
After messing around with it some more, I'm beginning to conclude this is an iOS 8/Xcode bug with the way that extensions are debugged.
Xcode sometimes seems to build project and install multiple versions of the extension keyboard into the iOS simulator. It also occasionally kills the extension and reloads it. Very strange behavior. Just sitting and staring at the debugging sidebar shows it get killed (disappear) and then relaunch.
The first is a successful launch.
The second is an unsuccessful launch where the extension appears to hang and wait to attach.

RTCReporting & pancake.apple.com errors

Yesterday I updated Xcode to Version 5.1 (5B130a); the simulator's version now reads Version 7.1 (463.9.41).
Today I started getting these weird errors when beginning playback using AVPlayer. I have never seen any such errors in the past, can't find any info about them, and have no idea what they mean. They are not fatal and I haven't noticed any ill effects from them. But…
What is RTCReporting and how did it get into my project?
What does pancake.apple.com have to do with anything?
Etc. Thanks.
2014-03-21 16:16:34.129 0.1[3330:5403] RTCReporting: resolve from http://pancake.apple.com/bags/hls?version=4.12
2014-03-21 16:17:17.201 0.1[3330:5403] RTCReporting(getSvrConfig): error resolving with lookup server http://pancake.apple.com/bags/hls?version=4.12
2014-03-21 16:17:17.201 0.1[3330:5403] RTCReporting(getSvrConfig): sendSynchronousRequest error Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x10f110d60 {NSUnderlyingError=0x11230ed80 "The request timed out.", NSErrorFailingURLStringKey=http://pancake.apple.com/bags/hls?version=4.12, NSErrorFailingURLKey=http://pancake.apple.com/bags/hls?version=4.12, NSLocalizedDescription=The request timed out.}
2014-03-21 16:17:17.202 0.1[3330:5403] RTCReporting: can't get storebag from the server
UPDATE: I had not previously noticed any harm from this, but now my app is hanging (in simulator) for about 5 seconds while I'm just getting an item ready for playback (before I've pressed play). Here's what the debug navigator shows if I press pause during the hang:
When the app unfreezes after 5 seconds, just the following is logged:
RTCReporting: resolve from http://pancake.apple.com/bags/hls?version=4.12
A note on "answers":
I'm looking for non-obvious explanation related to the questions I posed.
This seems to be a problem with trying to play videos on the simulator. I've had this problem for months now, and just ran into it again today when I was trying to play video on my simulator.
The solution, while not great, is to use an actual device instead of the simulator for testing video playing.
I always encounter this issue if I've got an Exception Breakpoint enabled when I play a video. If I disable it then it works fine. I've submitted a bug report to Apple also.
This seems to be a problem with trying to play videos on the simulator.
I solved by quiting other audio or video playing from my system.
You need use:
[player play];
after you sound play in the real device and in simulator.

Resources