I can confirm that this is a bug with IOS 12.5 and Apple have been very sneaky and fixed it in the simulator so you need a real device.
It's a known bug in IOS. Apple "fixed it" in IOS 13.
The OverrideURL will return Success = False and URL = ""
You need to move the files you are loading into the WebView into DirTemp for it to work.
NB you also need to ensure any webpage images are moved to DirTemp as well as the html files.
Since DirTemp can be emptied by the OS at any time, you need to check files are present and re-stock the DirTemp if they have been emptied!
Do watch when moving graphics from DirAssets - I wrote code to copy all my PNG files from DirAssets to DirTemp and it worked fine in debug mode.
However, in release mode, it crashes as it tried to copy some AppIcons that contain "@" in the filename and the IOS said no!
This was really hard to track down as it crashed my app before anything appears - I needed iReleaseLogger running in the Simulator.
The difference between debug/release is due to the virtual assets folder used in debug mode, which does not contain those AppIcons.
Lessons I learned:
- Get friends/relatives to donate their iPhone from the back of their kitchen drawer that's on an old IOS and don't update it.
- Don't rely on running your app in a few Simulator IOS versions to be confident it will work on any phone.
- There are a good % of iPhone users still on IOS <13 either because of worries about battery depletion with newer IOS or because iPhone 5/6 won't upgrade (6s is the oldest model that will upgrade to 13/14).
- When you have 10's of thousands of happy users, that's a good number of users sending you crash reports at best, or submitted poor reviews at worst.
- I have built in a menu that allows users to email me bugs. This adds to the email message the Device Model name, IOS version and LastException.Message. This was the clue when I had mysterious bug reports that caused the program to display a white page and failed to work - the Webview was blank and the empty OverrideURL URL entry meant the app also failed to setup correctly. After several emails, I spotted they were all on 12.5.4.
- Getting users to email you bugs also gives you the option to ask them to help fix it using TestFlight so you don't have to keep releasing new versions to the AppStore.
- Finally, make sure you compile with a release version onto the simulator and real phones and don't just rely on debug mode testing.
I hope that helps other users.
Allan