I had been tried this library: https://github.com/stake/STWebArchiver
It's good, but if I access some web pages isn't well-formed, it would not be saved.
So, is there any way for me to try to save web page(s) as .webarchive on iOS devices?
Could somebody give me some advices?
Thanks a lot!
You cannot. UIWebView is not equal to the WebView class in Mac OS X. I recommend you try ASIWebPageRequest.
For Webpage not well formatted, the libxml parser(which is the original STWebArchiver using) is not a good solution. So I update STWebArchiver with Regular Expression
like this
NSArray *pathsForImagesAndScripts = [self extractResourcesWithHTML:htmlContent regex:#"<(?:script|img).*src=[\"']((?!data:).*?)[\"']"];
checkout: this
Related
Hi it's my first time using esp32-S2 because now its not recommended to use esp32. I'm looking for saving images in SPIFFS for my web server. In esp32 i used to use esp32fs plugin (https://github.com/me-no-dev/arduino-esp32fs-plugin) but it doesn't work for esp32-S2. I would like to know if there is any plugin like esp32fs and if not how can i save my images (I'm using arduinoIDE 1.8.19). I've been searching but i didn't found anything. Any orientation is welcomed. Thank you for your time and assistance.
You can try my ESP32_FSWebServer_DRD or ESP_FSWebServer example of ESP_WiFiManager library
Follow the instructions in ESP_FSWebServer Example
You can use either deprecated SPIFFS or the better LittleFS
i have been using an url launch that open sygic and drives to coordinates n my website.
It looks like this: com.sygic.aura://coordinate|15.06591|47.73341|drive
After the last Sygic update this url launch does not work anymore, it fires up Sygic but no route is calculated any longer.
Does anybody have som ideas to overcome this?
Is there anyone else that hava this problem and found a solution for it?
This is what i tested with iPad Air 12.5.3, Sygic Version 20.4.5
All of Sygics custom url: https://www.sygic.com/developers/professional-navigation-sdk/ios/custom-url
I contacted the Sygic Support. Here is their answer:
Thank you for contacting Sygic.
We apologize for the inconvenience. You're using the legacy format which is no longer supported in the latest release. Instead of this format, universal links can be used.
For your use case, you can use:
https://go.sygic.com/directions?to=latitude,longitude
I have used FB.ui - apprequests method. Everything is working fine. My app for french people.
So, how to change the language using any parameters?
You have to call the JS SDK with the correct locale, see https://developers.facebook.com/docs/javascript/gettingstarted/#params
I have solved my problem. I have faced a localization problem.
From the beginning, I have used https://connect.facebook.net/en_US/all.js script.
Based on my needs, I have used https://connect.facebook.net/it_IT/all.js.
Issue fixed..Thanks CBroe. :)
Well, I would just like to know is it possible to know the path of the app? I used the following code
[NSBundle mainBundle] executablePath];
It retrieved the below value. That is correct.
/var/mobile/Applications/FBE187F1-256D-495D-852B-53AECD4F4C23/Test_Data_Fetch.app
And I would like to know, is it possible to check the existence of other app? The problem is FBE187F1-256D-495D-852B-53AECD4F4C23 this particular directory value changes for every app. I would really like to know if it is possible!!
Your application cannot access anything outside sandbox so you can't search file system directly for a given application.
One possible solution is if application you are interested in handles custom url scheme, then you can check if that url scheme can be opened:
NSURL *url = [NSURL URLWithString:customScheme];
BOOL appProbablyExists = [[UIApplication sharedApplication] canOpenURL:url];
Update: This article describes several possible approaches, but it seems there's no definite way to get list of installed applications using public API
Finally, using the Mac program iExplorer we can look at any App’s data. This is not related to my question, though it is quiet useful!! Was able to achieve my goal!! :]
I have a Webview that must load an image! When I upload this image I see every time the same image as before, and i must reboot my app to see the new image...
I think is a cache problem..How can I solve that??
One quick and easy method would be to append the current time stamp onto the url whenever you load it.
So instead of loading:
http://www.myhost.com/myimg.jpg
you'd load
http://www.myhost.com/myimg.jpg?12345689
Using a cache breaker like this is a very common method in web development to force reloading of content.
I did do some quick googling and it appears clearing out NSURL's cache won't do the trick. In 10.6 the api reloadFromOrigin: may do the trick, but I'm not aware if this has made it's way onto the iphone yet.
Edit:
I found this page in the docs. It looks like you can use the preferences system to say whether or not to use caching. Not tested, but that'd be something to look at.