ToddFrankson 0 Posted July 16 So, I have been working on a multi platform project, that has worked fine on Windows Android and IOS. IOS just updated to 17.5.1 The code works fine Prior to the update, but not after. I use TNetHttpClient to do a get of a web page. Prior to the Get, a Head returns just fine, to ensure internet access. I made a simple sample of the code. tap a button to initiate the Get and load the same page in a Twebbrowser. Can anyone text the attached code and tell me why the Get doesn't "get"? And why it works fine Prior to 17.5.1, and on all other platforms?? When the button is clicked, the Webbrowser browses the page, and the memo never gets filled. AndroidManifest.template.xml Entitlement.TemplateiOS.xml info.plist.TemplateiOS.xml Project1.deployproj Project1.dpr Project1.dproj Project1.dproj.local Project1.dsk Project1.identcache Project1.res Unit1.fmx Unit1.pas Share this post Link to post
Rollo62 529 Posted July 16 Have you set the NSAppTransportSecurity and other Flags in the info.plist, according to your needs? Here is a sample, for various settings: <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <!-- Example for >= iOS 9 --> <key>NSExceptionDomains</key> <dict> <key>example.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSExceptionRequiresForwardSecrecy</key> <false/> </dict> </dict> </dict> Share this post Link to post
ToddFrankson 0 Posted July 16 53 minutes ago, Rollo62 said: Have you set the NSAppTransportSecurity and other Flags in the info.plist, according to your needs? Here is a sample, for various settings: <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <!-- Example for >= iOS 9 --> <key>NSExceptionDomains</key> <dict> <key>example.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSExceptionRequiresForwardSecrecy</key> <false/> </dict> </dict> </dict> I never had to set anything before. Especially in the sandbox. Share this post Link to post
Dave Nottage 552 Posted July 16 8 hours ago, ToddFrankson said: Can anyone text the attached code and tell me why the Get doesn't "get"? I'm unable to reach that URL at all. Share this post Link to post
ToddFrankson 0 Posted July 16 11 minutes ago, Dave Nottage said: I'm unable to reach that URL at all. Interesting. It's a local county government page. Share this post Link to post
ToddFrankson 0 Posted July 16 Can Anyone else get to this website https://gis.cravencountync.gov/images/activebookings.html ? Share this post Link to post
JonRobertson 67 Posted July 17 (edited) 4 hours ago, ToddFrankson said: Can Anyone else get to this website https://gis.cravencountync.gov/images/activebookings.html ? I can from Windows 10. I don't have an iOS device to test. Edited July 17 by JonRobertson Share this post Link to post
Der schöne Günther 316 Posted July 17 6 hours ago, ToddFrankson said: Can Anyone else get to this website https://gis.cravencountync.gov/images/activebookings.html ? That site seems geolocked to the US, I only get an error 403. GeoPeeker - A tool for viewing sites from different geographic locations Share this post Link to post
Rollo62 529 Posted July 17 (edited) 7 hours ago, ToddFrankson said: Can Anyone else get to this website https://gis.cravencountync.gov/images/activebookings.html ? Nope. This link works https://www.cravencountync.gov/263/GIS-Mapping but clicking from there into https://gis.cravencountync.gov/ doesn't work on Windows 11. Ok, I'm not living in USA, so maybe some kind of IP-blocking? Edit: Yes, after VPN I can reach this from Windows. https://gis.cravencountync.gov/images/activebookings.html Edited July 17 by Rollo62 Share this post Link to post
ToddFrankson 0 Posted July 21 So, I have figured out my problem. Please alter the code with a web page you can hit. It seems that IOS No longer likes Getdocumentspath....A Stringlist failed to write to it, using Assign and reset failed to open or read the file.... All in development mode. Can anyone check this? Share this post Link to post
Dave Nottage 552 Posted July 21 2 minutes ago, ToddFrankson said: It seems that IOS No longer likes Getdocumentspath....A Stringlist failed to write to it, using Assign and reset failed to open or read the file... Your example code does not have any calls to Assign or Reset. Having said that, why are you using long deprecated file access methods? TStringList has LoadFromFile and SaveToFile methods. It might help to show an example that focuses just on GetDocumentsPath and the file access parts, if that's what is failing Share this post Link to post
ToddFrankson 0 Posted July 21 (edited) 14 minutes ago, Dave Nottage said: Your example code does not have any calls to Assign or Reset. Having said that, why are you using long deprecated file access methods? TStringList has LoadFromFile and SaveToFile methods. It might help to show an example that focuses just on GetDocumentsPath and the file access parts, if that's what is failing The failure Occurs in the code i posted with the Stringlist.SavetoFile. No ERROR PRESENTED. I had to wrap almost everything with message Dialogs to find the failure. I tried Assign /reset just on a whim . I have attached a new unit.pas. On line 92 & 93 put a URL you know you can get too. Unit1.pas Edited July 21 by ToddFrankson Share this post Link to post
Dave Nottage 552 Posted July 21 24 minutes ago, ToddFrankson said: The failure Occurs in the code i posted with the Stringlist.SavetoFile. Using a URL I can reach, the code works fine for me Share this post Link to post
ToddFrankson 0 Posted July 21 15 minutes ago, Dave Nottage said: Using a URL I can reach, the code works fine for me Ios 17.5.1? 17.5 sdk? Share this post Link to post
Dave Nottage 552 Posted July 21 (edited) 1 minute ago, ToddFrankson said: Ios 17.5.1? 17.5 sdk? Yes, to both. Have you tried another URL? Edited July 21 by Dave Nottage Share this post Link to post
ToddFrankson 0 Posted July 21 1 minute ago, Dave Nottage said: Yes, to both. Have you tried another URL? Yes, several files. Everytime I get a cannot write..... user doesn't have sufficient rights error, only displaying when I specifically show the error in a message. When I remove the try except, the file doesn't exist to open. I just spent the day on the main project, using message dialogs to find this out. I am now using temppath. Share this post Link to post