Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by happySuzhou

  1. Hi, I believe it is getting on for 18 months since a Community Edition of Delphi was released... I'm working on getting a completely free App into the AppStore - an App with absolutely no tracking - but App Store Connect is now warning me for TestFlight that "starting April 26, 2021 iOS apps submitted to the App Store must be built with the iOS 14 SDK or later, included in Xcode 12 or later." I'm really grateful to Embarcadero for the Community Edition. But I find it really hard to keep up with Apple development. And I wonder whether there are any workarounds for getting my App to build on Xcode 12 instead of Xcode 11.5. (I can live without debugging on iOS. I just want to be able to generate an IPA file that can be submitted via TestFlight.) IDE Delphi Community Edition 10.3.3 MacOS Catalina I wonder whether a new Community Edition is coming? If anyone has managed to get 10.3.3 to compile for iOS14, please help! I daren't update my iPad from 13.5 unless I know it will really work. Best wishes!!
  2. Since upgrading to Big Sur, if an attempt to connect to the REST service fails, the App quits unexpectedly. For example, this happens if the user does not have WiFi open and tries to connect, or if the user cannot access the server (i.e. if the server is temporarily unavailable). On previous versions of MacOS, the exception was handled correctly inside the App. Is there something I need to add to plist or something? Or has anything network related been phased out? (The App is developed using Delphi 10.3.3 Community Edition with TRestRequest and executeasync; on Catalina and earlier the ACompletionHandlerWithError is called and the exception handled there). I believe the error being thrown is Runtime Error 231. (I am very new to Apple Development, so apologies if I have missed an obvious place to search for information on this!) There are no issues on Android, iOS or Windows or previous MacOS; only Big Sur.
  3. Well, I have managed to sort out a work-around for my own situation. It won’t make my App acceptable for the App Store (as it can’t handle network connection issues properly on Big Sur), but it means I can get things working pretty reliably. My problem mainly seems to be that Delphi 10.3.3's TRestRequest can't handle network connection problems on Big Sur. So to make sure the internet is available, it is possible to use Kastri’s straightforward TConnectivity.IsConnectedtoInternet (DW.Connectivity), and I by letting the user choose how the connection is made initially, I can try to maximize the availability of the server. If they try to access a server that isn’t available, it will still close the App without warning, but I’ve worked on the defaults and it's the best I can do for now. (Pre-Big Sur and on other platforms, it can automatically try another server as the network exceptions can be handled). Through the process, I’ve learnt a bit about how to call Mac API, and some of the great things Kastri has to offer. If anyone does know how I can do a MacOS / iOS quick connection to see if a specific server is available (something quick and easy like the terminal’s “nc -G 2 -Z myhost.address.com 443”), that would really help me until Delphi Community gets a new release. Not being able to debug directly on a Big Sur machine, makes it rather tricky!
  4. I'm using the Community Edition to make non-commercial free apps which my students (not from Computer Science) also like to use, especially on MacOS. I'm not teaching Delphi programming, so at the moment I don't think educational licenses match my situation. But I don't get any income from programming. I think the main issue is likely to be related to Delphi calling URLConnection rather than URLSession from Mac's API in versions prior to 10.4. It seems that the App works fine unless there is an exception related to a connection problem (which can no longer handled). Other than a work-around involving a dialog asking "Are you really connected to the internet?" , I wonder whether I could try calling NSURLSession from my App first with very basic parameters (url + port) and then if the App got Error -1200 (SSL Error), I would know the connection from TRestRequest (with all the SSL parameters) would be highly likely to succeed. It means an additional round-trip on Big Sur, but I think my users would prefer a slight pause to the app disappearing if they don't have WiFi open! (I'm assuming that if the SSL error is raised, the connection has successfully found the machine is connected to the internet, managed to look up the IP address for the url, and made an initial connection - so the server is accessible). I can find links explaining how to use NSURLSession in C and Swift, but I find it all a bit baffling... (https://stackoverflow.com/questions/40016361/nsurlsession-request-and-response) Could anyone point me to how I could make a few lines of Delphi Code to try NSURLSession with a URL and port with a short timeout, and then ideally calling a success procedure if the error is -1200 SSL Error, or a failure procedure if the error is anything else (-1009 internet offline or -1001 Time out, etc.). (Sorry, this isn't intended to be a "please write me some code" tread; I'm just feeling stumped by depreciated networking protocols for MacOS in Community Edition of Delphi 10.3.3; I'd like to try calling NSURLSession directly, perhaps based on something like TMacHTTPClient.DoExecuteRequest from 10.3.3, but I don't know where to start for using the .wrap, .alloc, etc. for NSURLSession). Or if there is any other 10.3.3 Delphi component that will try to open a url and port and not close the App if it fails on Big Sur, that would be great. (Of course if 10.4.1 is released for the Community Edition soon, that might solve all my problems!)
  5. A fix for 10.3.3 Community edition would be really highly appreciated!!! Could anyone explain a work-around to fix this specific issue? I've tried using NetHTTPRequest to check the connection first, and I get the same problem. I'm going to have some unhappy students in March if I can't fix this. 😞