-
Content Count
1424 -
Joined
-
Last visited
-
Days Won
32
Everything posted by Dave Nottage
-
TidHTTP under FMX for android does not work
Dave Nottage replied to JohnLM's topic in Network, Cloud and Web
Up until a few months ago, I was using them (for my client) on Android devices with version 4.4. Exactly. -
No comment. Oh wait.. that was a comment 😉
-
TidHTTP under FMX for android does not work
Dave Nottage replied to JohnLM's topic in Network, Cloud and Web
Please refer to this SO link: https://stackoverflow.com/questions/37105600/error-could-not-load-ssl-library-on-android-with-tidhttp -
I'm not sure what is unclear about it. The method takes a single parameter that is an object method with a single parameter that is a TBitmap: https://docwiki.embarcadero.com/Libraries/Alexandria/en/FMX.Maps.TMapScreenshotRecipient i.e. you would declare a method on an object (such as the form that contains the MapView), and pass that when calling Snapshot, e.g: procedure TForm1.SnapshotRecipient(const ABitmap: TBitmap); begin // Do whatever you will with ABitmap, here end; ..and call Snapshot like this, for example: MapView1.Snapshot(SnapshotRecipient)
-
I agree.. it's rather odd to receive promotional emails but not for notifications about updates/patches.
-
Delphi 11.2: Android Debug Monitor no longer works
Dave Nottage replied to Bart Kindt's topic in General Help
Monitor is deprecated, and does not support Java 9, which is what the default JDK (that Delphi installs) uses. There are alternative logcat viewer apps, such as Device Lens (which I created), and there are some others listed here. -
Does the App ID you are using have Push Notification entitlement?: You set this on the Apple Developer website. If you have not already set this entitlement, after you do so you will need to recreate the Provisioning Profile
-
Well, that's the aim. It's one of either stick with the batch files (which is complicated to use), create a completely external tool (less complicated), or include it in an expert such as Codex (hopefully fairly simple to use). The aim is also to have the process generic so that it can be applied to other projects when needed. There's a link to a Quality Portal report in the readme which is essentially asking for the process to be included in Delphi itself.
-
You can be a guinea pig for this potential fix: 🙂 https://github.com/DelphiWorlds/Playground/tree/main/Demos/Biometric Please read the readme for details.
-
I've created a gist here, but also including it in this post: unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Controls.Presentation, System.TypInfo, Macapi.ObjectiveC, Macapi.Helpers, iOSapi.UIKit, iOSapi.Foundation; type IShakeView = interface(UIView) ['{21B0BCE6-8D07-40BA-943C-DC4B1A99D3CA}'] function canBecomeFirstResponder: Boolean; cdecl; procedure motionBegan(motion: UIEventSubtype; withEvent: UIEvent); cdecl; procedure motionEnded(motion: UIEventSubtype; withEvent: UIEvent); cdecl; end; TShakeView = class(TOCLocal) private FOnShake: TNotifyEvent; procedure DoShake; function GetView: UIView; procedure InitView; protected function GetObjectiveCClass: PTypeInfo; override; public { IShakeView } function canBecomeFirstResponder: Boolean; cdecl; procedure motionBegan(motion: UIEventSubtype; withEvent: UIEvent); cdecl; procedure motionEnded(motion: UIEventSubtype; withEvent: UIEvent); cdecl; public constructor Create; procedure BecomeFirstResponder; property View: UIView read GetView; property OnShake: TNotifyEvent read FOnShake write FOnShake; end; TForm1 = class(TForm) Label1: TLabel; Button1: TButton; procedure Button1Click(Sender: TObject); private FShakeView: TShakeView; procedure ShakeViewShakeHandler(Sender: TObject); public constructor Create(AOwner: TComponent); override; destructor Destroy; override; end; var Form1: TForm1; implementation {$R *.fmx} uses FMX.Platform.iOS; { TShakeView } constructor TShakeView.Create; begin inherited; InitView; end; procedure TShakeView.InitView; var LView: Pointer; begin // Using a zero-sized rect because this view won't actually be seen LView := GetView.initWithFrame(CGRectFromRect(TRectF.Empty)); if GetObjectID <> LView then UpdateObjectID(LView); end; procedure TShakeView.BecomeFirstResponder; begin GetView.becomeFirstResponder; end; function TShakeView.canBecomeFirstResponder: Boolean; begin Result := True; end; procedure TShakeView.DoShake; begin if Assigned(FOnShake) then FOnShake(Self); end; function TShakeView.GetObjectiveCClass: PTypeInfo; begin Result := TypeInfo(IShakeView); end; function TShakeView.GetView: UIView; begin Result := UIView(Super); end; procedure TShakeView.motionBegan(motion: UIEventSubtype; withEvent: UIEvent); begin // end; procedure TShakeView.motionEnded(motion: UIEventSubtype; withEvent: UIEvent); begin if withEvent.subtype = UIEventSubtypeMotionShake then DoShake; end; { TForm1 } constructor TForm1.Create(AOwner: TComponent); begin inherited; FShakeView := TShakeView.Create; FShakeView.OnShake := ShakeViewShakeHandler; WindowHandleToPlatform(Handle).View.addSubview(FShakeView.View); Button1Click(Button1); end; destructor TForm1.Destroy; begin FShakeView.Free; inherited; end; procedure TForm1.Button1Click(Sender: TObject); begin FShakeView.BecomeFirstResponder; Label1.Text := 'Waiting for shake'; end; procedure TForm1.ShakeViewShakeHandler(Sender: TObject); begin Label1.Text := 'Shaked me!'; end; end.
-
After Update 11.2 libsqlite.a not found IOS
Dave Nottage replied to schaumermal's topic in Cross-platform
Please read Darian's answer. It applies to any of the featured files for simulator. -
WindowInsetsControllerCompat is part of AndroidX: https://developer.android.com/reference/androidx/core/view/WindowInsetsControllerCompat Being able to use AndroidX with Delphi 10.4.2 would be an immense task - I started down that road, and ended up abandoning the idea. Delphi 11 supports AndroidX, however you would still need to import (e.g. using Java2OP) the WindowInsetsControllerCompat class as it is not in the Android RTL units in Delphi 11. Given the example you linked to, you'd also need to import ViewCompat, and perhaps other classes as well.
-
You appear to be using an Intel-based Mac. Support for iOS Simulator is for M1 or M2 based Macs only.
-
As Steve said, try a blank app. Either way, use a debugger to see if you can find where the crash occurs
-
I'm interested to know how, since they both use the same folder, i.e.: Program Files (x86)\Embarcadero\Studio\22.0, same registry root etc
-
Delphi 11.2, Xcode 14, iOS 16 SDK. PAServer 13.2.11.7
-
A blank app starts fine, here. You could try using the debugger?
-
Is it failing? If so, what's the response? Also, please show how you are encoding the image to base64. If using TNetEncoding.Base64, you may encounter problems because it inserts line breaks by default, which may not be what the API is expecting.
-
The uninstall didn't remove the AppData\Roaming\Embarcadero\BDS\22.0 folder. Delete the AndroidManifest.xml file in that folder, and restart Delphi. You'll also need to delete the AndroidManifest.template.xml file from your project, and rebuild.
-
Well, I guess you could decide not to cross the street in case the Wonder Of The Seas passes through
-
Given my experience, I would trust it. The times where there has been a binary compatibility issue between updates has been very rare, and rectified soon after, if it happened at all.
-
{$IF Declared(RTLVersion111)} {$IF Declared(RTLVersion112)}
-
There was a "quick fix", however my preference is for something long-term, which I happen to be working on right now. You could try adding this jar to the Android Libraries in the project, however bear in mind the app may still fail depending on what other resources Delphi might deploy.
-
I'm wondering what happens if your machine goes down or restarts during the timer interval.