-
Content Count
1613 -
Joined
-
Last visited
-
Days Won
37
Posts posted by Dave Nottage
-
-
I figured this would be easy..
I'm working on an app that needs to read data from a com port - this I have code for. I'm having trouble finding something (that actually works), that can "simulate" data being sent to the port so that it can be read from the app. Simulation is needed because I'm remoting to the machine in question and I'd rather avoid having to (or for someone else to) go to where the machine is to connect a device that might not even be suitable.
I have come across this: https://www.aggsoft.com/com-port-emulator.htm, however I'm unable to work out exactly how it is supposed to emulate (when clicking "Start", it prevents anything else from accessing the port) or it's just not suitable anyway.
I used to work on apps over 20 years ago (using Delphi 3) that did this kind of thing, but we had the luxury of having the actual hardware with us. That's about how long it has been since I've done this kind of thing.
-
In the Entitlements section of the Project Options, ensure that "Secure File Sharing" is checked.
-
4 hours ago, OmarPerezH said:Best way, 1- Export SDK from Delphi IDE Tools->Options->SDK Manager select SDK and export and import it in the new Delphi IDE
That the export option exists had slipped my mind.. I'll update my article; thanks!
-
7 hours ago, Bert-Jan said:I upgraded Xcode to 12, my iPhone to iOS 14
You'll find you won't be able to debug with a device that has iOS 14.0. Deploying will work; just not debugging.
7 hours ago, Bert-Jan said:Going back to SDK 13.6 does not help so I guess this has to do with Xcode.
Because Delphi does not import the iOS 13.6 SDK correctly, either (as well as iOS 14.0). Use iOS 13.5 SDK if you can - it comes with Xcode 11.5. I wrote about it here:
https://delphiworlds.com/2020/08/using-a-prior-ios-or-macos-sdk-with-delphi/
-
16 hours ago, PavelX said:Thank you very much Dave, but when I try to compile I get the following linker error (Delphi 10.4.1)
Sorry, I remember now that I did not obtain them from there. Trouble is: I cannot remember exactly where I obtained them, however I've now added them here:
https://github.com/DelphiWorlds/Kastri/tree/master/ThirdParty/OpenSSL/1.0.2o/iOS
-
2
-
-
-
I expect you'd need to patch the TBaseWebViewDelegate.AuthenticateForHost method in FMX.WebBrowser.Delegate.Cocoa unit, and pass the username and password instead of using TDialogServiceAsync.InputQuery.
I'd recommend submitting a feature request in the Quality Portal for an OnAuthenticate (or similarly named) event to make this easier.
-
I've already answered your email, but for the benefit of others:
On iOS, you can check what the user has authorized with:TCLLocationManager.OCClass.authorizationStatus
which will return one of the following values:
kCLAuthorizationStatusAuthorized = 3; // User has authorized location services ("always" on iOS 8+) kCLAuthorizationStatusDenied = 2; // User denied authorization for your app, or they turned off location services in the device settings, or the device is in airplane mode kCLAuthorizationStatusNotDetermined = 0; // App is yet to request permission for location services kCLAuthorizationStatusRestricted = 1; // User is unable to authorize location services due to restrictions such as parental controls kCLAuthorizationStatusAuthorizedAlways = kCLAuthorizationStatusAuthorized ; // See kCLAuthorizationStatusAuthorized kCLAuthorizationStatusAuthorizedWhenInUse = 4; // User has authorized location services only when the app is in use
(from iOSapi.CoreLocation unit)If your app needs location services and the status is kCLAuthorizationStatusDenied, you could present a message asking if they would like to change the settings, and if they do, execute OpenSettings:uses Macapi.Helpers, iOSapi.Foundation, iOSapi.UIKit, iOSapi.Helpers; function UIApplicationOpenSettingsURLString: NSString; begin Result := CocoaNSStringConst(libUIKit, 'UIApplicationOpenSettingsURLString'); end; procedure OpenSettings; begin TiOSHelper.SharedApplication.openURL(TNSURL.Wrap(TNSURL.OCClass.URLWithString(UIApplicationOpenSettingsURLString))); end;
This will take them to the Settings app, and show the settings specific to your app (there may be a little delay in it changing to the settings for the app)
-
1
-
-
I've been using it for the past few days. The main issue at the moment is that Delphi does not import the iOS 14 SDK correctly, so it cannot be built against.
Related issue: debugging on an iOS device with iOS 14 is hosed. Deploying works, debugging does not.
-
1
-
1
-
-
You appear to have 2 certificates on the Mac that are the same. Perhaps one is expired. To check this, on the Mac in Applications/Utilities, run the Key Chain Access app, ensure that expired certificates are listed by clicking Show Expired Certificates in the View menu, and select login in the Keychains list, and My Certificates in the Category list:
For any expired certificates, right-click them and click "Delete"
-
36 minutes ago, Gary Wardell said:What is the Bundle Identifier and how do I find out what it should be
The bundle identifier needs to match the identifier given to the App Id that was created for the application on the Apple Developer website, e.g I created this one for testing Firebase Cloud Messaging (for myself - you need to use your own):
The convention is to use reverse domain notation (if you have one), or at least something that should be globally (literally) unique.
This is also the App Id that you would have enabled Push Notifications for:
-
I expect this is not going to be possible, however I thought I'd ask just in case someone has a brainwave of some kind.
I'm working on a DLL which implements a virtual channel for Windows terminal services, and a desired function is for it to be able to "self-update". It fetches a file which is the new version of the DLL, and is supposed to "move" the file in-place.
Needless to say I've tried to make it work, with the inevitable "access denied" errors when either attempting to rename the original file then replace it, or just copy over it.
-
Please refer to:
https://quality.embarcadero.com/browse/RSP-30989
It has been happening to me, however I had not reported it as yet. I had also planned to attempt to debug the issue - perhaps Thomas can?
-
Without having the source of the project (or a reproducible example), it might be difficult to discover what the problem is
-
-
3 hours ago, Rollo62 said:I do a project clean UserTools.proj is gone
Doesn't happen to me.
-
12 hours ago, Dave Nottage said:Yes
Note to self:
doubletriple check where the DLL is being loaded from 😞 -
2 hours ago, dummzeuch said:Are you using the new DLL for 10.4.1 ?
Yes
-
I'm getting the blank Grep window, too.
-
52 minutes ago, Martifan said:I can send you the apk, if you want or interesting
You could send it if you like, however I think it may be resolved only by seeing the code being executed at startup. You can direct message me the source if you like. I will treat it in confidence.
-
Seems to be stuck in an eternal loop. Does it work as an .apk? What exactly are you doing with Firebase in the app?
-
25 minutes ago, PavelX said:Indeed environment User Permissions has no effect
It will not work if you do not have the permissions checked in the project options.
-
Can you give a link to the app on Play Store?
-
The following worked fine for me:
procedure TForm1.Button1Click(Sender: TObject); begin PermissionsService.RequestPermissions(['android.permission.READ_EXTERNAL_STORAGE', 'android.permission.WRITE_EXTERNAL_STORAGE'], procedure(const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>) begin // NOTE: I am assuming the user granted permission, here! CreateFolder; end ); end; procedure TForm1.CreateFolder; var fn: string; begin fn := TPath.Combine(TPath.GetSharedDocumentsPath, 'OLA'); ForceDirectories(fn); if TDirectory.Exists(fn) then Button1.Text := 'OK' else Button1.Text := 'Failed'; end;
Delphi 10.4.1, Android 11 device (Pixel3a)
-
1
-
Olevariant and memory leak
in General Help
Posted
Looks more like a fix for: https://quality.embarcadero.com/browse/RSP-23095
Two birds with one stone (perhaps unintentionally)?