Jump to content

Dave Nottage

Members
  • Content Count

    1559
  • Joined

  • Last visited

  • Days Won

    36

Everything posted by Dave Nottage

  1. You do not have that. Please provide a complete example, that has the correct spelling of implementation, and the declaration for TFooBase, e.g. unit Unit2; interface type TFooBase = class; TFooBaseClass = class of TFooBase; TFooBase = class end; TFooA = class(TFooBase) end; TFooB = class(TFooBase) end; //Then in another class type TBar = class public function FindFooByClass(AFooClass: TFooBaseClass): TFooBase; end; implementation function TBar.FindFooByClass(AFooClass: TFooBaseClass): TFooBase; begin end; end. Which incidentally, compiles. Also, please just ask your question in one group.
  2. Given the content of the links, to create Delphi code for what you want to do does not seem trivial.
  3. Can you provide links to the code and information you're referring to?
  4. Dave Nottage

    Adroid WRITE_EXTERNAL_STORAGE Delphi 12.3

    I expect it's not Delphi 12.3 that's the problem, but the version of Android on the device that you're running the app on. See here. It would help to know the location of the folder you're trying to create.
  5. Actually, there is more to this. If you need access to files other than audio, images and video that are not created by your app, you would need to use the relevant action(s), as described here. This kind of thing is implemented in the FilesSelector feature in Kastri.
  6. It depends on the folder. If it's private to the app (e.g. via TPath.GetDocumentsPath) then TDirectory.GetFiles will work. If the folder is shared (as are those that you listed), then a method similar to what is in the demo could be used, i.e. via ContentResolver.
  7. I've created a demo in my HowTo repository. It also demos a way of accessing the contents of the files, since you cannot use the "traditional" methods of accessing the files in Delphi.
  8. Looks like I was wrong about that. Compiling the FCMBaseDemo in Kastri, using the Firebase iOS SDK v11.11 succeeds using Delphi 12.3. Might have been another SDK I was thinking of 🙂
  9. After a conversation I have had with someone with the same problem, it seems it is due to a bug in earlier versions of the Firebase iOS SDK. The implementation in Delphi uses v6.28, and the latest version is v11.11, so it is quite a way "behind". Due to a linker issue in Delphi 12.1 and earlier, the latest version of the Firebase iOS SDK that can be used with it is v10.8. Delphi 12.2 can use at least v11.2, however I believe the linker starts failing again sometime before v11.11 (I'd have to check this). Having said all that, even if you download one of the later versions of the Firebase iOS SDK, there's a number of changes that would need to be made to Delphi source code in order to make it work. Alternatively, the FCM implementation in Kastri could be used, which is known to work with Firebase iOS SDK v11.2.
  10. It may be a misconfiguration of the SDK settings in Delphi. What value do you have for SDK API level location?
  11. It shouldn't, since Delphi itself inserts a provider tag in the resulting AndroidManifest.xml for example when using Secure File Sharing (enabled in the Entitlement List in Project Options).
  12. Not sure if this may have been affecting it, however you have an extraneous space in the android:authorities attribute, i.e. just before: %package%. Can you take out the provider tag to see if that really was required?
  13. You would need to add the provider node of that manifest.xml to AndroidManifest.template.xml inside of the application tag, but remove the: tools:node="merge" attribute, and replace: ${applicationId} with: %package% Which Delphi should replace with your package identifier in the resulting AndroidManifest.xml
  14. Dave Nottage

    Android only shows the FMX logo for my app

    Yes, Android 8.0 has a bug that prevents the Delphi debugger from starting. One solution is to upgrade to Android 8.1, if you can.
  15. Dave Nottage

    Job Bruxelles hybride

    Même chose 😄
  16. If it's just data synchronization, is not user initiated, and you want it in Delphi code, you may be stuck.
  17. This kind of background task scenario calls for using a Worker descendant, which is yet to be supported in Delphi. Location monitoring in the background is achievable with Delphi, however capturing location events cannot be at defined time intervals - they occur (oddly enough) when the device location changes. You could however check what the time is when a location update occurs, and if it is close enough to your defined time, take action then. If no location update is available at a defined time it could be assumed that the device is stationary. I had been struggling for some time to implement location updates in the background in a reliable way, however with this latest demo in my Playground repository, it has become the most reliable yet. The next step is to be able to have it start at boot time, which unfortunately in newer versions of Android requires user interaction.
  18. Dave Nottage

    Delphi 12.2 Android Debugging - EXTREMELY SLOW

    The debugger for Android has been unusable* for me for some time now. I have learned to live with using log statements and a logcat viewer, such as Device Lens. *I guess that aligns with not being able to debug on iOS, too.
  19. Dave Nottage

    Delphi, MacOS and dmg file

    Personally, I create .pkg files - using the create installer function of Mosco.
  20. Dave Nottage

    app crash on ios

    Using a value of slDynamic for FDPhysSQLiteDriverLink1 EngineLinkage works for me
  21. Dave Nottage

    app crash on ios

    Sorry, I had that backwards - static linking causes the issue, or at least it did in the early days. When I have time, I'll check which way around it is, and/or whether or not it will work at all.
  22. Dave Nottage

    12.2 and 12.3 on same machine

    No. Why would you want to?
  23. Dave Nottage

    app crash on ios

    Yes, you need to use static linking: https://docwiki.embarcadero.com/RADStudio/Athens/en/Connect_to_SQLite_database_(FireDAC)#Driver_Linkage
  24. Dave Nottage

    Delphi 12.1 with MacOS version and iOS version

    I mean not being able to have the debugger attach to the process on the device at all, regardless of whether or not there are breakpoints set. The install process should still succeed. If this an error you receive when attempting to install the app on the device using the IDE, it sounds like you have a development (as opposed to App Store) certificate/profile issue.
  25. Actually, the messages I was referring to were warnings from before the privacy requirements came into force, as evidenced by this post on the German Delphi Praxis. Transporter might not be issuing warnings/errors any more; it could be that they're rejected at the review stage. One way to find out is to submit something 🙂
×